Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

Module pkcs1v15

Module pkcs1v15 

Source
Expand description

PKCS#1 v1.5 support as described in RFC8017 § 8.2.

Warning

PKCS#1 v1.5 padding has a longstanding history of issues generally classed as Bleichenbacher Attacks which were originally discovered in 1998 but keep reappearing in various forms again and again over the course of decades, including most recently in the 2023 Marvin Attack, which the rsa crate is still vulnerable to.

These attacks can result in complete plaintext recovery for encryption, or signature forgery, leading to a total failure of either confidentiality or integrity.

Unless explicitly needed for compatibility reasons, we recommend against using PKCS#1 v1.5, and suggest using PSS or OAEP instead (if there is a requirement to use RSA).

§Usage

See code example in the toplevel rustdoc.

Structs§

DecryptingKey
Decryption key for PKCS#1 v1.5 decryption as described in RFC8017 § 7.2.
EncryptingKey
Encryption key for PKCS#1 v1.5 encryption as described in RFC8017 § 7.2.
Pkcs1v15Encrypt
Encryption using PKCS#1 v1.5 padding.
Pkcs1v15Sign
RSASSA-PKCS1-v1_5: digital signatures using PKCS#1 v1.5 padding.
Signature
RSASSA-PKCS1-v1_5 signatures as described in RFC8017 § 8.2.
SigningKey
Signing key for RSASSA-PKCS1-v1_5 signatures as described in RFC8017 § 8.2.
VerifyingKey
Verifying key for RSASSA-PKCS1-v1_5 signatures as described in RFC8017 § 8.2.

Traits§

RsaSignatureAssociatedOid
A trait which associates an RSA-specific OID with a type.