MCPcopy Create free account

hub / github.com/RustCrypto/RSA / functions

Functions285 in github.com/RustCrypto/RSA

↓ 30 callersMethodsize
Returns the modulus size in bytes. Raw signatures and ciphertexts for or by this public key will have the same size.
src/traits/keys.rs:16
↓ 27 callersMethodclone
(&self)
src/pss/verifying_key.rs:124
↓ 22 callersMethodn
(&self)
src/key.rs:135
↓ 14 callersFunctionget_private_key
()
src/pkcs1v15.rs:289
↓ 12 callersFunctionget_private_key
()
src/pss.rs:266
↓ 11 callersMethode
(&self)
src/key.rs:139
↓ 11 callersMethodfill_bytes
(&mut self, _: &mut [u8])
src/dummy_rng.rs:17
↓ 10 callersMethodsign_with_rng
Sign the given digest using the provided `rng`, which is used in the following ways depending on the [`SignatureScheme`]: - [`Pkcs1v15Sign`][`crate::
src/key.rs:452
↓ 9 callersMethodas_ref
(&self)
src/key.rs:63
↓ 8 callersFunctionrsa_encrypt
(key: &K, m: &BigUint)
src/algorithms/rsa.rs:21
↓ 8 callersFunctionuint_to_be_pad
(input: BigUint, padded_len: usize)
src/algorithms/pad.rs:23
↓ 7 callersFunctioncheck_public
(public_key: &impl PublicKeyParts)
src/key.rs:495
↓ 7 callersFunctionrsa_decrypt_and_check
( priv_key: &impl PrivateKeyParts, rng: Option<&mut R>, c: &BigUint, )
src/algorithms/rsa.rs:135
↓ 7 callersMethodverify
(mut self, pub_key: &RsaPublicKey, hashed: &[u8], sig: &[u8])
src/pss.rs:104
↓ 7 callersMethodverifying_key
(&self)
src/pss/signing_key.rs:213
↓ 6 callersFunctionmgf1_xor
Mask generation function. Panics if out is larger than 2**32. This is in accordance with RFC 8017 - PKCS #1 B.2.1
src/algorithms/mgf.rs:8
↓ 6 callersMethodto_public_key
Get the public key from the private key, cloning `n` and `e`. Generally this is not needed since `RsaPrivateKey` implements the `PublicKey` trait, bu
src/key.rs:325
↓ 6 callersFunctionuint_to_zeroizing_be_pad
(input: BigUint, padded_len: usize)
src/algorithms/pad.rs:29
↓ 5 callersMethodas_ref
(&self)
src/pss/signing_key.rs:158
↓ 5 callersMethodencrypt
( mut self, rng: &mut Rng, pub_key: &RsaPublicKey, msg: &[u8], )
src/oaep.rs:150
↓ 5 callersFunctiongenerate_multi_prime_key_with_exp
Generates a multi-prime RSA keypair of the given bit size, public exponent, and the given random source, as suggested in [1]. Although the public keys
src/algorithms/generate.rs:33
↓ 5 callersFunctionleft_pad
(input: &[u8], padded_len: usize)
src/algorithms/pad.rs:11
↓ 5 callersFunctionmgf1_xor_digest
Mask generation function. Panics if out is larger than 2**32. This is in accordance with RFC 8017 - PKCS #1 B.2.1
src/algorithms/mgf.rs:39
↓ 5 callersMethodnext_u32
(&mut self)
src/dummy_rng.rs:9
↓ 5 callersMethodprimes
(&self)
src/key.rs:467
↓ 5 callersMethodsign
( self, rng: Option<&mut Rng>, priv_key: &RsaPrivateKey, hashed: &[u8], )
src/pkcs1v15.rs:104
↓ 5 callersMethodzeroize
(&mut self)
src/traits/keys.rs:54
↓ 4 callersMethodd
(&self)
src/key.rs:463
↓ 4 callersMethodencrypt_with_rng
( &self, rng: &mut R, msg: &[u8], )
src/oaep/encrypting_key.rs:57
↓ 4 callersFunctionget_private_key
()
src/oaep.rs:305
↓ 4 callersFunctionverify
( pub_key: &RsaPublicKey, hashed: &[u8], sig: &BigUint, sig_len: usize, digest: &mut dyn D
src/pss.rs:126
↓ 4 callersMethodverify_digest
(&self, digest: D, signature: &Signature)
src/pss/verifying_key.rs:53
↓ 4 callersMethodverify_prehash
(&self, prehash: &[u8], signature: &Signature)
src/pss/verifying_key.rs:69
↓ 4 callersMethodzeroize
(&mut self)
src/key.rs:103
↓ 3 callersMethodclone
(&self)
src/pkcs1v15/verifying_key.rs:145
↓ 3 callersFunctioncompute_modulus
Compute the modulus of a key from its primes.
src/algorithms/rsa.rs:249
↓ 3 callersMethoddecrypt
( self, rng: Option<&mut Rng>, priv_key: &RsaPrivateKey, ciphertext: &[u8],
src/pkcs1v15.rs:40
↓ 3 callersMethoddecrypt
( mut self, rng: Option<&mut Rng>, priv_key: &RsaPrivateKey, ciphertext: &[u8]
src/oaep.rs:134
↓ 3 callersFunctionget_label
(rng: &mut ChaCha8Rng)
src/oaep.rs:367
↓ 3 callersFunctionsign
SignPSS calculates the signature of hashed using RSASSA-PSS. Note that hashed must be the result of hashing the input message using the given hash fu
src/pss.rs:167
↓ 3 callersMethodsign_prehash_with_rng
( &self, rng: &mut impl CryptoRngCore, prehash: &[u8], )
src/pss/signing_key.rs:119
↓ 3 callersMethodverify
(self, pub_key: &RsaPublicKey, hashed: &[u8], sig: &[u8])
src/pkcs1v15.rs:119
↓ 2 callersFunctioncheck_public_with_max_size
( public_key: &impl PublicKeyParts, max_size: Option<usize>, )
src/key.rs:501
↓ 2 callersFunctioncompute_private_exponent_euler_totient
( primes: &[BigUint], exp: &BigUint, )
src/algorithms/rsa.rs:256
↓ 2 callersFunctiondecrypt
( rng: Option<&mut R>, priv_key: &RsaPrivateKey, ciphertext: &[u8], )
src/pkcs1v15.rs:162
↓ 2 callersFunctiondecrypt
( rng: Option<&mut R>, priv_key: &RsaPrivateKey, ciphertext: &[u8], digest: &mut dyn DynDigest
src/oaep.rs:235
↓ 2 callersMethoddecrypt
Decrypt the given message.
src/key.rs:421
↓ 2 callersMethoddecrypt_blinded
Decrypt the given message. Uses `rng` to blind the decryption process.
src/key.rs:428
↓ 2 callersFunctiondecrypt_inner
( em: &mut [u8], h_size: usize, expected_p_hash: &[u8], k: usize, mut mgf: MGF, )
src/algorithms/oaep.rs:199
↓ 2 callersMethoddecrypt_with_rng
( &self, rng: &mut R, ciphertext: &[u8], )
src/oaep/decrypting_key.rs:77
↓ 2 callersFunctionemsa_pss_verify_pre
( m_hash: &[u8], em: &'a mut [u8], em_bits: usize, s_len: usize, h_len: usize, )
src/algorithms/pss.rs:169
↓ 2 callersFunctionemsa_pss_verify_salt
(db: &[u8], em_len: usize, s_len: usize, h_len: usize)
src/algorithms/pss.rs:217
↓ 2 callersFunctionencrypt
( rng: &mut R, pub_key: &RsaPublicKey, msg: &[u8], )
src/pkcs1v15.rs:140
↓ 2 callersFunctionencrypt
( rng: &mut R, pub_key: &RsaPublicKey, msg: &[u8], digest: &mut dyn DynDigest, mgf_digest:
src/oaep.rs:185
↓ 2 callersFunctionencrypt_internal
( rng: &mut R, msg: &[u8], p_hash: &[u8], h_size: usize, k: usize, mut mgf: MGF, )
src/algorithms/oaep.rs:19
↓ 2 callersFunctionget_key
()
benches/key.rs:16
↓ 2 callersFunctioninc_counter
(counter: &mut [u8; 4])
src/algorithms/mgf.rs:67
↓ 2 callersFunctionnon_zero_random_bytes
(rng: &mut R, data: &mut [u8])
src/algorithms/pkcs1v15.rs:21
↓ 2 callersFunctionpkcs1v15_encrypt_pad
Applied the padding scheme from PKCS#1 v1.5 for encryption. The message must be no longer than the length of the public modulus minus 11 bytes.
src/algorithms/pkcs1v15.rs:36
↓ 2 callersFunctionrecover_primes
The following (deterministic) algorithm also recovers the prime factors `p` and `q` of a modulus `n`, given the public exponent `e` and private expone
src/algorithms/rsa.rs:202
↓ 2 callersMethodsign
Sign the given digest.
src/key.rs:438
↓ 2 callersMethodto_pkcs8_der
(&self)
src/encoding.rs:66
↓ 2 callersMethodto_public_key_der
(&self)
src/encoding.rs:103
↓ 2 callersMethodvalidate
Performs basic sanity checks on the key. Returns `Ok(())` if everything is good, otherwise an appropriate error.
src/key.rs:387
↓ 2 callersFunctionverify_algorithm_id
Verify that the `AlgorithmIdentifier` for a key is correct.
src/encoding.rs:15
↓ 1 callersFunctionblind
Returns the blinded c, along with the unblinding factor.
src/algorithms/rsa.rs:154
↓ 1 callersFunctioncompute_private_exponent_carmicheal
( p: &BigUint, q: &BigUint, exp: &BigUint, )
src/algorithms/rsa.rs:289
↓ 1 callersMethodcrt_coefficient
Compute CRT coefficient: `(1/q) mod p`.
src/key.rs:381
↓ 1 callersMethodcrt_values
(&self)
src/key.rs:483
↓ 1 callersFunctiondecrypt_inner
(em: Vec<u8>, k: usize)
src/algorithms/pkcs1v15.rs:80
↓ 1 callersMethoddp
(&self)
src/key.rs:471
↓ 1 callersMethoddq
(&self)
src/key.rs:475
↓ 1 callersFunctionemsa_pss_encode
( m_hash: &[u8], em_bits: usize, salt: &[u8], hash: &mut dyn DynDigest, )
src/algorithms/pss.rs:19
↓ 1 callersFunctionemsa_pss_verify
( m_hash: &[u8], em: &mut [u8], s_len: usize, hash: &mut dyn DynDigest, key_bits: usize, )
src/algorithms/pss.rs:230
↓ 1 callersMethodencrypting_key
(&self)
src/pkcs1v15/decrypting_key.rs:44
↓ 1 callersFunctionoaep_decrypt
( em: &mut [u8], digest: &mut dyn DynDigest, mgf_digest: &mut dyn DynDigest, label: Option<Str
src/algorithms/oaep.rs:126
↓ 1 callersFunctionoaep_encrypt
( rng: &mut R, msg: &[u8], digest: &mut dyn DynDigest, mgf_digest: &mut dyn DynDigest, lab
src/algorithms/oaep.rs:57
↓ 1 callersFunctionpkcs1v15_encrypt_unpad
(em: Vec<u8>, k: usize)
src/algorithms/pkcs1v15.rs:65
↓ 1 callersFunctionpkcs1v15_sign_pad
(prefix: &[u8], hashed: &[u8], k: usize)
src/algorithms/pkcs1v15.rs:116
↓ 1 callersFunctionpkcs1v15_sign_unpad
(prefix: &[u8], hashed: &[u8], em: &[u8], k: usize)
src/algorithms/pkcs1v15.rs:135
↓ 1 callersMethodprecompute
Performs some calculations to speed up private key operations.
src/key.rs:330
↓ 1 callersMethodqinv
(&self)
src/key.rs:479
↓ 1 callersFunctionrsa_decrypt
( mut rng: Option<&mut R>, priv_key: &impl PrivateKeyParts, c: &BigUint, )
src/algorithms/rsa.rs:34
↓ 1 callersFunctionsign
( rng: Option<&mut R>, priv_key: &RsaPrivateKey, prefix: &[u8], hashed: &[u8], )
src/pkcs1v15.rs:189
↓ 1 callersMethodsign_prehash
(&self, prehash: &[u8])
src/pss/signing_key.rs:135
↓ 1 callersFunctionsign_pss_with_salt
signPSSWithSalt calculates the signature of hashed using PSS with specified salt. Note that hashed must be the result of hashing the input message us
src/pss.rs:199
↓ 1 callersFunctiontest_key_basics
(private_key: &RsaPrivateKey)
src/key.rs:562
↓ 1 callersMethodtry_sign_digest_with_rng
( &self, rng: &mut impl CryptoRngCore, digest: D, )
src/pss/signing_key.rs:91
↓ 1 callersMethodtry_sign_with_rng
( &self, rng: &mut impl CryptoRngCore, msg: &[u8], )
src/pss/signing_key.rs:106
↓ 1 callersFunctionunblind
Given an m and and unblinding factor, unblind the m.
src/algorithms/rsa.rs:195
↓ 1 callersFunctionverify
( pub_key: &RsaPublicKey, prefix: &[u8], hashed: &[u8], sig: &BigUint, sig_len: usize, )
src/pkcs1v15.rs:205
Methodas_ref
(&self)
src/pss/verifying_key.rs:105
Methodas_ref
(&self)
src/pss/blinded_signing_key.rs:136
Methodas_ref
(&self)
src/pkcs1v15/verifying_key.rs:126
Methodas_ref
(&self)
src/pkcs1v15/signing_key.rs:175
Functionbench_rsa_2048_pkcsv1_decrypt
(b: &mut Bencher)
benches/key.rs:29
Functionbench_rsa_2048_pkcsv1_sign_blinded
(b: &mut Bencher)
benches/key.rs:40
Functionbuild_key_from_p_q
()
src/key.rs:824
Functionbuild_key_from_primes
()
src/key.rs:803
Methodclear_precomputed
Clears precomputed values by setting to None
src/key.rs:376
next →1–100 of 285, ranked by callers