Re: AES-256 using CTR mode.

2013-01-16 Thread Matt Caswell
No, as far as I know, there is no support for OCB. For the documentation on which modes are supported check evp.h!!! :-) Matt On 16 January 2013 02:57, Rohit Bansal wrote: > Thanks Matt. > > On that note, do we have support for OCB mode in openssl. Where can i find > the documentation for all

Re: AES-256 using CTR mode.

2013-01-15 Thread Rohit Bansal
Thanks Matt. On that note, do we have support for OCB mode in openssl. Where can i find the documentation for all the modes supported by openssl?? Regards, Rohit Bansal On Mon, Jan 14, 2013 at 1:16 PM, Matt Caswell wrote: > The EVP API is documented here: > https://www.openssl.org/docs/crypto

Re: AES-256 using CTR mode.

2013-01-14 Thread Matt Caswell
The EVP API is documented here: https://www.openssl.org/docs/crypto/EVP_EncryptInit.html# There is some example code there too. It doesn't use AES or CTR, but the principle is the same. Just replace EVP_bf_cbc() with EVP_aes_256_ctr(), and ensure you use an appropriately sized key and IV. Matt

Re: AES-256 using CTR mode.

2013-01-14 Thread Rohit Bansal
Thanks Matt. Is there a sample code i can look into? In my case the key is unique across different messages, so having same IV across messages should not lead me into problem Thanks, Rohit Bansal On Mon, Jan 14, 2013 at 12:22 PM, Matt Caswell wrote: > Yes, you can use CTR mode for AES-256: us

Re: AES-256 using CTR mode.

2013-01-14 Thread Matt Caswell
Yes, you can use CTR mode for AES-256: use the EVP interface with the EVP_CIPHER of EVP_aes_256_ctr(). However it is a fundamental requirement of CTR mode that the IV must be unique across messages. If you reuse the IV then your messages can be broken quite trivially. Therefore, if by a fixed IV,