Hello, > 1. How must I init Openssl? Must I call additional init functions than this? > OpenSSL_add_all_algorithms(); > OpenSSL_add_all_ciphers(); > OpenSSL_add_all_digests(); > ERR_load_crypto_strings(); // Only for debugging, right? I think that: SSL_library_init(); ERR_load_crypto_strings(); will be enough.
> 2. I found in openssl/aes.h the function AES_cbc_encrypt() but how can I > decrypt? > Must I create a function that uses AES_decrypt() and as password the last > encrypted block (cbc method)? Last parameter (enc) is AES_ENCRYPT for encryption and AES_DECRYPT for decryption. > 3. The functions AES_set_encrypt_key() and AES_set_decrypt_key() are both for > creating the key. > The decrpyt method inverts something. So the decrypt key is the same key than > the encrypt key with some time saving modifications? Key for decryption are the same as key for encryption but in reverse order for standard algorithm (where algorithm for encryption and decryption differs). Key for decryption are the same as key for encryption but in reverse order with InvMixColumns operation where algorithm for encryption and decryption are the same. Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]