Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > AES-CTR

Reply
Thread Tools

AES-CTR

 
 
bytebro
Guest
Posts: n/a
 
      10-04-2006
Hi,

I have had a browse around CPAN, and can't quite find what I'm looking
for, so I was wondering if anyone might be able to point me in the
right direction.

I have a C program which does the following:

Given a pseudo-random salt (8 bytes) and user-supplied passphrase, it
uses RFC3686 (PKCS #5) to produce a 256-bit AES key, and a 16-byte IV.
The salt value is broadcast as a header to the ciphertext.

It encrypts the plaintext in CTR mode, XORing an 8-byte counter into
the IV to give a counter block prior to each encryption.

It appends a 16-byte MAC produced using OMAC1/CMAC to the ciphertext.

My quest is to find a module or set of modules which allow me to
duplicate this processing in Perl. The Rijndael modules I found don't
seem to support CTR mode, so I'd have to roll that myself in the body
of the code, I guess; the only other CTR-related module I found seems
not to support an 8-byte counter and confesses itself to be very slow.
I found a Digest::CMAC module, but nothing for the PKCS #5 key
derivation.

Any ideas, please?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments