java bouncycastle PKCS12 keystore "max password length"

Viewed 344

For what would seem to be a deceptively easy Google search, I get nothing...

Before digging into the code, does anyone know off-hand what (if any) the max password char[] length is for a Bouncy Castle implementation of a PKCS12 type Java KeyStore?

I'm working on a GUI to load a KeyStore object from a file, and I just need to know what to cap the password field length at.

THANKS!

1 Answers

PKCS12 uses various key derivation functions such as PBKDF2 to transform a password into a fixed-length symmetric key. There is no limit on the length of the password and the BouncyCastle implementation does not add one.

Related