Encryption
- From: andreas.moroder@xxxxxxxxxxxx (Andreas Moroder)
- Date: Fri, 27 Apr 2007 11:33:47 +0200
Hello,
I have to calculate a hash of username and password in perl.
The calculation should be done this way:
1. Concatenate the username and the password to produce a plaintext string;
2. Convert the plaintext string to uppercase characters;
3. Convert the plaintext string to multi-byte storage format; ASCII characters have the
high byte set to 0x00;
4. Encrypt the plaintext string (padded with 0s if necessary to the next even block length)
using the DES algorithm in cipher block chaining (CBC) mode with a fixed key value of
0x0123456789ABCDEF;
5. Encrypt the plaintext string again with DES-CBC, but using the last block of the output
of the previous step (ignoring parity bits) as the encryption key. The last block of the
output is converted into a printable string to produce the password hash value.
Is it possible to implement this in perl ?
Is the Crypt-DES Module on CPAN the right module and how can I convert standard string to Multibyte storage ( UTF-16 ? )
An example ist
User: example
password: test
hash: BDA63848A8C31752
I don't need this script to hack anything, we would like to modify oru oracle paasword from a webfrontend.
Thanks
Andreas
.
- Follow-Ups:
- Re: Encryption
- From: Martin Barth
- Re: Encryption
- Prev by Date: pure perl replacment for "/usr/bin/file"
- Next by Date: Re: Sorting the items in a directory
- Previous by thread: pure perl replacment for "/usr/bin/file"
- Next by thread: Re: Encryption
- Index(es):