MCPcopy Create free account

hub / github.com/RustCrypto/RSA / functions

Functions529 in github.com/RustCrypto/RSA

↓ 49 callersMethodclone
(&self)
src/pss/verifying_key.rs:151
↓ 30 callersMethodas_ref
(&self)
src/private_key.rs:75
↓ 23 callersMethodsize
Returns `k`, the modulus length in octets from RFC8017: `ceil(modBits / 8)`. Ciphertexts and signatures have this length, including any leading zero
src/traits/keys.rs:23
↓ 18 callersMethodn
(&self)
src/public_key.rs:190
↓ 17 callersFunctionget_private_key
()
src/pkcs1v15.rs:500
↓ 16 callersMethodto_public_key
(&self)
src/private_key.rs:469
↓ 15 callersMethodn_bits_precision
Returns the limb-aligned storage precision of `n` in bits. This can exceed the modulus bit length (`modBits` in RFC8017). Use this precision for inte
src/traits/keys.rs:34
↓ 14 callersMethodsign_with_rng
( &self, rng: &mut R, padding: S, digest_in: &[u8], )
src/private_key.rs:607
↓ 13 callersFunctionget_private_key
()
src/pss.rs:438
↓ 11 callersMethodas_ref
(&self)
src/pss/signing_key.rs:225
↓ 11 callersFunctionos2ip
(input: &[u8], bits_precision: u32)
src/algorithms/pad.rs:85
↓ 10 callersFunctioni2osp
(input: BoxedUint, padded_len: usize)
src/algorithms/pad.rs:40
↓ 9 callersFunctioni2osp_zeroizing
(input: BoxedUint, padded_len: usize)
src/algorithms/pad.rs:62
↓ 8 callersFunctionrsa_decrypt_and_check
( priv_key: &impl PrivateKeyParts, rng: Option<&mut R>, c: &BoxedUint, )
src/algorithms/rsa.rs:188
↓ 7 callersFunctionreset
Initialize the cursor explicitly: BINSEC starts at each checkct entrypoint, without running startup code or initializing .bss. # Safety No allocation
checkct/driver/src/allocator.rs:53
↓ 7 callersFunctionrsa_encrypt
(key: &K, m: &BoxedUint)
src/algorithms/rsa.rs:34
↓ 7 callersFunctionto_monty
Convert any input precision to Montgomery form. Loop counts and allocations depend only on buffer precisions, which callers must choose independently
src/algorithms/reduction.rs:10
↓ 7 callersMethodverify
(mut self, pub_key: &PublicKey, hashed: &[u8], sig: &[u8])
src/pss.rs:240
↓ 6 callersFunctioncheck_public
(public_key: &impl PublicKeyParts)
src/public_key.rs:227
↓ 6 callersMethodprimes
(&self)
src/private_key.rs:646
↓ 6 callersMethodto_pkcs1_der
(&self)
src/encoding.rs:93
↓ 6 callersMethodtry_fill_bytes
(&mut self, bytes: &mut [u8])
src/algorithms/blinding.rs:118
↓ 6 callersMethodvalidate
(&self)
src/private_key.rs:533
↓ 6 callersMethodverify
(self, _: &PublicKey, _: &[u8], _: &[u8])
tests/signing_blinding.rs:120
↓ 5 callersMethodclear_precomputed
Clears precomputed values by setting to None
src/private_key.rs:518
↓ 5 callersMethoddecrypt
(&self, padding: P, ciphertext: &[u8])
src/private_key.rs:549
↓ 5 callersMethode
(&self)
src/public_key.rs:194
↓ 5 callersFunctioneme_pkcs1v15_decode
(em: &[u8], k: usize)
src/algorithms/pkcs1v15/selection.rs:34
↓ 5 callersFunctionexample_private_key
()
tests/private_key.rs:10
↓ 5 callersFunctionexample_rng
()
tests/private_key.rs:17
↓ 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:35
↓ 5 callersMethodprecompute
Performs some calculations to speed up private key operations. # Errors Returns [`Error::InvalidPrime`] if either of the first two factors is one, or
src/private_key.rs:478
↓ 5 callersMethodsign
( self, rng: Option<&mut Rng>, priv_key: &PrivateKey, hashed: &[u8], )
src/pkcs1v15.rs:294
↓ 5 callersMethodverifying_key
(&self)
src/pss/signing_key.rs:283
↓ 4 callersFunctioncheck_key
(key: &PrivateKey)
tests/generate.rs:18
↓ 4 callersMethodclone
(&self)
src/pkcs1v15/verifying_key.rs:147
↓ 4 callersFunctioncompute_modulus
Compute the modulus of a key from its primes.
src/algorithms/rsa.rs:358
↓ 4 callersFunctiondecrypt
( rng: Option<&mut R>, priv_key: &PrivateKey, ciphertext: &[u8], digest: &mut D, mgf_diges
src/oaep.rs:340
↓ 4 callersMethoddecrypt
( self, rng: Option<&mut Rng>, priv_key: &PrivateKey, ciphertext: &[u8], )
src/pkcs1v15.rs:236
↓ 4 callersMethoddecrypt_blinded
( &self, rng: &mut R, padding: P, ciphertext: &[u8], )
src/private_key.rs:571
↓ 4 callersFunctionget_private_key
()
src/oaep.rs:418
↓ 4 callersFunctionmgf1_xor
Mask generation function. Panics if out is larger than 2**32. This is in accordance with RFC8017 - PKCS #1 B.2.1
src/algorithms/mgf.rs:8
↓ 4 callersFunctionos2ip_zeroizing
( input: Zeroizing<Vec<u8>>, bits_precision: u32, )
src/algorithms/pad.rs:103
↓ 4 callersFunctionrng
()
tests/generate.rs:14
↓ 4 callersMethodsign
( self, rng: Option<&mut R>, _: &PrivateKey, _: &[u8],
tests/signing_blinding.rs:111
↓ 4 callersFunctionsign_with_default_rng
Sign with the default source of blinding randomness, when enabled.
src/pkcs1v15.rs:387
↓ 4 callersMethodstart
(&mut self, test: &Test)
tests/wycheproof.rs:115
↓ 4 callersFunctionverify
( pub_key: &PublicKey, hashed: &[u8], sig: &[u8], digest: &mut D, salt_len: Option<usize>,
src/pss.rs:255
↓ 3 callersFunctionblind_exponent
Return `exponent + b * totient` for a fresh, uniformly random 128-bit `b`. This meets the minimum of 64 bits or two machine words in CFRG RSA guidanc
src/algorithms/blinding.rs:18
↓ 3 callersFunctionblind_modulus
Multiply a CRT prime by a fresh random odd factor, using public storage widths. With `r` uniform over 128 bits, `g = 2*r + 1` is positive and odd and
src/algorithms/blinding.rs:41
↓ 3 callersMethodd
(&self)
src/private_key.rs:642
↓ 3 callersFunctiondecrypt
( rng: Option<&mut R>, priv_key: &PrivateKey, ciphertext: &[u8], )
src/pkcs1v15.rs:343
↓ 3 callersMethoddecrypt
( mut self, rng: Option<&mut Rng>, priv_key: &PrivateKey, ciphertext: &[u8],
src/oaep.rs:229
↓ 3 callersFunctiondecrypt_inner
( em: &mut [u8], h_size: usize, expected_p_hash: &[u8], k: usize, mut mgf: MGF, )
src/algorithms/oaep.rs:216
↓ 3 callersMethoddecrypt_with_rng
( &self, rng: &mut R, ciphertext: &[u8], )
src/oaep/decrypting_key.rs:90
↓ 3 callersFunctionencrypt
( rng: &mut R, pub_key: &PublicKey, msg: &[u8], )
src/pkcs1v15.rs:324
↓ 3 callersMethodencrypt
( mut self, rng: &mut Rng, pub_key: &PublicKey, msg: &[u8], )
src/oaep.rs:245
↓ 3 callersMethodencrypt_with_rng
( &self, rng: &mut R, msg: &[u8], )
src/oaep/encrypting_key.rs:58
↓ 3 callersMethodfail
(&mut self, test: Test, res: impl Debug)
tests/wycheproof.rs:99
↓ 3 callersFunctionget_label
(rng: &mut ChaCha8Rng)
src/oaep.rs:480
↓ 3 callersMethodgroup
(&mut self, group: &TestGroup)
tests/wycheproof.rs:110
↓ 3 callersFunctionkey
()
tests/signing_blinding.rs:20
↓ 3 callersFunctionkey_and_coefficient
(reverse: bool)
tests/crt_coefficient.rs:10
↓ 3 callersFunctionmgf1_xor_digest
Mask generation function. Panics if out is larger than 2**32. This is in accordance with RFC8017 - PKCS #1 B.2.1
src/algorithms/mgf.rs:42
↓ 3 callersFunctionmodulus
Public-key construction checks the modulus size and parity, not its factorization.
tests/key_size.rs:12
↓ 3 callersFunctionprivate_key
()
tests/rfc8017.rs:16
↓ 3 callersFunctionselect_message
(em: &mut [u8], am: &[u8], al: u16, l: u32, check: Choice)
src/algorithms/pkcs1v15/selection.rs:63
↓ 3 callersFunctionsign
( rng: Option<&mut R>, priv_key: &PrivateKey, prefix: &[u8], hashed: &[u8], )
src/pkcs1v15.rs:411
↓ 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:315
↓ 3 callersMethodto_public_key_der
(&self)
src/encoding.rs:215
↓ 3 callersMethodtry_sign_with_rng
( &self, rng: &mut R, msg: &[u8], )
src/pss/signing_key.rs:143
↓ 3 callersMethodverify
(self, pub_key: &PublicKey, hashed: &[u8], sig: &[u8])
src/pkcs1v15.rs:309
↓ 3 callersMethodverify_digest
( &self, f: F, signature: &Signature, )
src/pss/verifying_key.rs:81
↓ 3 callersMethodverify_prehash
(&self, prehash: &[u8], signature: &Signature)
src/pss/verifying_key.rs:102
↓ 2 callersFunctionbe_pad_into
(bytes: &[u8], out: &mut [u8])
src/algorithms/pad.rs:13
↓ 2 callersFunctioncheck_coefficient
(reverse: bool)
tests/crt_coefficient.rs:45
↓ 2 callersFunctioncheck_encoded_coefficient
(reverse: bool)
tests/crt_coefficient.rs:63
↓ 2 callersFunctioncheck_pss
(key: &PublicKey, message: &[u8], bytes: &[u8], valid: bool)
tests/rfc8017.rs:48
↓ 2 callersFunctioncheck_public_skip_exponent_size
(n: &BoxedUint, e: &BoxedUint)
src/public_key.rs:257
↓ 2 callersFunctioncheck_public_with_max_size
(n: &BoxedUint, e: &BoxedUint, max_size: Option<usize>)
src/public_key.rs:233
↓ 2 callersFunctioncompute_private_exponent_euler_totient
( primes: &[BoxedUint], exp: &BoxedUint, )
src/algorithms/rsa.rs:370
↓ 2 callersFunctiondecode_signature
Performs the length, RSAVP1, and I2OSP steps of RFC8017 §8.1.2.
src/pss.rs:285
↓ 2 callersMethoddp
(&self)
src/private_key.rs:650
↓ 2 callersFunctionemsa_pss_get_salt_len
(db: &[u8], em_len: usize, h_len: usize)
src/algorithms/pss.rs:242
↓ 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:228
↓ 2 callersFunctionencrypt
( rng: &mut R, pub_key: &PublicKey, msg: &[u8], digest: &mut D, mgf_digest: &mut MGD,
src/oaep.rs:280
↓ 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 callersFunctiongenerate_prime_with_rng
Generate an odd prime with its top two bits set. # Panics Panics if `bit_length` is less than two.
src/algorithms/generate.rs:121
↓ 2 callersFunctionget_key
()
benches/key.rs:24
↓ 2 callersFunctioninc_counter
(counter: &mut [u8; 4])
src/algorithms/mgf.rs:70
↓ 2 callersMethodn
(&self)
src/private_key.rs:130
↓ 2 callersMethodn_params
(&self)
src/public_key.rs:198
↓ 2 callersFunctionnon_zero_random_bytes
( rng: &mut R, data: &mut [u8], )
src/algorithms/pkcs1v15.rs:26
↓ 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:46
↓ 2 callersMethodpkcs1v15_encrypt_with_rng
Encrypt `plaintext` using PKCS#1 v1.5 and the provided RNG. Prefer [`Self::oaep_encrypt_with_rng`] for new protocols. See the [`crate::pkcs1v15`] mod
src/pkcs1v15.rs:78
↓ 2 callersFunctionpow_mod_blinded
Exponentiate modulo a fresh multiple of `p`, then return the residue modulo `p`. `exponent` may already be blinded using a multiple of `p - 1`. Reduc
src/algorithms/blinding.rs:61
↓ 2 callersFunctionpow_mod_params_vartime_exp_bits
Computes `base.pow_mod(exp, n)` with a bounded exponent and precomputed `n_params`. Constant-time with respect to `base`. The exponent bit length `ex
src/algorithms/rsa.rs:276
↓ 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:290
↓ 2 callersFunctionselect_al
Step 3.3: select AL from the 128 big-endian candidate lengths CL. `max_message_len` is the public bound k - 11, not k - 10.
src/algorithms/pkcs1v15/selection.rs:8
next →1–100 of 529, ranked by callers