Expand description
The Rivest, Shamir, Adelman (RSA) cryptosystem.
Structs§
- A private RSA key.
- A public RSA key.
Constants§
- ASN.1 OID for MD2
- ASN.1 OID for MD5
- ASN.1 OID for RipeMD160
- ASN.1 OID for SHA1
- ASN.1 OID for SHA224
- ASN.1 OID for SHA256
- ASN.1 OID for SHA384
- ASN.1 OID for SHA512
Traits§
- Marker trait for hash algorithms usable for PKCS#1 signatures.
- A hash function usable for PSS.
Functions§
- Decrypts
ciphertext
usingpublic
/private
. - Decrypts
ciphertext
usingpublic
/private
. - Encrypts
plaintext
usingpublic
, producingciphertext
. - Generates a fresh RSA key pair usable for signing and encryption.
- Creates a PKCS#1.5 padded RSA signature for
digest_info || digest
. - Signs the message hashed with
hash
usingpublic
/private
, producingsignature
. - Signs the message hashed by
hash
usingsalt
and the key pairpublic
/private
, producingsignature
. - Verifies a PKCS#1.5 padded RSA signature for
digest_info || digest
. - Verifies
signature
of the data hashed byhash
usingpublic
. - Verifies
signature
of the data hashed byhash
using a salt ofsalt_len
bytes and the keypublic
.