Skip to main content

Module rsassa_pkcs1_v15_verify

Module rsassa_pkcs1_v15_verify 

Source
Expand description

RSASSA-PKCS1-v1_5 verification-key minting (RFC 8017 §8.2), as the Web Cryptography API serves it.

The variant binds the digest at mint — WebCrypto’s own model for RSA (RsaHashedImportParams). Keys report algorithm-name "RSASSA-PKCS1-v1_5", the variant’s digest (algorithm-hash), and the modulus length (algorithm-length).

Security:

  • Verification is strict: the EMSA-PKCS1-v1_5 encoding is compared byte-exact, so a signature carrying BER laxities in its DigestInfo or mis-sized padding fails error.authentication-failed.

Functions§

import_verifying_key_jwk
Import a public key as an RSA public JWK (kty: "RSA", with n and e). jwk is the JWK as JSON text; see mac-key.export-key-jwk for the package-wide JWK contract. An alg member, when present, must be the variant’s JOSE alg ("RS256", "RS384", or "RS512").
import_verifying_key_spki
Import a public key as an X.509 SubjectPublicKeyInfo (DER). Admission follows the family contract (see rsa).

Type Aliases§

Error
RsaVariant
VerifyingKey