 |
 |
 |
 |
| Programming & Packaging A place to discuss programming and packaging. |

5th August 2012, 01:45 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Beyond belief.
Posts: 8

|
|
|
SHA2 256 in PERL?
I trying to learn PERL and am hacking together a program. My project is to verify someone elses password process, but in PERL.
They created some keys, they are into elliptical curve cryptography and ECDSA, so I assume they are probably using SHA2 algorithms in their password generation process. I tried to install Digest::SHA2 but it's buggy and won't install.
What other options are there to get SHA2 for PERL?
|

5th August 2012, 04:59 AM
|
 |
Registered "Cashew" User
|
|
Join Date: May 2010
Location: Adelaide, Australia
Age: 19
Posts: 621

|
|
|
Re: SHA2 256 in PERL?
Maybe Digest::SHA::PurePerl?
Quote:
|
Digest::SHA::PurePerl is a complete implementation of the NIST Secure Hash Standard. It gives Perl programmers a convenient way to calculate SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256 message digests. The module can handle all types of input, including partial-byte data.
|
__________________
Running Mageia 3 (KDE 4.10) on an ASUS K55V (Core i5, 16GB RAM, 750GB HDD, Nvidia 610M)
|

5th August 2012, 05:17 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Beyond belief.
Posts: 8

|
|
|
Re: SHA2 256 in PERL?
Quote:
|
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.
|
Quote:
|
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.
|
hxxp://en.wikipedia.org/wiki/SHA-1
Quote:
|
Digest::SHA::PurePerl and Digest::SHA, gives Perl programmers a convenient way to calculate SHA-1 (hashes, which are) SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256 message digests.
|
Bracket info added.
hxxp://search.cpan.org/~mshelor/Digest-SHA-PurePerl-5.71/lib/Digest/SHA/PurePerl.pm
|

5th August 2012, 05:50 AM
|
 |
Registered "Cashew" User
|
|
Join Date: May 2010
Location: Adelaide, Australia
Age: 19
Posts: 621

|
|
|
Re: SHA2 256 in PERL?
I think Digest::SHA::PurePerl and Digest::SHA support both SHA-1 and SHA-2 (i.e. SHA-224, SHA-256, SHA-384 and SHA-512). Digest::SHA2 got deprecated in favor of Digest::SHA.
__________________
Running Mageia 3 (KDE 4.10) on an ASUS K55V (Core i5, 16GB RAM, 750GB HDD, Nvidia 610M)
|

5th August 2012, 09:10 AM
|
|
Registered User
|
|
Join Date: Aug 2012
Location: Beyond belief.
Posts: 8

|
|
|
Re: SHA2 256 in PERL?
I see, it is my misunderstanding. 
SHA-1 is 160-bits only while SHA-2 is everyhting from 224-bits and above.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 05:43 (Thursday, 20-06-2013)
|
|
 |
 |
 |
 |
|
|