asmcrypto / asmcrypto.js

JavaScript Cryptographic Library with performance in mind.
MIT License
659 stars 182 forks source link

Doubt in OID algorithm that is used #186

Open Gonzalo2683 opened 3 years ago

Gonzalo2683 commented 3 years ago

Sorry to take this place to look for information, but I have not found a better one.

For the following example:

....
it('asmCrypto.RSA_PSS_SHA256 sign/verify', 
....
  const rsaPssVerify = new asmCrypto.RSA_PSS(pubKey, new asmCrypto.Sha256());
....
  rsaPssVerify.verify(signature, asmCrypto.string_to_bytes(text));

This class asmCrypto.RSA_PSS would be checking the algorithm OID 1.2.840.113549.1.1.11 sha256WithRSAEncryption (PKCS # 1) ?

Or refers to this other OID 1.2.840.113549.1.1.10 rsaPSS (PKCS # 1)?

I am needing to check the first case with the algorithm sha256WithRSAEncryption, Is this possible ?