Home
last modified time | relevance | path

Searched refs:keylen (Results 1 – 25 of 37) sorted by relevance

12

/crypto/
Dcipher.c24 unsigned int keylen) in setkey_unaligned() argument
32 absize = keylen + alignmask; in setkey_unaligned()
38 memcpy(alignbuffer, key, keylen); in setkey_unaligned()
39 ret = cia->cia_setkey(tfm, alignbuffer, keylen); in setkey_unaligned()
40 memset(alignbuffer, 0, keylen); in setkey_unaligned()
46 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument
52 if (keylen < cia->cia_min_keysize || keylen > cia->cia_max_keysize) { in setkey()
58 return setkey_unaligned(tfm, key, keylen); in setkey()
60 return cia->cia_setkey(tfm, key, keylen); in setkey()
Dblowfish_common.c349 int blowfish_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in blowfish_setkey() argument
369 ((u32)key[(j + 1) % keylen] << 16) | in blowfish_setkey()
370 ((u32)key[(j + 2) % keylen] << 8) | in blowfish_setkey()
371 ((u32)key[(j + 3) % keylen])); in blowfish_setkey()
374 j = (j + 4) % keylen; in blowfish_setkey()
Dhmac.c45 const u8 *inkey, unsigned int keylen) in hmac_setkey() argument
62 if (keylen > bs) { in hmac_setkey()
65 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey()
69 keylen = ds; in hmac_setkey()
71 memcpy(ipad, inkey, keylen); in hmac_setkey()
73 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
Dshash.c28 unsigned int keylen) in shash_no_setkey() argument
35 unsigned int keylen) in shash_setkey_unaligned() argument
43 absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in shash_setkey_unaligned()
49 memcpy(alignbuffer, key, keylen); in shash_setkey_unaligned()
50 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned()
56 unsigned int keylen) in crypto_shash_setkey() argument
62 return shash_setkey_unaligned(tfm, key, keylen); in crypto_shash_setkey()
64 return shash->setkey(tfm, key, keylen); in crypto_shash_setkey()
203 unsigned int keylen) in shash_async_setkey() argument
207 return crypto_shash_setkey(*ctx, key, keylen); in shash_async_setkey()
[all …]
Dblkcipher.c376 unsigned int keylen) in setkey_unaligned() argument
384 absize = keylen + alignmask; in setkey_unaligned()
390 memcpy(alignbuffer, key, keylen); in setkey_unaligned()
391 ret = cipher->setkey(tfm, alignbuffer, keylen); in setkey_unaligned()
392 memset(alignbuffer, 0, keylen); in setkey_unaligned()
397 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument
402 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) { in setkey()
408 return setkey_unaligned(tfm, key, keylen); in setkey()
410 return cipher->setkey(tfm, key, keylen); in setkey()
414 unsigned int keylen) in async_setkey() argument
[all …]
Dablkcipher.c306 unsigned int keylen) in setkey_unaligned() argument
314 absize = keylen + alignmask; in setkey_unaligned()
320 memcpy(alignbuffer, key, keylen); in setkey_unaligned()
321 ret = cipher->setkey(tfm, alignbuffer, keylen); in setkey_unaligned()
322 memset(alignbuffer, 0, keylen); in setkey_unaligned()
328 unsigned int keylen) in setkey() argument
333 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) { in setkey()
339 return setkey_unaligned(tfm, key, keylen); in setkey()
341 return cipher->setkey(tfm, key, keylen); in setkey()
Dahash.c189 unsigned int keylen) in ahash_setkey_unaligned() argument
196 absize = keylen + alignmask; in ahash_setkey_unaligned()
202 memcpy(alignbuffer, key, keylen); in ahash_setkey_unaligned()
203 ret = tfm->setkey(tfm, alignbuffer, keylen); in ahash_setkey_unaligned()
209 unsigned int keylen) in crypto_ahash_setkey() argument
214 return ahash_setkey_unaligned(tfm, key, keylen); in crypto_ahash_setkey()
216 return tfm->setkey(tfm, key, keylen); in crypto_ahash_setkey()
221 unsigned int keylen) in ahash_nosetkey() argument
Dctr.c39 unsigned int keylen) in crypto_ctr_setkey() argument
48 err = crypto_cipher_setkey(child, key, keylen); in crypto_ctr_setkey()
253 const u8 *key, unsigned int keylen) in crypto_rfc3686_setkey() argument
260 if (keylen < CTR_RFC3686_NONCE_SIZE) in crypto_rfc3686_setkey()
263 memcpy(ctx->nonce, key + (keylen - CTR_RFC3686_NONCE_SIZE), in crypto_rfc3686_setkey()
266 keylen -= CTR_RFC3686_NONCE_SIZE; in crypto_rfc3686_setkey()
271 err = crypto_ablkcipher_setkey(child, key, keylen); in crypto_rfc3686_setkey()
Daead.c30 unsigned int keylen) in setkey_unaligned() argument
38 absize = keylen + alignmask; in setkey_unaligned()
44 memcpy(alignbuffer, key, keylen); in setkey_unaligned()
45 ret = aead->setkey(tfm, alignbuffer, keylen); in setkey_unaligned()
46 memset(alignbuffer, 0, keylen); in setkey_unaligned()
51 static int setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) in setkey() argument
57 return setkey_unaligned(tfm, key, keylen); in setkey()
59 return aead->setkey(tfm, key, keylen); in setkey()
Dxts.c34 unsigned int keylen) in setkey() argument
43 if (keylen % 2) { in setkey()
57 err = crypto_cipher_setkey(child, key + keylen/2, keylen/2); in setkey()
70 err = crypto_cipher_setkey(child, key, keylen/2); in setkey()
Daf_alg.c202 unsigned int keylen) in alg_setkey() argument
209 key = sock_kmalloc(sk, keylen, GFP_KERNEL); in alg_setkey()
214 if (copy_from_user(key, ukey, keylen)) in alg_setkey()
217 err = type->setkey(ask->private, key, keylen); in alg_setkey()
220 sock_kfree_s(sk, key, keylen); in alg_setkey()
Dcrc32.c64 unsigned int keylen) in crc32_setkey() argument
68 if (keylen != sizeof(u32)) { in crc32_setkey()
Dccm.c77 unsigned int keylen) in crypto_ccm_setkey() argument
87 err = crypto_ablkcipher_setkey(ctr, key, keylen); in crypto_ccm_setkey()
96 err = crypto_cipher_setkey(tfm, key, keylen); in crypto_ccm_setkey()
639 unsigned int keylen) in crypto_rfc4309_setkey() argument
645 if (keylen < 3) in crypto_rfc4309_setkey()
648 keylen -= 3; in crypto_rfc4309_setkey()
649 memcpy(ctx->nonce, key + keylen, 3); in crypto_rfc4309_setkey()
654 err = crypto_aead_setkey(child, key, keylen); in crypto_rfc4309_setkey()
Dcrc32c_generic.c77 unsigned int keylen) in chksum_setkey() argument
81 if (keylen != sizeof(mctx->key)) { in chksum_setkey()
Dgcm.c105 unsigned int keylen) in crypto_gcm_setkey() argument
125 err = crypto_ablkcipher_setkey(ctr, key, keylen); in crypto_gcm_setkey()
859 unsigned int keylen) in crypto_rfc4106_setkey() argument
865 if (keylen < 4) in crypto_rfc4106_setkey()
868 keylen -= 4; in crypto_rfc4106_setkey()
869 memcpy(ctx->nonce, key + keylen, 4); in crypto_rfc4106_setkey()
874 err = crypto_aead_setkey(child, key, keylen); in crypto_rfc4106_setkey()
1070 unsigned int keylen) in crypto_rfc4543_setkey() argument
1076 if (keylen < 4) in crypto_rfc4543_setkey()
1079 keylen -= 4; in crypto_rfc4543_setkey()
[all …]
Dauthenc.c56 unsigned int keylen) in crypto_authenc_extractkeys() argument
61 if (!RTA_OK(rta, keylen)) in crypto_authenc_extractkeys()
72 keylen -= RTA_ALIGN(rta->rta_len); in crypto_authenc_extractkeys()
74 if (keylen < keys->enckeylen) in crypto_authenc_extractkeys()
77 keys->authkeylen = keylen - keys->enckeylen; in crypto_authenc_extractkeys()
86 unsigned int keylen) in crypto_authenc_setkey() argument
94 if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) in crypto_authenc_setkey()
Dcrypto_null.c61 unsigned int keylen) in null_hash_setkey() argument
65 unsigned int keylen) in null_setkey() argument
Dghash-generic.c45 const u8 *key, unsigned int keylen) in ghash_setkey() argument
49 if (keylen != GHASH_BLOCK_SIZE) { in ghash_setkey()
Dmichael_mic.c137 unsigned int keylen) in michael_setkey() argument
143 if (keylen != 8) { in michael_setkey()
Decb.c26 unsigned int keylen) in crypto_ecb_setkey() argument
35 err = crypto_cipher_setkey(child, key, keylen); in crypto_ecb_setkey()
Dlrw.c80 unsigned int keylen) in setkey() argument
85 const u8 *tweak = key + keylen - bsize; in setkey()
90 err = crypto_cipher_setkey(child, key, keylen - bsize); in setkey()
Dxcbc.c62 const u8 *inkey, unsigned int keylen) in crypto_xcbc_digest_setkey() argument
71 if ((err = crypto_cipher_setkey(ctx->child, inkey, keylen))) in crypto_xcbc_digest_setkey()
Dcmac.c55 const u8 *inkey, unsigned int keylen) in crypto_cmac_digest_setkey() argument
65 err = crypto_cipher_setkey(ctx->child, inkey, keylen); in crypto_cmac_digest_setkey()
Dserpent_generic.c233 unsigned int keylen) in __serpent_setkey() argument
242 for (i = 0; i < keylen; ++i) in __serpent_setkey()
439 int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in serpent_setkey() argument
441 return __serpent_setkey(crypto_tfm_ctx(tfm), key, keylen); in serpent_setkey()
571 unsigned int keylen) in tnepres_setkey() argument
576 for (i = 0; i < keylen; ++i) in tnepres_setkey()
577 rev_key[keylen - i - 1] = key[i]; in tnepres_setkey()
579 return serpent_setkey(tfm, rev_key, keylen); in tnepres_setkey()
Dpcbc.c30 unsigned int keylen) in crypto_pcbc_setkey() argument
39 err = crypto_cipher_setkey(child, key, keylen); in crypto_pcbc_setkey()

12