Questions tagged [sha-1]

SHA-1 is a hash function that is two generations old, no longer considered secure for all uses and should only be used for backward compatibility.

Filter by
Sorted by
Tagged with
2
votes
1answer
33 views

How can Hashed Value be same in length extension attack?

Let's say we had the following information: Secret = "Hello" Message = "Attack at Dawn" H(s,m) = ABC Alice is sending a message to Bob but there is a person in the middle, ...
4
votes
2answers
164 views

Embedding SHA256 inside SHA1 for BitTorrent

BitTorrent uses SHA1 for its hashes, but SHA1 is unsafe and people can tamper the preimage and still obtain the same hash, right? So imagine I want to be very sure the file I'm sharing on BitTorrent ...
0
votes
0answers
9 views

RSA-SHA1 problem [migrated]

I need to create a RSA-SHA1 signature in nodeJS, I am using the following code ...
1
vote
1answer
119 views

is MAC double-hashing enough to prevent length extension attacks?

I know that $$mac=\operatorname{SHA1}(secret\mathbin\|message)$$ is prone to length extension attacks, but what about: $$mac=\operatorname{SHA1}(\operatorname{SHA1}(secret\mathbin\|message))?$$ In ...
6
votes
3answers
4k views

How to get an output of SHA-1 with first 2-bit are zeros?

Can someone explain what are the ways to get an output of SHA-1 with first 2-bits which are zeros?
4
votes
2answers
562 views

The length extension attack and security on length shortening of a hashed message by one byte

MD5, SHA1, SHA2 are vulnerable to length extension attacks Wikipedia:Length extension attack. Could is also be possible to generate $H(\text{message}[1..n-1])$ from $H(\text{message}[1..n])$ if I know ...
0
votes
0answers
49 views

Security implication of concatenating two hashes using different algorithms

Background Hashing files is an expensive thing for CPU. I am tasked to write a secure digital signature scheme. For that, I decided to check the integrity of files using Hash/Digest. To be more secure,...
0
votes
0answers
55 views

Should I update my fedora encrypted system?

I have installed my Fedora Workstation version 23 using native disk encryption. Since it, I am upgrading it using dnf system-upgrade plugin. Today, I have fedora 32. Some time ago, I’ve discovered ...
0
votes
0answers
22 views

stitched aes_128_cbc_hmac_sha1 encrypt-then-mac

Is there implementation of stitched aes_128_cbc_hmac_sha1 encrypt-then-mac? I can only find mac-then-encrypt implementation in OpenSSL 1 How hard is it to change to encrypt-then-mac and compile it?
-1
votes
1answer
97 views

Collision attack

I want to perform a collision attack using hash function of my student number and another possible student number with same hash value. How can I perform this? is there any online tools that can help ...
1
vote
0answers
89 views

Kerberos Use of SHA-1

A lot of good information on Kerbero's encryption methods discussed here, but I there is a second question that arises. Does use of SHA-1 in the overall algorithm weaken Kerberos? If so, will ...
1
vote
2answers
125 views

Losing entropy after re-hashing a hash

Suppose you have a string AAA that was hashed with SHA1 to produce 606ec6e9bd8a8ff2ad14e5fade3f264471e82251. If I rehash ...
1
vote
1answer
105 views

Security Considerations in using SHA-1 for One Time Passwords

SHA-1 is considered broken. That's why I'm assuming that using SHA-1 for RFC2289 OTPs is broken as well. Is this assumption correct? Going further with this assumption using SHA-1 for RFC4226 HOTPs ...
1
vote
1answer
628 views

Length Extension attacks in SHA1 and MD5?

From my understanding on the internet about length-extension attack, I have understood that hash(secret_key|known_data) can be exploited to produce hash(secret_key|known_data|appended_data) even ...
7
votes
4answers
345 views

Can I replace SHA-1 with SHA-512/160 to address Shambles?

