Thank's Jeff again, so I correct myself at this point, the simplest one 
block encryption will looks similar to this:

    uint8_t key[16]   = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
    uint8_t plain[16] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};

    uint8_t cipher[16];

    AESEncryption example_encrytpion;

    example_encrytpion.SetKey(key, 16);
    example_encrytpion.ProcessBlock(plain, cipher);

    string cipher_string;

    StringSource ss2 (cipher, 16, true, new HexEncoder( new 
StringSink(cipher_string)));

    cout << cipher_string << endl;


Daniel





On Friday, 4 August 2017 11:49:37 UTC+2, Jeffrey Walton wrote:
>
> On Fri, Aug 4, 2017 at 4:58 AM, Daniel Karcz <daniel...@gmail.com 
> <javascript:>> wrote: 
> > ... 
> > I'm wondering if I can get to AES cipher functions without using any 
> mode? 
>
> Call ProcessBlock(...) directly. Poly1305 does it to transform the 
> per-message nonce into an authenticator key. Its about as lightweight 
> as you can get. 
>
> When you call BlockCipher::ProcessBlock directly, its up to you to 
> ensure you are working with a full block size. 
>
> Also see https://github.com/weidai11/cryptopp/blob/master/poly1305.cpp#L36 
> and https://www.cryptopp.com/docs/ref/class_block_cipher.html 
>
> Jeff 
>

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to