| /linux/lib/crypto/tests/ |
| H A D | polyval_kunit.c | 41 static const u8 raw_key[POLYVAL_BLOCK_SIZE] = in test_polyval_rfc8452_testvec() local 57 polyval_preparekey(&key, raw_key); in test_polyval_rfc8452_testvec() 117 u8 raw_key[POLYVAL_BLOCK_SIZE]; in test_polyval_with_guarded_key() local 118 u8 *guarded_raw_key = &test_buf[TEST_BUF_LEN - sizeof(raw_key)]; in test_polyval_with_guarded_key() 124 rand_bytes(raw_key, sizeof(raw_key)); in test_polyval_with_guarded_key() 125 polyval_preparekey(&key1, raw_key); in test_polyval_with_guarded_key() 128 memcpy(guarded_raw_key, raw_key, sizeof(raw_key)); in test_polyval_with_guarded_key() 133 polyval_preparekey(guarded_key, raw_key); in test_polyval_with_guarded_key() 144 u8 raw_key[POLYVAL_BLOCK_SIZE]; in test_polyval_with_minimally_aligned_key() local 156 rand_bytes(raw_key, sizeof(raw_key)); in test_polyval_with_minimally_aligned_key() [all …]
|
| H A D | hash-test-template.h | 489 u8 *raw_key; in test_hmac() local 497 raw_key = &test_buf[4096]; in test_hmac() 499 rand_bytes_seeded_from_len(raw_key, 32); in test_hmac() 500 HMAC_PREPAREKEY(&key, raw_key, 32); in test_hmac() 514 rand_bytes_seeded_from_len(raw_key, key_len); in test_hmac() 515 HMAC_USINGRAWKEY(raw_key, key_len, test_buf, data_len, mac); in test_hmac() 519 HMAC_PREPAREKEY(&key, raw_key, key_len); in test_hmac()
|
| /linux/drivers/crypto/ccp/ |
| H A D | ccp-crypto-rsa.c | 130 struct rsa_key raw_key; in ccp_rsa_setkey() local 134 memset(&raw_key, 0, sizeof(raw_key)); in ccp_rsa_setkey() 138 ret = rsa_parse_priv_key(&raw_key, key, keylen); in ccp_rsa_setkey() 140 ret = rsa_parse_pub_key(&raw_key, key, keylen); in ccp_rsa_setkey() 145 raw_key.n, raw_key.n_sz); in ccp_rsa_setkey() 157 raw_key.e, raw_key.e_sz); in ccp_rsa_setkey() 165 raw_key.d, raw_key.d_sz); in ccp_rsa_setkey()
|
| /linux/include/crypto/ |
| H A D | sha2.h | 233 const u8 *raw_key, size_t raw_key_len); 263 const u8 *raw_key, size_t raw_key_len); 321 void hmac_sha224_usingrawkey(const u8 *raw_key, size_t raw_key_len, 437 const u8 *raw_key, size_t raw_key_len); 467 const u8 *raw_key, size_t raw_key_len); 525 void hmac_sha256_usingrawkey(const u8 *raw_key, size_t raw_key_len, 646 const u8 *raw_key, size_t raw_key_len); 676 const u8 *raw_key, size_t raw_key_len); 734 void hmac_sha384_usingrawkey(const u8 *raw_key, size_t raw_key_len, 821 const u8 *raw_key, size_t raw_key_len); [all …]
|
| H A D | polyval.h | 89 const u8 raw_key[POLYVAL_BLOCK_SIZE]); 93 const u8 raw_key[POLYVAL_BLOCK_SIZE]) in polyval_preparekey() 96 memcpy(key->h.bytes, raw_key, POLYVAL_BLOCK_SIZE); in polyval_preparekey()
|
| H A D | md5.h | 123 const u8 *raw_key, size_t raw_key_len); 149 const u8 *raw_key, size_t raw_key_len); 206 void hmac_md5_usingrawkey(const u8 *raw_key, size_t raw_key_len,
|
| H A D | sha1.h | 131 const u8 *raw_key, size_t raw_key_len); 157 const u8 *raw_key, size_t raw_key_len); 215 void hmac_sha1_usingrawkey(const u8 *raw_key, size_t raw_key_len,
|
| /linux/lib/crypto/ |
| H A D | sha512.c | 255 const u8 *raw_key, size_t raw_key_len, in __hmac_sha512_preparekey() argument 265 sha384(raw_key, raw_key_len, derived_key.b); in __hmac_sha512_preparekey() 267 sha512(raw_key, raw_key_len, derived_key.b); in __hmac_sha512_preparekey() 269 memcpy(derived_key.b, raw_key, raw_key_len); in __hmac_sha512_preparekey() 287 const u8 *raw_key, size_t raw_key_len) in hmac_sha384_preparekey() argument 290 raw_key, raw_key_len, &sha384_iv); in hmac_sha384_preparekey() 295 const u8 *raw_key, size_t raw_key_len) in hmac_sha512_preparekey() argument 298 raw_key, raw_key_len, &sha512_iv); in hmac_sha512_preparekey() 311 const u8 *raw_key, size_t raw_key_len) in hmac_sha384_init_usingrawkey() argument 314 raw_key, raw_key_len, &sha384_iv); in hmac_sha384_init_usingrawkey() [all …]
|
| H A D | sha256.c | 330 const u8 *raw_key, size_t raw_key_len, in __hmac_sha256_preparekey() argument 340 sha224(raw_key, raw_key_len, derived_key.b); in __hmac_sha256_preparekey() 342 sha256(raw_key, raw_key_len, derived_key.b); in __hmac_sha256_preparekey() 344 memcpy(derived_key.b, raw_key, raw_key_len); in __hmac_sha256_preparekey() 362 const u8 *raw_key, size_t raw_key_len) in hmac_sha224_preparekey() argument 365 raw_key, raw_key_len, &sha224_iv); in hmac_sha224_preparekey() 370 const u8 *raw_key, size_t raw_key_len) in hmac_sha256_preparekey() argument 373 raw_key, raw_key_len, &sha256_iv); in hmac_sha256_preparekey() 386 const u8 *raw_key, size_t raw_key_len) in hmac_sha224_init_usingrawkey() argument 389 raw_key, raw_key_len, &sha224_iv); in hmac_sha224_init_usingrawkey() [all …]
|
| H A D | sha1.c | 241 const u8 *raw_key, size_t raw_key_len) in __hmac_sha1_preparekey() argument 249 sha1(raw_key, raw_key_len, derived_key.b); in __hmac_sha1_preparekey() 251 memcpy(derived_key.b, raw_key, raw_key_len); in __hmac_sha1_preparekey() 268 const u8 *raw_key, size_t raw_key_len) in hmac_sha1_preparekey() argument 271 raw_key, raw_key_len); in hmac_sha1_preparekey() 284 const u8 *raw_key, size_t raw_key_len) in hmac_sha1_init_usingrawkey() argument 287 raw_key, raw_key_len); in hmac_sha1_init_usingrawkey() 322 void hmac_sha1_usingrawkey(const u8 *raw_key, size_t raw_key_len, in hmac_sha1_usingrawkey() argument 328 hmac_sha1_init_usingrawkey(&ctx, raw_key, raw_key_len); in hmac_sha1_usingrawkey()
|
| H A D | poly1305-donna32.c | 15 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_core_setkey() 18 key->key.r[0] = (get_unaligned_le32(&raw_key[0])) & 0x3ffffff; in poly1305_core_setkey() 19 key->key.r[1] = (get_unaligned_le32(&raw_key[3]) >> 2) & 0x3ffff03; in poly1305_core_setkey() 20 key->key.r[2] = (get_unaligned_le32(&raw_key[6]) >> 4) & 0x3ffc0ff; in poly1305_core_setkey() 21 key->key.r[3] = (get_unaligned_le32(&raw_key[9]) >> 6) & 0x3f03fff; in poly1305_core_setkey() 22 key->key.r[4] = (get_unaligned_le32(&raw_key[12]) >> 8) & 0x00fffff; in poly1305_core_setkey()
|
| H A D | md5.c | 215 const u8 *raw_key, size_t raw_key_len) in __hmac_md5_preparekey() argument 223 md5(raw_key, raw_key_len, derived_key.b); in __hmac_md5_preparekey() 225 memcpy(derived_key.b, raw_key, raw_key_len); in __hmac_md5_preparekey() 242 const u8 *raw_key, size_t raw_key_len) in hmac_md5_preparekey() argument 244 __hmac_md5_preparekey(&key->istate, &key->ostate, raw_key, raw_key_len); in hmac_md5_preparekey() 257 const u8 *raw_key, size_t raw_key_len) in hmac_md5_init_usingrawkey() argument 260 raw_key, raw_key_len); in hmac_md5_init_usingrawkey() 295 void hmac_md5_usingrawkey(const u8 *raw_key, size_t raw_key_len, in hmac_md5_usingrawkey() argument 301 hmac_md5_init_usingrawkey(&ctx, raw_key, raw_key_len); in hmac_md5_usingrawkey()
|
| H A D | poly1305-donna64.c | 15 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_core_setkey() 20 t0 = get_unaligned_le64(&raw_key[0]); in poly1305_core_setkey() 21 t1 = get_unaligned_le64(&raw_key[8]); in poly1305_core_setkey()
|
| /linux/lib/crypto/powerpc/ |
| H A D | poly1305.h | 32 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_block_init() 35 return poly1305_block_init_generic(dctx, raw_key); in poly1305_block_init() 38 dctx->core_r.key.r64[0] = get_unaligned_le64(raw_key + 0); in poly1305_block_init() 39 dctx->core_r.key.r64[1] = get_unaligned_le64(raw_key + 8); in poly1305_block_init()
|
| /linux/fs/crypto/ |
| H A D | keysetup_v1.c | 172 const u8 *raw_key, in find_or_insert_direct_key() argument 197 if (crypto_memneq(raw_key, dk->dk_raw, ci->ci_mode->keysize)) in find_or_insert_direct_key() 213 fscrypt_get_direct_key(const struct fscrypt_inode_info *ci, const u8 *raw_key) in fscrypt_get_direct_key() argument 219 dk = find_or_insert_direct_key(NULL, raw_key, ci); in fscrypt_get_direct_key() 230 err = fscrypt_prepare_key(&dk->dk_key, raw_key, ci); in fscrypt_get_direct_key() 235 memcpy(dk->dk_raw, raw_key, ci->ci_mode->keysize); in fscrypt_get_direct_key() 237 return find_or_insert_direct_key(dk, raw_key, ci); in fscrypt_get_direct_key()
|
| H A D | keysetup.c | 101 fscrypt_allocate_skcipher(struct fscrypt_mode *mode, const u8 *raw_key, in fscrypt_allocate_skcipher() argument 136 err = crypto_sync_skcipher_setkey(tfm, raw_key, mode->keysize); in fscrypt_allocate_skcipher() 154 const u8 *raw_key, const struct fscrypt_inode_info *ci) in fscrypt_prepare_key() argument 159 return fscrypt_prepare_inline_crypt_key(prep_key, raw_key, in fscrypt_prepare_key() 163 tfm = fscrypt_allocate_skcipher(ci->ci_mode, raw_key, ci->ci_inode); in fscrypt_prepare_key() 187 const u8 *raw_key) in fscrypt_set_per_file_enc_key() argument 190 return fscrypt_prepare_key(&ci->ci_enc_key, raw_key, ci); in fscrypt_set_per_file_enc_key()
|
| /linux/include/crypto/internal/ |
| H A D | poly1305.h | 21 const u8 raw_key[POLY1305_BLOCK_SIZE]); 35 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_block_init_generic() 38 poly1305_core_setkey(&desc->core_r, raw_key); in poly1305_block_init_generic()
|
| /linux/block/ |
| H A D | blk-crypto.c | 477 u8 raw_key[BLK_CRYPTO_MAX_RAW_KEY_SIZE]; in blk_crypto_ioctl_import_key() local 487 if (arg.raw_key_size < 16 || arg.raw_key_size > sizeof(raw_key)) in blk_crypto_ioctl_import_key() 490 if (copy_from_user(raw_key, u64_to_user_ptr(arg.raw_key_ptr), in blk_crypto_ioctl_import_key() 495 ret = blk_crypto_import_key(profile, raw_key, arg.raw_key_size, lt_key); in blk_crypto_ioctl_import_key() 512 memzero_explicit(raw_key, sizeof(raw_key)); in blk_crypto_ioctl_import_key()
|
| /linux/lib/crypto/x86/ |
| H A D | poly1305.h | 62 const u8 raw_key[POLY1305_BLOCK_SIZE]); 87 const u8 raw_key[POLY1305_BLOCK_SIZE]) in poly1305_block_init() 89 poly1305_init_x86_64(state, raw_key); in poly1305_block_init()
|
| H A D | polyval.h | 21 const u8 raw_key[POLYVAL_BLOCK_SIZE]) in polyval_preparekey_arch() 24 memcpy(&key->h_powers[NUM_H_POWERS - 1], raw_key, POLYVAL_BLOCK_SIZE); in polyval_preparekey_arch()
|
| /linux/include/linux/ |
| H A D | blk-crypto-profile.h | 86 const u8 *raw_key, size_t raw_key_size, 209 const u8 *raw_key, size_t raw_key_size,
|
| /linux/lib/crypto/arm64/ |
| H A D | polyval.h | 21 const u8 raw_key[POLYVAL_BLOCK_SIZE]) in polyval_preparekey_arch() 24 memcpy(&key->h_powers[NUM_H_POWERS - 1], raw_key, POLYVAL_BLOCK_SIZE); in polyval_preparekey_arch()
|
| /linux/crypto/ |
| H A D | sha256.c | 188 const u8 *raw_key, unsigned int keylen) in crypto_hmac_sha224_setkey() argument 190 hmac_sha224_preparekey(HMAC_SHA224_KEY(tfm), raw_key, keylen); in crypto_hmac_sha224_setkey() 255 const u8 *raw_key, unsigned int keylen) in crypto_hmac_sha256_setkey() argument 257 hmac_sha256_preparekey(HMAC_SHA256_KEY(tfm), raw_key, keylen); in crypto_hmac_sha256_setkey()
|
| H A D | sha512.c | 194 const u8 *raw_key, unsigned int keylen) in crypto_hmac_sha384_setkey() argument 196 hmac_sha384_preparekey(HMAC_SHA384_KEY(tfm), raw_key, keylen); in crypto_hmac_sha384_setkey() 261 const u8 *raw_key, unsigned int keylen) in crypto_hmac_sha512_setkey() argument 263 hmac_sha512_preparekey(HMAC_SHA512_KEY(tfm), raw_key, keylen); in crypto_hmac_sha512_setkey()
|
| /linux/lib/crypto/mips/ |
| H A D | poly1305.h | 9 const u8 raw_key[POLY1305_BLOCK_SIZE]);
|