The destination is software (within a remote trust boundary) that expects SHA-1 results. Would it be safer for the source (that's within my own trust boundary) to replace my SHA-1 computation at my ...
1
vote
1answer
1k views

What is the use of encoding a hash output?

In many applications, the MD5 algorithm is used which produces a 128-bit output which is represented as a sequence of 32 hexadecimal digits. This output is further encoded using a base62 or base64 ...
16
votes
1answer
10k views

In 2020, SHA-1 practically broken in chosen-prefix collision (CP-collision). Can double SHA-1 hashing prevent CP-collision?

In a recent study SHA-1 is a Shambles - First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust by Gaëtan Leurent and Thomas Peyrin. 2020, they showed the first practical chosen-...
5
votes
2answers
243 views

“One-Wayness” of SHA 1

I recently started learning about Hash Functions for my first time, and I've gone through and have tried to understand the SHA1 process. Brilliant does an excellent job of explaining it step by step. ...
6
votes
1answer
184 views

Do a 160-bit SHA-1 hash and a 160-bit slice of a SHA-256 hash have the same strength in terms of collision-free?

Take OpenPGP fingerprint for example. If the 40-digit hex standard remains unchanged, would it be helpful to upgrade SHA-1 to SHA-256 (but only taking the last 160 bits), in terms of reducing the risk ...
0
votes
1answer
70 views

Equal hashes for different messages when doing key length extension attack sha1

I was doing the cryptopals challenge 29, and I found something weird. When I try to create a forged hash for a forged message I get always the same hash for different forged messages. ...
3
votes
3answers
1k views

Is using RSA with SHA-1 considered as secure as HMAC-SHA-1?

I know SHA-1 hashing is regarded insecure. HMAC-SHA-1 is still regarded secure as this is an encryption process with symmetric key of the hash produced by SHA-1. So signing using RSA with a key size ...
0
votes
1answer
124 views

How to use SHA-1 as a PRNG?

Is there any special parameters for using SHA-1 for generating pseudo-random numbers? What are the differences between SHA-1 as a PRNG and original SHA-1?
0
votes
3answers
443 views

CRC32 catches errors, but then what's the point of SHA?

If crc or CRC32 is specially designed to catch errors, then what's the point of SHA or md4-5 or any other hashing function? What I did was, I had a 190 mb png file (rendered in 16k resolution with ...
5
votes
2answers
688 views

Is it feasible to get a hash collision for CRC32, MD-5 and SHA-1 on one file?

I'm aware that individually, each has its weaknesses (especially CRC32), but is it feasible that a file could be created to falsely match all three?
4
votes
1answer
63 views

Recover secret SHA-1 constants given Oracle

There's a black box that's basically SHA-1, except that the constants (h0, h1,...,h4) are secret. We can pass it arbitrary inputs and get the corresponding outputs. Given this, is it possible to ...
0
votes
0answers
37 views

Which SHA-1 attacks apply to TOTP tokens? [duplicate]

Update: it's actually hmac(secret, time). I'll leave the post as-is, in case someone is ever looking for the hash(secret+time) ...
7
votes
2answers
3k views

Does a hash function have a Upper bound on input length?

I came across this Answer stating (just a line from the answer):- The input space is "infinite" and thus it has an infinite amount of values that will collide into a single hash And in the ...
9
votes
3answers
3k views

How many bits in the resultant hash will change, if the x bits are changed in its the original input?

I came across a question stating: We have a message consisting of 10,000 characters. After computing its message digest using SHA-1, we decide to change the last 19 characters in the original ...
1
vote
2answers
248 views

Why authors of bcrypt have chosen blowfish and not some hash function like SHA-1?

I wonder what are the advantages of using bcrypt over an iterated and salted KDF based on some cryptographic hash function like SHA-1 (or SHA-3)? I guess the authors of bcrypt chose Blowfish (a block ...
2
votes
1answer
277 views

Where do the constants for SHA-1/2/3 come from?

My request is: I need to know the source of constants (shift constants, IV, or S-Box) for the following algorithms: SHA-1 SHA-2 (all sizes) SHA-3 Examples: BLOWFISH uses the hexadecimal ...
2
votes
1answer
296 views

SHA1 padding on length extension attack

I was recently trying to replicate a length extension attack on SHA1. I implemented the registers state and also the new padding implementation (with the whole of the message that I want to extend). ...
2
votes
1answer
61 views

About the security of GnuPG private key on-disk storage

GnuPG on-disk storage of secret key material is encrypted with AES-128, with an encryption key generated via an iterated and salted SHA-1 hash of the given passphrase. Is this usage of the SHA-1 hash ...
7
votes
1answer
385 views

Which TLS features are vulnerable to chosen-prefixes collision on SHA-1?

Gaëtan Leurent and Thomas Peyrin's preprint From Collisions to Chosen-Prefix Collisions - Application to Full SHA-1 (in volume 1 of proceedings of the forthcoming Eurocrypt 2019) shows a feasible ...
0
votes
2answers
235 views

SHA1 calculation for millions of strings having common prefix

I have a function in which I need to calculate SHA1(common_prefix + random_string). I am calling this function many times so that calculation of SHA1 slows down the performance of the function. As for ...
0
votes
1answer
111 views

What is a SHA1_Compress() function?

I'm trying to implement the scrypt key derivation function using JavaScript. When implementing the algorithm, I found that there was a function called SHA1_Compress listed in the specification. Is the ...
2
votes
1answer
347 views

Partial Known Message Pre-Image Attack on SHA-1

If the last 448 bits of a sha1 block input are known (only the first 64 bits are unknown). Is it possible to do a preimage attack using SAT solvers or something else? Or do I have to brute force all $...
0
votes
1answer
2k views

How to change hash checksum of a text file without changing the contents in the file

I have created a text file called test.txt and the content of the file is Hello World I would like to change the SHA checksum hash without modifying the contents and filename. Is there any way to do ...
6
votes
2answers
5k views

Using a hash function as a random number generator

Using MD5 or SHA1 for instance, and applying integers (as seed so to speak) to the hash function, in sequence, and only keeping, say, the first 64 bits of the resulting hash, do we always have a ...
2
votes
2answers
143 views

SHA-1 collision for strings of two symbols

Is it possible to have strings of two (Unicode) symbols with equal SHA-1 hash? For example, smth like "ab", "ba".
8
votes
1answer
3k views

What is the use of SCRAM-SHA-256 (over SCRAM-SHA-1)?

The Salted Challenge Response Authentication Mechanism (SCRAM) specified in RFC 5802 can use arbitrary hash functions to operate. The base version from RFC 5802 uses SHA-1. From my understanding, ...
-3
votes
1answer
109 views

Which is more secure? $\operatorname{AES-ECB}(key,\operatorname{SHA1}(data+key))$ vs $\operatorname{HMAC-SHA1}(key, data)$ [closed]

$\operatorname{AES-ECB}(key,\operatorname{SHA1}(data+key))$ vs $\operatorname{HMAC-SHA1}(key, data)$ Which is more secure? Which is faster? There is a similar comparison here; HMAC-SHA1(key, data) ...
-3
votes
1answer
161 views
-3
votes
1answer
116 views

aes-ctr(key, ++iv, sha-1(plainText + aes-ctr(key,iv,0^128))+(plainText + aes-ctr(key,iv,0^128))); is it secure? [closed]

Proposed Cipher suite: aes-ctr(key, ++iv, sha-1(plainText + aes-ctr(key,iv,0^128))+(plainText + aes-ctr(key,iv,0^128))); Security targets achieved: Encryption of the plain text. Integrity of the ...
1
vote
1answer
86 views

Unable to reproduce correct signature data

"Skatteetaten" is the Norwegian tax authority. We're currently trying to implement signing of messages for digital cash registry systems and i'm not able to reproduce the desired signed data. Went ...
1
vote
0answers
21 views

GlobalSign cert in Trusted root for Google Services shows Sha1. Security postures

"GlobalSign" certificate in Trusted Root Certification Authorities for Google Services shows Sha1. Security postures are different than just 2-3 yr ago. At my home, router bought 2016, networked; ...
2
votes
3answers
316 views

Changing SHA-1 constants an functions: Does it affect security?

I have been looking into the SHA-1 algorithm. I found that there are a set of functions and constants in the algorithm that have been standardized (section 5 of RFC 3174). If I want to use SHA-1, ...
12
votes
2answers
3k views

How reassuring is 64-bit (in)security?

In Feb 2017, CWI and Google announced SHAttered hash collision attack on SHA1, which took $2^{63.1}$ work estimated 6500 CPU years, to achieve. Therefore, 64-bit should be considered now an insecurity....
6
votes
1answer
3k views

Is SHA-1 secure when used to implement a PRNG

I read SHA-1 is still a secured hashing function with no collision found as of now. However, it's just a matter of time for someone to come up with such a collision or attack. Therefore, in new ...
1
vote
0answers
56 views

Nature of risk(s) from KeeChallenge XML file stored in cloud at Onedrive

As a noob user of KeePass2 on Windows desktop and Keypass2Android on my phone, supplemented by YubiKey Neo configured for hmac-sha1 challenge response, I noticed that Keepass2Android appears to store ...
2
votes
0answers
511 views

Is it possible to prevent length extension attacks

Is it possible to prevent length extension attacks without using any other hash algorithm than SHA-1?

1
2 3 4 5 6