MCPcopy Create free account

hub / github.com/RustCrypto/RSA / functions

Functions365 in github.com/RustCrypto/RSA

↓ 29 callersMethodclone
(&self)
src/pss/verifying_key.rs:147
↓ 18 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:20
↓ 15 callersMethodas_ref
(&self)
src/key.rs:103
↓ 14 callersFunctionget_private_key
()
src/pkcs1v15.rs:289
↓ 13 callersFunctionget_private_key
()
src/pss.rs:307
↓ 12 callersMethodn
(&self)
src/key.rs:179
↓ 12 callersMethodn_bits_precision
Returns precision (in bits) of `n`.
src/traits/keys.rs:28
↓ 11 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:662
↓ 11 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:541
↓ 8 callersFunctionrsa_encrypt
(key: &K, m: &BoxedUint)
src/algorithms/rsa.rs:22
↓ 8 callersMethodverify
(mut self, pub_key: &RsaPublicKey, hashed: &[u8], sig: &[u8])
src/pss.rs:123
↓ 7 callersFunctionrsa_decrypt_and_check
( priv_key: &impl PrivateKeyParts, rng: Option<&mut R>, c: &BoxedUint, )
src/algorithms/rsa.rs:156
↓ 7 callersMethodverifying_key
(&self)
src/pss/signing_key.rs:261
↓ 6 callersFunctioncheck_public
(public_key: &impl PublicKeyParts)
src/key.rs:708
↓ 6 callersFunctionuint_to_be_pad
(input: BoxedUint, padded_len: usize)
src/algorithms/pad.rs:25
↓ 6 callersFunctionuint_to_zeroizing_be_pad
(input: BoxedUint, padded_len: usize)
src/algorithms/pad.rs:34
↓ 5 callersMethode
(&self)
src/key.rs:183
↓ 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:34
↓ 5 callersMethodsign
( self, rng: Option<&mut Rng>, priv_key: &RsaPrivateKey, hashed: &[u8], )
src/pkcs1v15.rs:115
↓ 4 callersMethodclone
(&self)
src/pkcs1v15/verifying_key.rs:145
↓ 4 callersFunctionget_private_key
()
src/oaep.rs:337
↓ 4 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
↓ 4 callersMethodto_pkcs1_der
(&self)
src/encoding.rs:89
↓ 4 callersMethodtry_fill_bytes
(&mut self, _: &mut [u8])
src/dummy_rng.rs:19
↓ 4 callersFunctionverify
( pub_key: &RsaPublicKey, hashed: &[u8], sig: &BoxedUint, sig_len: usize, digest: &mut D,
src/pss.rs:145
↓ 4 callersMethodverify_digest
( &self, f: F, signature: &Signature, )
src/pss/verifying_key.rs:77
↓ 4 callersMethodverify_prehash
(&self, prehash: &[u8], signature: &Signature)
src/pss/verifying_key.rs:98
↓ 3 callersFunctioncompute_modulus
Compute the modulus of a key from its primes.
src/algorithms/rsa.rs:329
↓ 3 callersMethoddecrypt
( self, rng: Option<&mut Rng>, priv_key: &RsaPrivateKey, ciphertext: &[u8],
src/pkcs1v15.rs:59
↓ 3 callersMethoddecrypt
( mut self, rng: Option<&mut Rng>, priv_key: &RsaPrivateKey, ciphertext: &[u8]
src/oaep.rs:149
↓ 3 callersMethodencrypt
( mut self, rng: &mut Rng, pub_key: &RsaPublicKey, msg: &[u8], )
src/oaep.rs:165
↓ 3 callersMethodencrypt_with_rng
(&self, rng: &mut R, msg: &[u8])
src/oaep/encrypting_key.rs:57
↓ 3 callersFunctionget_label
(rng: &mut ChaCha8Rng)
src/oaep.rs:399
↓ 3 callersFunctionleft_pad
(input: &[u8], padded_len: usize)
src/algorithms/pad.rs:11
↓ 3 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:42
↓ 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:189
↓ 3 callersMethodsign
Sign the given digest.
src/key.rs:648
↓ 3 callersMethodsign_prehash_with_rng
( &self, rng: &mut R, prehash: &[u8], )
src/pss/signing_key.rs:154
↓ 3 callersMethodverify
(self, pub_key: &RsaPublicKey, hashed: &[u8], sig: &[u8])
src/pkcs1v15.rs:130
↓ 2 callersMethodas_ref
(&self)
src/pss/signing_key.rs:203
↓ 2 callersFunctioncheck_public_skip_exponent_size
(n: &BoxedUint, e: &BoxedUint)
src/key.rs:738
↓ 2 callersFunctioncheck_public_with_max_size
(n: &BoxedUint, e: &BoxedUint, max_size: Option<usize>)
src/key.rs:714
↓ 2 callersFunctioncompute_private_exponent_euler_totient
( primes: &[BoxedUint], exp: &BoxedUint, )
src/algorithms/rsa.rs:341
↓ 2 callersMethodd
(&self)
src/key.rs:673
↓ 2 callersFunctiondecrypt
( rng: Option<&mut R>, priv_key: &RsaPrivateKey, ciphertext: &[u8], )
src/pkcs1v15.rs:172
↓ 2 callersFunctiondecrypt
( rng: Option<&mut R>, priv_key: &RsaPrivateKey, ciphertext: &[u8], digest: &mut D, mgf_di
src/oaep.rs:260
↓ 2 callersMethoddecrypt
Decrypt the given message.
src/key.rs:631
↓ 2 callersMethoddecrypt_blinded
Decrypt the given message. Uses `rng` to blind the decryption process.
src/key.rs:638
↓ 2 callersFunctiondecrypt_inner
( em: &mut [u8], h_size: usize, expected_p_hash: &[u8], k: usize, mut mgf: MGF, )
src/algorithms/oaep.rs:216
↓ 2 callersMethoddecrypt_with_rng
( &self, rng: &mut R, ciphertext: &[u8], )
src/oaep/decrypting_key.rs:72
↓ 2 callersFunctionemsa_pss_get_salt_len
Detect salt length by scanning DB for the 0x01 separator byte. Returns (s_len, valid) where s_len is 0 on failure.
src/algorithms/pss.rs:235
↓ 2 callersFunctionemsa_pss_verify_pre
( m_hash: &[u8], em: &'a mut [u8], em_bits: usize, s_len: Option<usize>, h_len: usize, )
src/algorithms/pss.rs:172
↓ 2 callersFunctionemsa_pss_verify_salt
(db: &[u8], em_len: usize, s_len: usize, h_len: usize)
src/algorithms/pss.rs:222
↓ 2 callersFunctionencrypt
( rng: &mut R, pub_key: &RsaPublicKey, msg: &[u8], )
src/pkcs1v15.rs:150
↓ 2 callersFunctionencrypt
( rng: &mut R, pub_key: &RsaPublicKey, msg: &[u8], digest: &mut D, mgf_digest: &mut MGD,
src/oaep.rs:200
↓ 2 callersFunctionencrypt_internal
( rng: &mut R, msg: &[u8], p_hash: &[u8], h_size: usize, k: usize, mut mgf: MGF, )
src/algorithms/oaep.rs:22
↓ 2 callersMethodfail
(&mut self, test: Test, res: Option<SignatureError>)
tests/wycheproof.rs:89
↓ 2 callersFunctionget_key
()
benches/key.rs:22
↓ 2 callersMethodgroup
(&mut self, group: &TestGroup)
tests/wycheproof.rs:100
↓ 2 callersFunctioninc_counter
(counter: &mut [u8; 4])
src/algorithms/mgf.rs:70
↓ 2 callersMethodn_params
(&self)
src/key.rs:187
↓ 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:41
↓ 2 callersFunctionpow_mod_params_vartime_exp_bits
Computes `base.pow_mod(exp, n)` with a bounded exponent and precomputed `n_params`. The exponent bit length `exp_bits` may be leaked in the time patt
src/algorithms/rsa.rs:242
↓ 2 callersMethodprecompute
Performs some calculations to speed up private key operations.
src/key.rs:546
↓ 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:261
↓ 2 callersFunctionreduce_vartime
(n: &BoxedUint, p: &BoxedMontyParams)
src/algorithms/rsa.rs:252
↓ 2 callersMethodstart
(&mut self, test: &Test)
tests/wycheproof.rs:105
↓ 2 callersMethodto_pkcs8_der
(&self)
src/encoding.rs:198
↓ 2 callersMethodto_public_key_der
(&self)
src/encoding.rs:211
↓ 2 callersMethodtry_sign_digest_with_rng
( &self, rng: &mut R, f: F, )
src/pss/signing_key.rs:102
↓ 2 callersMethodvalidate
Performs basic sanity checks on the key. Returns `Ok(())` if everything is good, otherwise an appropriate error.
src/key.rs:624
↓ 2 callersFunctionvalidate_private_key_parts
Helper function that validates the private key structure and cryptographic correctness. This performs the structural and mathematical validation chec
src/key.rs:755
↓ 2 callersMethodverify
Verify a signed message. `hashed` must be the result of hashing the input using the hashing function passed in through `hash`. If the message is val
src/key.rs:209
↓ 2 callersFunctionverify_algorithm_id
Verify that the `AlgorithmIdentifier` for a key is correct.
src/encoding.rs:153
↓ 2 callersMethodzeroize
(&mut self)
src/traits/keys.rs:82
↓ 1 callersFunctionblind
Returns the blinded c, along with the unblinding factor.
src/algorithms/rsa.rs:175
↓ 1 callersFunctioncompute_private_exponent_carmicheal
( p: &BoxedUint, q: &BoxedUint, exp: &BoxedUint, )
src/algorithms/rsa.rs:374
↓ 1 callersMethodcrt_coefficient
Compute CRT coefficient: `(1/q) mod p`.
src/key.rs:615
↓ 1 callersFunctiondecrypt_inner
(em: Vec<u8>, k: usize)
src/algorithms/pkcs1v15.rs:85
↓ 1 callersMethoddp
(&self)
src/key.rs:681
↓ 1 callersMethoddq
(&self)
src/key.rs:685
↓ 1 callersFunctionemsa_pss_encode
( m_hash: &[u8], em_bits: usize, salt: &[u8], hash: &mut D, )
src/algorithms/pss.rs:19
↓ 1 callersFunctionemsa_pss_verify
( m_hash: &[u8], em: &mut [u8], s_len: Option<usize>, hash: &mut D, key_bits: usize, )
src/algorithms/pss.rs:270
↓ 1 callersMethodencrypting_key
(&self)
src/pkcs1v15/decrypting_key.rs:47
↓ 1 callersFunctiongenerate_prime_with_rng
(rng: &mut R, bit_length: u32)
src/algorithms/generate.rs:123
↓ 1 callersFunctionoaep_decrypt
( em: &mut [u8], digest: &mut D, mgf_digest: &mut MGD, label: Option<Box<[u8]>>, k: usize,
src/algorithms/oaep.rs:135
↓ 1 callersFunctionoaep_encrypt
( rng: &mut R, msg: &[u8], digest: &mut D, mgf_digest: &mut MGD, label: Option<Box<[u8]>>,
src/algorithms/oaep.rs:60
↓ 1 callersMethodp_params
(&self)
src/key.rs:697
↓ 1 callersFunctionpkcs1v15_encrypt_unpad
(em: Vec<u8>, k: usize)
src/algorithms/pkcs1v15.rs:70
↓ 1 callersFunctionpkcs1v15_sign_pad
(prefix: &[u8], hashed: &[u8], k: usize)
src/algorithms/pkcs1v15.rs:120
↓ 1 callersFunctionpkcs1v15_sign_unpad
(prefix: &[u8], hashed: &[u8], em: &[u8], k: usize)
src/algorithms/pkcs1v15.rs:139
↓ 1 callersFunctionpow_mod_params
Computes `base.pow_mod(exp, n)` with precomputed `n_params`.
src/algorithms/rsa.rs:234
↓ 1 callersMethodprimes
(&self)
src/key.rs:677
↓ 1 callersMethodq_params
(&self)
src/key.rs:701
↓ 1 callersMethodqinv
(&self)
src/key.rs:689
↓ 1 callersFunctionrsa_decrypt
( rng: Option<&mut R>, priv_key: &impl PrivateKeyParts, c: &BoxedUint, )
src/algorithms/rsa.rs:37
↓ 1 callersFunctionsign
( rng: Option<&mut R>, priv_key: &RsaPrivateKey, prefix: &[u8], hashed: &[u8], )
src/pkcs1v15.rs:200
↓ 1 callersMethodsign_prehash
(&self, prehash: &[u8])
src/pss/signing_key.rs:170
↓ 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:229
next →1–100 of 365, ranked by callers