2
$\begingroup$

Say an attacker has access to a non-rate-limited API that takes (IV, data) and outputsAES-CBC(key, input, data), with the key remaining on the server side. However, the attacker can pass any (valid) IV and data that they want in an attempt to recover the key.

Is there any optimal way to recover the key with such access?

$\endgroup$
1
$\begingroup$

No. What you have access to is called an oracle. It is an entity that encrypts or decrypts arbitrary data with a given secret key. A modern and secure block cipher like AES remains secure from key recovery even in the face of an encryption or decryption oracle. If it was not, the cipher would be considered fatally broken. The best-known way to recover the key with what you have is exhaustive search (brute force).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.