Questions tagged [sha2]

sha-2 refers to the family of secure hash functions consisting of SHA-224, SHA-256, SHA-384, and SHA-512. These are defined by the US NIST in FIPS 180-4.

sha-2 refers to the family of secure hash functions consisting of SHA-224, SHA-256, SHA-384, and SHA-512. These are defined by the US NIST in FIPS 180-4.

135 questions
168
votes
10 answers

Are there any SHA-256 javascript implementations that are generally considered trustworthy?

I am writing a login for a forum, and need to hash the password client side in javascript before sending it on to the server. I'm having trouble figuring out which SHA-256 implementation I can actually trust. I was expecting there to be some kind of…
jono
  • 1,782
  • 2
  • 13
  • 6
146
votes
7 answers

Is calculating an MD5 hash less CPU intensive than SHA family functions?

Is calculating an MD5 hash less CPU intensive than SHA-1 or SHA-2 on "standard" laptop x86 hardware? I'm interested in general information, not specific to a certain chip. UPDATE: In my case, I'm interested in calculating the hash of a file. If…
Mick
  • 13,248
  • 9
  • 69
  • 119
51
votes
5 answers

Check if my SSL Certificate is SHA1 or SHA2

I have tried to find the answer to this but I couldn't find an answer... How do I check if my SSL Certificate is using SHA1 or SHA2? Reason I ask is because it might have to do with the certificate not loading on Mozilla Browers.... Any ideas? Can I…
Henry
  • 5,195
  • 7
  • 21
  • 34
38
votes
6 answers

Java - Hash algorithms - Fastest implementations

I want to know what is the best and fastest implementation of hash algorithms for Java especially MD5 and SHA-2 512 (SHA512) or 256. I want a function to get a string as an argument and return the hash as the result. Thak you. Edit: This is for…
Alireza Noori
  • 14,961
  • 30
  • 95
  • 179
31
votes
5 answers

Why choose SHA512 over SHA384?

SHA384 is a truncated version of SHA512. But why would anyone use it? And corollary: if SHA384 is just as good as SHA512, is there any rationale in using the 512 bit version? I am planning to use one of the algorithms to verify file integrity, so I…
jst
  • 596
  • 1
  • 4
  • 8
23
votes
4 answers

PBKDF2-HMAC-SHA2 test vectors

There are test vectors for PBKDF2-HMAC-SHA1 in RFC6070. There are test vectors for HMAC-SHA2 in RFC4231. But so far I haven't found test vectors for PBKDF2-HMAC-SHA2 anywhere. I'm most interested in SHA256, so I'll post some vectors I calculated…
Christian Aichinger
  • 6,989
  • 4
  • 40
  • 60
20
votes
2 answers

SHA-512 library for PHP

I am searching for any crypto library that provides SHA-512 hash. Googling around I found some but SHA-512 is absent. Please suggest.
RKh
  • 13,818
  • 46
  • 152
  • 265
19
votes
3 answers

Hashing a password using SHA256 and .NET/Node.js

Im Storing SHA256 hashes of user passwords in my database generated by .NET and I need to be able to check them with Node.js. The only problem is that .NET and Node.js create different hashes for the same password. Password: ThisPassword …
davey555
  • 720
  • 1
  • 7
  • 15
17
votes
2 answers

How many SHA256 hashes can a modern computer compute?

I want to know the mathematical time required for cracking hashes based off different sets of characters. For example, using only 7 letter, US-ASCII alphabetic characters we know that there are 267 possible sequences that could be used. Knowing how…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
15
votes
3 answers

get SHA256 hash of public key

I have a certificate mycert.pem . I got the public key of the certificate by command: openssl x509 -pubkey -noout -in mycert.pem > pubkey.pem How can I get the SHA256 hash of the public key?
Leem
  • 17,220
  • 36
  • 109
  • 159
13
votes
2 answers

Whether/how to avoid SHA-1 signed timestamp when code signing?

We just switched from a SHA-1 to a SHA-2 code signing certificate. (As background info, we sign .exe and .xap files on Windows with signtool.exe, using COMODO code signing certificates.) We do this using a certified timestamp, to make sure that…
11
votes
3 answers

Calculating a hash code for a large file in parallel

I would like to improve the performance of hashing large files, say for example in the tens of gigabytes in size. Normally, you sequentially hash the bytes of the files using a hash function (say, for example SHA-256, although I will most likely use…
Michael Goldshteyn
  • 71,784
  • 24
  • 131
  • 181
11
votes
2 answers

dovecot password hashing with mysql 8 SHA2

Previously (MySQL 5.7) we was using this command to add a new email address into an existing table: INSERT INTO `servermail`.`virtual_users` (`id`, `domain_id`, `password` , `email`) VALUES ('1', '1', ENCRYPT('password', CONCAT('$6$',…
mahyard
  • 1,230
  • 1
  • 13
  • 34
11
votes
1 answer

sha512-crypt mysql and dovecot

I have a question about understanding sha512-crypt hashing. I found this tutorial to set up dovecot and postfix with mysql. I followed the tutorial (with slight modifications) and everything works fine. But there is one thing, that I do not…
Tim
  • 802
  • 1
  • 7
  • 15
8
votes
5 answers

SSL encryption, SHA-1 and SHA-2

I am trying to implement SHA-2 encryption instead of SHA-1. For this, I know that the number of bits between these two hash algorithms are different, and it confuses me. How can this be achieved and at what parts do I need to make required…
Hellnar
  • 62,315
  • 79
  • 204
  • 279
1
2 3
8 9