-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
crypto,doc: update language around key stretching #19748
Comments
Not that I know of. One can think of a cipher
It is not strictly necessary to use a KDF to produce the IV, and it is valid to reuse a key with different IVs to some extent. |
@bnoordhuis @tniessen could I pick this up? We could discuss the specifics of the addition. |
As per my understanding of IVs,
Let me know if I'm missing something or if something's wrong with my understanding of IVs. |
@ryzokuken Yes, that's correct. |
@bnoordhuis in that case, should I add this particular paragraph to the docs to make it explicit? I believe it sums the whole thing up. |
Sounds good. As long as it doesn't insinuate that IV reuse is okay, like it currently does. |
@bnoordhuis Correct me if I'm wrong, but I think this only appears in the documentation for My point here being: if I add the paragraph, do I add it to |
I'd add them to all four, yes.
That's right. |
@bnoordhuis making a PR. That said, should I add the exact same text to all four functions? |
Oh, wait. |
I added the text to |
Update the docs to provide clearer instructions regarding the exact scope of the use (and re-use) of an IV, stating the instructions explicitly with greater clarity. Fixes: nodejs#19748
Update the docs to provide clearer instructions regarding the exact scope of the use (and re-use) of an IV, stating the instructions explicitly with greater clarity. PR-URL: #19810 Fixes: #19748 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
doc/api/crypto.md
currently says this:That's only sound when the key+IV are used once. Using the same key+IV twice is undesirable in general and downright disastrous with counter mode ciphers:
It would be good to add some guidelines on how to safely create and store IVs. They should be unpredictable but don't need to be kept secret after encrypting. Are there exceptions to this rule?
Refs: indexzero/nconf#299
The text was updated successfully, but these errors were encountered: