I'm experiencing problems with the AES block cipher algorithm. I'm building a network application and I need to generate an AES key on one host and send it to another host. Is it wrong to export both the IV and the Key with which the AES objects were created? At the moment, if I do this and encrypt on one end and decrypt on another it only works ONCE. If I try to encrypt and decrypt later on everything turns into garbage.
Should the CFB_Mode< AES >::Encryption and CFB_Mode< AES >::Decryption objects be created each time before use? Right now I just have them on the heap to increase performance.
It's difficult to see how one should actually use the algorithm as the FAQ and this mailing list differ somewhat. For instance, some say that you should use the Encryption object for both encryption and decryption, whereas the FAQ uses the Decryptor object for decryption.
Also, according to http://en.wikipedia.org/wiki/Cipher_block_chaining, which the FAQ links to, it is not necessary to apply padding when using CFB mode, but in Denis Bider's "guide" to the library he does padding manually.
Is there a minimum or maximum size of the plaintext you wish to encrypt/decrypt using an AES key? In Denis Bider's guide he defines a constant MINIMUM_CIPHERTEXT_LENGTH = 46 but I'm not sure if that's just for his particular case or in general..
So many questions and so few people active on this mailing list :/
It's the future of Hotmail: Try Windows Live Mail beta
- AES Problems Søren Dreijer
- RE: AES Problems Søren Dreijer
