Hi,

I think I've found a problem which prevents the number of rounds of the RC5
cipher being configured when using the EVP cipher wrapper functions with
OpenSSL 0.9.6. The default number of rounds for the EVP_rc5_32_12_16_cbc
cipher is 12. To change this to 16, one might try to use
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC5_ROUNDS, RC5_16_ROUNDS, NULL). But,
if this is called before EVP_CipherInit(), EVPCipher init overwrites the
number of rounds back to the default of 12. If this is called after
EVP_CipherInit(), it has no effect since the value is only copied into the
EVP_CTX structure - the rc5 structure in EVP_CTX is not re-initialised with
the new value.

Maybe rc5_ctrl() in e_rc5.c should only init the number of rounds to 12 in
the EVP_CTRL_INIT case if the value is currently zero to allow
EVP_CIPHER_CTX_ctrl() to be called beforehand to set the number of rounds to
16.

Regards,
Iain Betson.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to