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
7
votes
1answer
6k 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 ...
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....
0
votes
2answers
60 views

Question about SSH host key algorithms

I'm currently writing a report for my Master's degree on the SSH protocol. Quite interesting! However I'm having trouble getting into the inner workings of the host key algorithms. For example, ...
1
vote
0answers
33 views

What technical flaw in the Secure Hash Standard was the NIST referring to?

On July 11, 1994, the NIST proposed an interesting revision to FIPS 180, about the Secure Hash Standard: A revision of Federal Information Processing Standard (FIPS) 180, Secure Hash Standard (SHS), ...
1
vote
0answers
26 views

vec_sel in SHA-1

I can't find what is vec_sel() in this optimization from Wikipedia: Instead of the formulation from the original FIPS PUB 180-1 shown, the following equivalent ...
4
votes
1answer
1k views

Where in the FIPS documents is it stated that SHA-1 is not secure?

SHA-1 has not been secure for a very long time, but I still can see it here. Where in the FIPS documents did it state that SHA-1 is not secure?
9
votes
1answer
1k views

Outlook of trustworthiness of SHA-2

On the Wikipedia page of SHA-2, the following is written: Currently, the best public attacks break preimage resistance for 52 out of 64 rounds of SHA-256 or 57 out of 80 rounds of SHA-512, and ...
2
votes
1answer
45 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
216 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 ...
7
votes
1answer
524 views

How did SHA-1 'feed' Blum Blum Shub

One of the most (in)famous hardware derived random number generators was Lavarand (patent). It did it with funky lava lamps. An image of the lamps was hashed and fed into Blum Blum Shub (BBS) to ...
17
votes
4answers
64k views

Does the SHA hash function always generate a fixed length hash?

I'm using the SHA1/2 family of algorithms for a particular project. I was wondering if all the SHA algorithms return a fixed length hash regardless of the length of the data.
1
vote
1answer
146 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
652 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
51 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,...
10
votes
2answers
10k views

128 bit hash with least chance of collision?

I'm building a storage system for JSON documents where they are looked up on a 128 bit key. These JSON documents have a timestamp within them, but apart from that are user-entered data. These JSON ...
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 ...
7
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 ...
0
votes
0answers
26 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
112 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
101 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
132 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
121 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
233 views

Does SHA-1 meet the strict avalanche criterion?

Does SHA-1 meet the strict avalanche criterion? I've been looking for a paper to cite on this, but haven't found one. It's something that seems to be easy to check (in "On the Design of S-Boxes", ...
7
votes
4answers
358 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
944 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 ...
-1
votes
1answer
1k views

Base64 for a hash algorithm [closed]

It may be a silly question, but I am really curious. If a hash algorithm uses Base64 in the process of hashing a string, for example, it is still considered a hash algorithm, even though it uses an ...
1
vote
1answer
2k 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 ...
5
votes
2answers
4k views

What does “bits” mean in the context of hash functions?

What does the "bits" in hash functions mean? I started studying hash functions but I still do not understand what the bits mean. What does it mean to say that MD5 is 128-bits or that SHA-1 is 160 ...
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
247 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
207 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
74 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. ...
1
vote
1answer
6k views

Is RSA with SHA1 broken?

I am using CryptSignMessage to sign a string/file. Is using RSASha1 insecure? I know Sha1 is broken as a hashing algorithm, but does that also mean that using it for signing with RSA is broken?
0
votes
1answer
1k views

What is the length of the SHA-1 message digest and how is RSASSA-PSS used for verification?

I am a newbie to cryptography and SHA-1. Currently I am configuring a SHA-1 hash function which takes default length as 128 bits. Is it okay to configure it this way, since I see in most cases SHA-1 ...
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
139 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
525 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 ...
20
votes
2answers
11k views

Why initialize SHA1 with specific buffer?

SHA-1 is initialize with a specific buffer: h0 = 0x67452301 h1 = 0xEFCDAB89 h2 = 0x98BADCFE h3 = 0x10325476 h4 = 0xC3D2E1F0? Why?
0
votes
1answer
286 views

What to do with a last chunk of 503 bits in SHA1?

I was trying to implement a SHA1 algorithm last night, and I got stuck at preprocessing the chunks in SHA1. As I have understood it, the message that has to be hashed, has to be broken into chunks of ...
0
votes
2answers
3k views

SHA1 collision for first 32 bits for two different messages

Is it possible to create a program to find the collision of 2 different messages with the same first 32 bits using sha1 hashing? I tried using a while loop, but it ran endlessly as though no match ...
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 ...
5
votes
2answers
757 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?
3
votes
1answer
255 views

Prove you computed $hash^r(input)$ for some cryptographic hash function

What is the most efficient way to prove that a person computed $r$ rounds of some cryptographic hash function (ex. SHA256) on an input? Specifically, I'm trying to optimize (1) the running time of the ...
37
votes
3answers
7k views

Does “Shattered” actually show SHA-1-signed certificates are “unsafe”?

Note: I am not advocating anyone continues using SHA1-signed certificates: they are dead as far as security is concerned and should no longer be used. I'm just trying to clarify my understanding of ...
0
votes
0answers
49 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) ...
2
votes
1answer
368 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). ...
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
4k 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 ...
11
votes
3answers
5k views

Accelerating SHA-1

I have a program where computing SHA-1 is the bottleneck. This is using OpenSSL 1.0.0e on a 2.6Ghz 16-core Opteron where I get about 325MiB/s throughput. (SHA1 here is via Andy Polyakov's x86-64 ...

1
2 3 4 5 6