Boost logo

Boost :

Subject: [boost] [cryptography] concept
From: Kasra Nassiri\(Math & ComSci\) (kasra_n500_at_[hidden])
Date: 2008-10-19 15:00:19

Hi all,

I mentioned not a while ago that I am planning to write a boost cryptographic library. I am getting there.

We have template classes that implement a certain interface (not virtual functions). These classes are:

    An allocator which removes the buffers allocated when they
    are destructed by overwriting them.
    Any class that could set a key and encrypt/decrypt
    a constant size of message. (I have included AES,
    Serpent, Twofish and MARS, however, we could always
    add more algorithms)

    By definition stream_cipher is a cipher that
    could process messages of any length.

    Is a class that could compute a cryptographically
    secure hash signature for an arbitrarily long messages.
    (I have added whirlpool and will be adding more).

    An algorithm that provides the patterns of wipe
    for a given pass and fills a given buffer with patterns
    (It needs to have a prng template to be used on random

By using a mode of operation we could turn the concept of block_cipher into a stream_cipher. For example cryptolib::ctr<cryptolib::aes> is a stream_cipher concept. I have implemented ictr, ctr and will be implementing XTS, LRW soon.


    A class that polls random data and mixes the
    data using a hash function.
    Calling the polling function of the entropy_poll
    at "random" but regulated intervals using
    boost::thread library.

    classes that behave similar to 'std' iostream
    ,however, they seamlessly encrypt/decrypt the
     data as they operate.

    Wipes the file using the patterns by the template
    wipe algorithm. This class would determine the
    cluster size and wipe the entire cluster occupied
    by the file (this is platform specific, so we need
    to implement the algorithm for different platforms).

finally we have the cryptolib::crypto_fstream that could be given a direction (i.e. encryption or decryption) and will operate seamlessly on the data.

What do you think? Anything that I am missing on?

Best regards


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Boost list run by bdawes at, gregod at, cpdaniel at, john at