-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Increase KDF iteration count in KeyStoreWrapper
#107107
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
Increase KDF iteration count in KeyStoreWrapper
#107107
Conversation
@@ -114,19 +114,19 @@ public void writeTo(StreamOutput out) throws IOException { | |||
|
|||
/** The oldest metadata format version that can be read. */ | |||
private static final int MIN_FORMAT_VERSION = 3; | |||
/** Legacy versions of the metadata written before the keystore data. */ | |||
public static final int V2_VERSION = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, so I'm removing it.
Hi @n1v0lg, I've created a changelog YAML for you. |
Pinging @elastic/es-core-infra (Team:Core/Infra) |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one suggestion
|
||
/** The algorithm used to derive the cipher key from a password. */ | ||
private static final String KDF_ALGO = "PBKDF2WithHmacSHA512"; | ||
|
||
/** The number of iterations to derive the cipher key, for versions of the keystore preceding the iteration count increase. */ | ||
private static final int KDF_ITERS_BEFORE_HIGHER_KDF_ITERATION_COUNT_VERSION = 10000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this inline in getKdfIterationCountForVersion
, no need to take up memory forever for it.
…icsearch into iter-count-keystore-wrapper
This PR increases the KDF iteration count for the keystore password.
Additional context in ES-8063.