AES-CTR

Discussion in 'Perl Misc' started by bytebro, Oct 4, 2006.

  1. bytebro

    bytebro Guest

    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?
     
    bytebro, Oct 4, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnt O. Kvannefoss
    Replies:
    6
    Views:
    508
    Arnt O. Kvannefoss
    Apr 8, 2005
  2. jimgardener
    Replies:
    1
    Views:
    3,840
    jimgardener
    Dec 5, 2008
  3. Overo

    Pycrypto AES CTR

    Overo, Dec 19, 2011, in forum: Python
    Replies:
    0
    Views:
    548
    Overo
    Dec 19, 2011
  4. Nate Wiger

    New AES gem available -- fast-aes

    Nate Wiger, Jan 20, 2010, in forum: Ruby
    Replies:
    3
    Views:
    204
    Pål Bergström
    Jul 1, 2010
  5. bob smith

    ctr++ or ++ctr

    bob smith, Aug 30, 2013, in forum: C++
    Replies:
    22
    Views:
    521
Loading...

Share This Page