Skip to main content

Module algorithms

Module algorithms 

Source
Expand description

Building blocks for the schemes in RFC8017:

  • OAEP and PKCS#1 v1.5 encryption encoding/decoding operate on encoded-message octet strings.
  • EMSA-PSS and EMSA-PKCS1-v1_5 operate on encoded-message octet strings for signatures.
  • OS2IP and I2OSP convert between octet strings and integer representatives.
  • RSAEP/RSAVP1 use public-key arithmetic; RSADP/RSASP1 use private-key arithmetic.

Scheme boundaries enforce encoded lengths and representative ranges. The internal infallible I2OSP helpers require callers to establish that the integer fits in the requested width. For secret representatives, storage precision and conversion widths must be independent of the representative’s value; see pad::i2osp_zeroizing.

ModulesΒ§

blinding πŸ”’
Exponent and CRT modulus blinding for RSA private operations.
generate πŸ”’
Generate prime components for the RSA Private Key
mgf πŸ”’
Mask generation function common to both PSS and OAEP padding
oaep πŸ”’
Encryption and Decryption using OAEP padding.
pad πŸ”’
Conversion between integers and octet strings.
pkcs1v15 πŸ”’
PKCS#1 v1.5 support as described in RFC8017 Β§ 8.2.
pss πŸ”’
Support for the Probabilistic Signature Scheme (PSS) a.k.a. RSASSA-PSS.
reduction πŸ”’
Reduction modulo an odd, potentially secret modulus using fixed-width Montgomery arithmetic.
rsa πŸ”’
Shared integer arithmetic for RSAEP/RSAVP1 and RSADP/RSASP1 (RFC8017 Β§5).