Home
last modified time | relevance | path

Searched refs:derived_key (Results 1 – 7 of 7) sorted by relevance

/dragonfly/contrib/libarchive/libarchive/
H A Darchive_cryptor.c51 size_t salt_len, unsigned rounds, uint8_t *derived_key, in pbkdf2_sha1() argument
56 derived_key, derived_key_len); in pbkdf2_sha1()
67 size_t salt_len, unsigned rounds, uint8_t *derived_key, in pbkdf2_sha1() argument
81 (PUCHAR)derived_key, (ULONG)derived_key_len, 0); in pbkdf2_sha1()
92 size_t salt_len, unsigned rounds, uint8_t *derived_key, in pbkdf2_sha1() argument
121 size_t salt_len, unsigned rounds, uint8_t *derived_key, in pbkdf2_sha1() argument
124 salt_len, salt, derived_key_len, derived_key); in pbkdf2_sha1()
132 size_t salt_len, unsigned rounds, uint8_t *derived_key, in pbkdf2_sha1() argument
136 derived_key_len, derived_key); in pbkdf2_sha1()
145 size_t salt_len, unsigned rounds, uint8_t *derived_key, in pbkdf2_sha1() argument
[all …]
H A Darchive_write_set_format_zip.c1615 uint8_t derived_key[MAX_DERIVED_KEY_BUF_SIZE]; in init_winzip_aes_encryption() local
1638 salt, salt_len, 1000, derived_key, key_len * 2 + 2); in init_winzip_aes_encryption()
1640 ret = archive_encrypto_aes_ctr_init(&zip->cctx, derived_key, key_len); in init_winzip_aes_encryption()
1646 ret = archive_hmac_sha1_init(&zip->hctx, derived_key + key_len, in init_winzip_aes_encryption()
1656 salt[salt_len] = derived_key[key_len * 2]; in init_winzip_aes_encryption()
1657 salt[salt_len + 1] = derived_key[key_len * 2 + 1]; in init_winzip_aes_encryption()
1674 uint8_t derived_key[MAX_DERIVED_KEY_BUF_SIZE]; in is_winzip_aes_encryption_supported() local
1690 derived_key, key_len * 2 + 2); in is_winzip_aes_encryption_supported()
1694 ret = archive_encrypto_aes_ctr_init(&cctx, derived_key, key_len); in is_winzip_aes_encryption_supported()
1697 ret = archive_hmac_sha1_init(&hctx, derived_key + key_len, in is_winzip_aes_encryption_supported()
H A Darchive_cryptor_private.h173 size_t salt_len, unsigned rounds, uint8_t *derived_key,
H A Darchive_read_support_format_zip.c2862 uint8_t derived_key[MAX_DERIVED_KEY_BUF_SIZE]; in init_WinZip_AES_decryption() local
2890 memset(derived_key, 0, sizeof(derived_key)); in init_WinZip_AES_decryption()
2892 p, salt_len, 1000, derived_key, key_len * 2 + 2); in init_WinZip_AES_decryption()
2902 if (derived_key[key_len * 2] == pv[0] && in init_WinZip_AES_decryption()
2903 derived_key[key_len * 2 + 1] == pv[1]) in init_WinZip_AES_decryption()
2913 r = archive_decrypto_aes_ctr_init(&zip->cctx, derived_key, key_len); in init_WinZip_AES_decryption()
2919 r = archive_hmac_sha1_init(&zip->hctx, derived_key + key_len, key_len); in init_WinZip_AES_decryption()
/dragonfly/sys/crypto/
H A Dchachapoly.c261 uint8_t derived_key[CHACHA20POLY1305_KEY_SIZE]; in xchacha20poly1305_encrypt() local
265 hchacha20(derived_key, nonce, key); in xchacha20poly1305_encrypt()
272 derived_nonce, derived_key); in xchacha20poly1305_encrypt()
274 explicit_bzero(derived_key, sizeof(derived_key)); in xchacha20poly1305_encrypt()
283 uint8_t derived_key[CHACHA20POLY1305_KEY_SIZE]; in xchacha20poly1305_decrypt() local
287 hchacha20(derived_key, nonce, key); in xchacha20poly1305_decrypt()
293 derived_nonce, derived_key); in xchacha20poly1305_decrypt()
295 explicit_bzero(derived_key, sizeof(derived_key)); in xchacha20poly1305_decrypt()
/dragonfly/sys/crypto/chacha20/
H A Dchacha.c264 hchacha20(u8 derived_key[32], const u8 nonce[16], const u8 key[32]) in hchacha20()
297 U32TO8_LITTLE(derived_key + 0, x[0]); in hchacha20()
298 U32TO8_LITTLE(derived_key + 4, x[1]); in hchacha20()
299 U32TO8_LITTLE(derived_key + 8, x[2]); in hchacha20()
300 U32TO8_LITTLE(derived_key + 12, x[3]); in hchacha20()
301 U32TO8_LITTLE(derived_key + 16, x[12]); in hchacha20()
302 U32TO8_LITTLE(derived_key + 20, x[13]); in hchacha20()
303 U32TO8_LITTLE(derived_key + 24, x[14]); in hchacha20()
304 U32TO8_LITTLE(derived_key + 28, x[15]); in hchacha20()
H A Dchacha.h73 LOCAL void hchacha20(uint8_t derived_key[32], const uint8_t nonce[16],