Home
last modified time | relevance | path

Searched refs:ciphertext (Results 1 – 6 of 6) sorted by relevance

/rust/bssl-crypto/src/
A Daead.rs87 ciphertext: &mut [u8], in open_in_place()
206 if ciphertext.len() < TAG_LEN {
225 ciphertext.as_ffi_ptr(),
226 ciphertext.len(),
243 ciphertext: &mut [u8],
255 ciphertext.as_ffi_ptr(),
256 ciphertext.len(),
303 ciphertext[0] ^= 1;
305 ciphertext[0] ^= 1;
357 ciphertext: Vec<u8>, field
[all …]
A Dmlkem.rs113 let mut ciphertext = Box::new_uninit_slice(CIPHERTEXT_BYTES_768); variables
120 ciphertext.as_mut_ptr() as *mut u8,
124 (ciphertext.assume_init().into(), shared_secret.assume_init())
196 bssl_sys::MLKEM768_decap(out, ciphertext.as_ffi_ptr(), ciphertext.len(), &*self.0)
232 let mut ciphertext = Box::new_uninit_slice(CIPHERTEXT_BYTES_1024); variables
239 ciphertext.as_mut_ptr() as *mut u8,
315 bssl_sys::MLKEM1024_decap(out, ciphertext.as_ffi_ptr(), ciphertext.len(), &*self.0)
330 let (ciphertext, shared_key) = public_key.encapsulate(); in basic_768()
332 let shared_key2 = private_key2.decapsulate(&ciphertext).unwrap(); in basic_768()
340 let (ciphertext, shared_key) = public_key.encapsulate(); in basic_1024()
[all …]
A Daes.rs162 let ciphertext = decode_hex("3ad77bb40d7a3660a89ecaf32466ef97"); in aes_128()
163 assert_eq!(ciphertext, EncryptKey::new_128(&key).encrypt(&plaintext)); in aes_128()
164 assert_eq!(plaintext, DecryptKey::new_128(&key).decrypt(&ciphertext)); in aes_128()
172 let ciphertext = decode_hex("f3eed1bdb5d2a03c064b5a7e3db181f8"); in aes_256()
173 assert_eq!(ciphertext, EncryptKey::new_256(&key).encrypt(&plaintext)); in aes_256()
174 assert_eq!(plaintext, DecryptKey::new_256(&key).decrypt(&ciphertext)); in aes_256()
A Dmacros.rs153 fn open(&self, nonce: &Self::Nonce, ciphertext: &[u8], ad: &[u8]) -> Option<Vec<u8>> {
154 self.0.open(nonce, ciphertext, ad)
160 ciphertext: &mut [u8],
164 self.0.open_in_place(nonce, ciphertext, tag, ad)
A Dhpke.rs425 pub fn open(&mut self, ciphertext: &[u8], aad: &[u8]) -> Option<Vec<u8>> { in open()
426 let max_out_len = ciphertext.len(); in open()
438 ciphertext.as_ffi_ptr(), in open()
439 ciphertext.len(), in open()
491 ciphertext: [u8; 45], // ct field
509ciphertext: decode_hex("f938558b5d72f1a23810b4be2ab4f84331acc02fc97babc53a52ae8218a355a96d8770ac83… in x25519_hkdf_sha256_hkdf_sha256_aes_128_gcm()
528ciphertext: decode_hex("1c5250d8034ec2b784ba2cfd69dbdb8af406cfe3ff938e131f0def8c8b60b4db21993c62ce… in x25519_hkdf_sha256_hkdf_sha256_chacha20_poly1305()
547ciphertext: decode_hex("5ad590bb8baa577f8619db35a36311226a896e7342a6d836d8b7bcd2f20b6c7f9076ac232e… in p256_hkdf_sha256_hkdf_sha256_aes_128_gcm()
661 let ciphertext = ctx.seal(&test.plaintext, &test.associated_data); in seal_with_vector()
662 assert_eq!(&ciphertext, test.ciphertext.as_ref()); in seal_with_vector()
[all …]
/rust/bssl-crypto/src/cipher/
A Daes_cbc.rs121 let ciphertext: [u8; 32] = in aes_128_cbc_test_decrypt()
124 .decrypt_padded(&ciphertext) in aes_128_cbc_test_decrypt()
137 let ciphertext: [u8; 16] = decode_hex("b10ab60153276941361000414aed0a9d"); in aes_128_cbc_test_decrypt_empty_message()
139 .decrypt_padded(&ciphertext) in aes_128_cbc_test_decrypt_empty_message()
186 let ciphertext: [u8; 16] = decode_hex("b90c326b72eb222ddb4dae47f2bc223c"); in aes_256_cbc_test_decrypt()
188 .decrypt_padded(&ciphertext) in aes_256_cbc_test_decrypt()

Completed in 20 milliseconds