cordova-plugin-secure-key-store
cordova-plugin-secure-key-store copied to clipboard
Max entry size
What is the maximum size for a single key to be successfully stored? I've been experimenting with longer strings (up to 1K characters) and was surprised that it stores the keys of such length without errors. But when getting back these keys strings come empty. I realize this really depends on hardware limitations but I could not find any documented max size. Any info?
It would also be nice to have some kind of error/warning if the key is too large and is not going to be saved well.
Many thanks!
Maximum key size for RSA is 256 bytes
Thanks for your answer. This is interesting. At least Android Keystore specification mentions different key sizes for different cryptosystems:
EC - 224, 256, 384, 521
RSA - 512, 768, 1024, 2048, 3072, 4096
Furthermore for more recent OS versions (Android 9 +) hardware security is supported with:
RSA 2048
AES 128 and 256
ECDSA P-256
HMAC-SHA256 (supports key sizes between 8 bytes and 64 bytes, inclusive)
Triple DES 168
This makes sense as since 2015 minimum recommended RSA and DSA key is 2048.
Maybe it is worth mentioning where this limitation comes from: the library inself or externally.
Thanks.