> phbgt> Second :
> phbgt>
> phbgt> I want to encyrpt and decrypt a file, using aes-256-cbc.
> phbgt>
> phbgt> First I use
> phbgt> type = EVP_get_cipherbyname("aes-256-cbc") to set the cipher type.
> phbgt>
> phbgt> Then I use EVP_CipherInit(ctx,type,key,iv,enc) to set the key and
> the iv.
> phbgt>
> phbgt> My problem is that I always succed in decrypt the file, even if the
> iv has
> phbgt> not the good value.
> 
> Hmm, do you have possibility to check what the IV becomes after you
> initialise?  And possibly what low-level function actually does the
> encryption and decryption?  If not, make some example code that we can
> test with and send it to us.
> 
I had made some test: in fact when I changed the iv, I only changed few
bits, so the uncrypted file "seams" to be the same. (whatever the value of
iv, only the first bloc change). It's ok.


> phbgt> In the man, when you write EVP_CipherInit " always use the
> phbgt> default cipher implementation", is that mean that even using
> phbgt> EVP_get_cipherbyname("aes-256-cbc"), the cipher is not set to
> phbgt> "aes-256-cbc"?
> 

With this type of initialisation, EVP_CipherInit use aes-256-cbc. In fact,
it seams that there's no default cipher in openssl.

> If that's the meaning in practice, you've uncovered a bug.
> 
> --
> Richard Levitte   \ Tunnlandsv�gen 3  \ [EMAIL PROTECTED]
> [EMAIL PROTECTED]  \ S-168 36  BROMMA  \ T: +46-8-26 52 47
>                     \      SWEDEN       \ or +46-708-26 53 44
> Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
> Member of the OpenSSL development team: http://www.openssl.org/
> 
> Unsolicited commercial email is subject to an archival fee of $400.
> See <http://www.stacken.kth.se/~levitte/mail/> for more info.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to