Questions tagged [sha1]

SHA-1 is a cryptographic hash function designed by the U.S. Government as a Federal Information Processing Standard. Recently, collisions have been detected, meaning that SHA1 is becoming more vulnerable to attacks, and its use for protecting data is not recommended.

NOTE: Sha1 is no longer secure due to collisions being found. It is recommended you use or another hashing system like

In cryptography, SHA-1 is a cryptographic hash function designed by the National Security Agency (NSA) and published by the NIST as a U.S. Federal Information Processing Standard. SHA stands for Secure Hash Algorithm. The three SHA algorithms are structured differently and are distinguished as SHA-0, SHA-1, and SHA-2. SHA-1 is very similar to SHA-0, but corrects an error in the original SHA hash specification that led to significant weaknesses. The SHA-0 algorithm was not adopted by many applications. SHA-2 on the other hand significantly differs from the SHA-1 hash function.

SHA-1 is the most widely used of the existing SHA hash functions, and is employed in several widely-used security applications and protocols. In 2005, security flaws were identified in SHA-1, namely that a mathematical weakness might exist, indicating that a stronger hash function would be desirable. Although no successful attacks have yet been reported on the SHA-2 variants, they are algorithmically similar to SHA-1 and so efforts are underway to develop improved alternatives. A new hash standard, SHA-3, is currently under development — an ongoing NIST hash function competition is scheduled to end with the selection of a winning function in 2012.

References:

1825 questions
43
votes
3 answers

How to installing sha1sum in MAC OS?

Problem: To get the sha1sum value of a file in MAC OS i run the following command sha1sum file_name The error I got is following perl version 5.18.2 can't run /usr/bin/sha1sum. Try the alternative(s): /usr/bin/sha1sum5.16 (uses perl 5.16) Run…
J4cK
  • 30,459
  • 8
  • 42
  • 54
43
votes
11 answers

Is it possible to reverse a SHA-1 hash?

Is it possible to reverse a SHA-1? I'm thinking about using a SHA-1 to create a simple lightweight system to authenticate a small embedded system that communicates over an unencrypted connection. Let's say that I create a sha1 like this with input…
Johan
  • 20,067
  • 28
  • 92
  • 110
41
votes
3 answers

Why use SHA1 for hashing secrets when SHA-512 is more secure?

I don't mean for this to be a debate, but I'm trying to understand the technical rationale behind why so many apps use SHA1 for hashing secrets, when SHA512 is more secure. Perhaps it's simply for backwards compatibility. Besides the obvious larger…
orokusaki
  • 55,146
  • 59
  • 179
  • 257
40
votes
3 answers

Password hash function for Excel VBA

I need a function written in Excel VBA that will hash passwords using a standard algorithm such as SHA-1. Something with a simple interface like: Public Function CreateHash(Value As String) As String ... End Function The function needs to work on…
Joe
  • 122,218
  • 32
  • 205
  • 338
39
votes
6 answers

Is there an equivalent to SHA1() in MS-SQL?

Converting a couple stored procedures from MySQL to Microsoft SQL server. Everything is going well, except one procedure used the MySQL SHA1() function. I cannot seem to find an equivalent to this in MS-SQL. Does anyone know a valid equivalent for…
GEOCHET
  • 21,119
  • 15
  • 74
  • 98
38
votes
6 answers

C# SHA-1 vs. PHP SHA-1...Different Results?

I am trying to calculate a SHA-1 Hash from a string, but when I calculate the string using php's sha1 function I get something different than when I try it in C#. I need C# to calculate the same string as PHP (since the string from php is calculated…
Anand Capur
  • 808
  • 1
  • 9
  • 18
37
votes
7 answers

Can a SHA-1 hash be all-zeroes?

Is there any input that SHA-1 will compute to a hex value of fourty-zeros, i.e. "0000000000000000000000000000000000000000"?
mckamey
  • 17,359
  • 16
  • 83
  • 116
36
votes
2 answers

How does the newly found SHA-1 collision affect Git?

Recently a team of researchers generated two files with the same SHA-1 hash (https://shattered.it/). Since Git uses this hash for its internal storage, how far does this kind of attack influence Git?
Rudi
  • 19,366
  • 3
  • 55
  • 77
34
votes
13 answers

React-Native Bundle Error error SHA-1 for file is not computed

I am facing this error while creating bundle of react-native app. I am executing command react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios error SHA-1 for file…
Punita
  • 1,338
  • 2
  • 13
  • 21
32
votes
3 answers

Git File Integrity

Recently my main machine i use for development started overheating. I started to get 4 or 5 lockups per day. Everything freezes. All my projects are under version control using git. I remember watching Linus' talk at Google saying git will ensure…
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241
31
votes
5 answers

SHA1 collision demo / example

This question is similar to this, but that one only references MD5 collision demos. Are there any actual SHA1 collision pairs of arbitrary messages known so far ? I'd like to use these to test how various software products (my own one and some third…
Arc
  • 11,143
  • 4
  • 52
  • 75
31
votes
5 answers

Android SHA1 release keystore not working with Google Maps

I am using the Google Maps Android API and I'm running into some issues. I am signing my apk with android studio (created one at .android/keystore.jks). Also I'm selecting "release" as type in it. I have used the command keytool -list -v -keystore…
amahrt
  • 523
  • 1
  • 5
  • 13
30
votes
8 answers

How do you verify an RSA SHA1 signature in Python?

I've got a string, a signature, and a public key, and I want to verify the signature on the string. The key looks like this: -----BEGIN PUBLIC…
Andrew B.
  • 1,225
  • 1
  • 13
  • 18
30
votes
2 answers

Ruby way to generate a HMAC-SHA1 signature for OAuth

I'm writing a small ruby program to play with Twitter over OAuth and have yet to find a right way to do the HMAC-SHA1 signature. So far, I messed around with Base64.encode64(OpenSSL::HMAC.hexdigest(digest, key, stuff)).chomp But this outputs…
Roberto
  • 1,944
  • 1
  • 30
  • 42
30
votes
3 answers

Objective C: SHA1

How do i sha1 a string or set of numbers in Objective c?
Daniel
  • 3,017
  • 12
  • 44
  • 61