Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does IV really need to be encrypted? #5

Open
rjharmon opened this issue Dec 18, 2009 · 2 comments
Open

Does IV really need to be encrypted? #5

rjharmon opened this issue Dec 18, 2009 · 2 comments

Comments

@rjharmon
Copy link

According to this article http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation
the IV doesn't to be secret; instead, it should only be ensured that the IV isn't re-used with the same key. Since you do generate a random key already, then it should be fine to record the IV without need for encrypting it.

Of course, backward compatibility is an issue with that. There would need to be an option to indicate unencrypted IV's - that, or a marker on the IV to indicate that it's cleartext.

Thoughts?

Randy

@rjharmon
Copy link
Author

I've done more research and while there are some who suggest that for authentication purposes, making the IV a secret can be helpful, the best information I see indicates that the symmetric cbc cypher is no less secure for the initialization vector being in the clear.

Of course, having the IV encrypted to the secret key doesn't normally (in current Strongbox usage) present a practical problem, it does in fact become a practical problem if we wish to use a symmetric-only encryption (using a key that's not always- available) if the private key is unavailable at the moments when the symmetric key is ready for decrypting the ciphertext.

I will provide a patch in the hopes it's acceptable.

Randy

@rjharmon
Copy link
Author

rjharmon commented Jan 6, 2010

My fork has the ability to store IV's without encryption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant