1
$\begingroup$

I'm aware of existing literature that shows in a comprehensive manner just how simple it is to tweak the ciphertext of AES-CBC such that the decrypted message ends up being entirely different than what it was originally (due to the lack of a MAC to provide AEAD).

Can This Be Used to Compromise Encrypted Keys?

Specifically, I came across documentation for a popular piece of software that countless individuals around the world use. This software package generates a private/public key pair for the end user (secp256k1) and encrypts the private key with AES-256-CBC.

Wondering if CBC Mode Poses Any Issue Here

To be clear, by 'issue', I'm referring to the outright recovery of the private key that was encrypted.

If the secret key is damaged / altered in this scenario, that's of no concern (for the question). Not sure if it makes a difference to add in that the key will be decrypted and re-encrypted as it is used (not sure if there is any leakage of the private key data that occurs during this time).

$\endgroup$
0
$\begingroup$

No, in this situation, CBC mode doesn't pose any security with a 256-bit uniform random AES key.

At data on rest, the AES-CBC has Ind-CPA security.

There is a padding oracle attack on the CBC mode due to PKCS#7 padding, however, that is not applying here since there is no server to query the padding.

There are multi-target attacks and quantum attacks on the AES, however, they are not possible on AES-256 which is the reason that it is the golden standard around.

The only problem that can occur on the user's side,

  • User has a weak password that can be found, severe!
  • User-machine has been hacked, severe!
$\endgroup$
3
  • $\begingroup$ Hey - thank you! This pretty succinctly answers my question. Sorry - I'm a bit new though, how can I get you the award for the question, or is it too late to do so? $\endgroup$ – librehash Mar 4 at 11:36
  • $\begingroup$ Reward? Well, upvote an answer is helpful when you can. You need at least 15 points for this. Accept the answer if it satisfies you by pushing the check ✔️. Welcome and have fun. There is no late for upvote and accept. Only you cannot accept immediately. $\endgroup$ – kelalaka Mar 4 at 11:42
  • $\begingroup$ Ah thanks for the quick response! Just confirmed with the check! $\endgroup$ – librehash Mar 4 at 15:20

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.