kjur / jsrsasign

The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES and JSON Web Signature/Token in pure JavaScript.
https://kjur.github.io/jsrsasign
Other
3.25k stars 646 forks source link

Can't handle optional PBKDF2-params's keyLength #618

Open emmansun opened 5 months ago

emmansun commented 5 months ago

When i tried to call KEYUTIL.getKeyFromEncryptedPKCS8PEM, it's failed due to there are keyLength in the PBKDF2-params. Per check the implementation, found the code get prf from position 2 directly:

https://github.com/kjur/jsrsasign/blob/58bb24192f501927014b67911bbde8ef27532319/src/keyutil-1.0.js#L829