Home
last modified time | relevance | path

Searched refs:bs (Results 1 – 9 of 9) sorted by relevance

/crypto/
Dxcbc.c59 int bs = sizeof(key1); in crypto_xcbc_digest_setkey() local
64 crypto_cipher_encrypt_one(ctx->child, consts, (u8 *)ks + bs); in crypto_xcbc_digest_setkey()
65 crypto_cipher_encrypt_one(ctx->child, consts + bs, (u8 *)ks + bs * 2); in crypto_xcbc_digest_setkey()
68 return crypto_cipher_setkey(ctx->child, key1, bs); in crypto_xcbc_digest_setkey()
76 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_xcbc_digest_init() local
77 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
80 memset(prev, 0, bs); in crypto_xcbc_digest_init()
93 int bs = crypto_shash_blocksize(parent); in crypto_xcbc_digest_update() local
95 u8 *prev = odds + bs; in crypto_xcbc_digest_update()
98 if ((ctx->len + len) <= bs) { in crypto_xcbc_digest_update()
[all …]
Dcmac.c55 unsigned int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_setkey() local
67 memset(consts, 0, bs); in crypto_cmac_digest_setkey()
70 switch (bs) { in crypto_cmac_digest_setkey()
109 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_cmac_digest_init() local
110 u8 *prev = PTR_ALIGN((void *)ctx->ctx, alignmask + 1) + bs; in crypto_cmac_digest_init()
113 memset(prev, 0, bs); in crypto_cmac_digest_init()
126 int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_update() local
128 u8 *prev = odds + bs; in crypto_cmac_digest_update()
131 if ((ctx->len + len) <= bs) { in crypto_cmac_digest_update()
138 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_cmac_digest_update()
[all …]
Dhmac.c43 int bs = crypto_shash_blocksize(parent); in hmac_setkey() local
56 if (keylen > bs) { in hmac_setkey()
67 memset(ipad + keylen, 0, bs - keylen); in hmac_setkey()
68 memcpy(opad, ipad, bs); in hmac_setkey()
70 for (i = 0; i < bs; i++) { in hmac_setkey()
76 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey()
79 crypto_shash_update(shash, opad, bs) ?: in hmac_setkey()
Dcipher.c68 unsigned int bs = crypto_cipher_blocksize(tfm); in cipher_crypt_one() local
72 memcpy(tmp, src, bs); in cipher_crypt_one()
74 memcpy(dst, tmp, bs); in cipher_crypt_one()
Dccm.c789 int bs = crypto_shash_digestsize(pdesc->tfm); in crypto_cbcmac_digest_init() local
790 u8 *dg = (u8 *)ctx + crypto_shash_descsize(pdesc->tfm) - bs; in crypto_cbcmac_digest_init()
793 memset(dg, 0, bs); in crypto_cbcmac_digest_init()
805 int bs = crypto_shash_digestsize(parent); in crypto_cbcmac_digest_update() local
806 u8 *dg = (u8 *)ctx + crypto_shash_descsize(parent) - bs; in crypto_cbcmac_digest_update()
809 unsigned int l = min(len, bs - ctx->len); in crypto_cbcmac_digest_update()
816 if (ctx->len == bs) { in crypto_cbcmac_digest_update()
831 int bs = crypto_shash_digestsize(parent); in crypto_cbcmac_digest_final() local
832 u8 *dg = (u8 *)ctx + crypto_shash_descsize(parent) - bs; in crypto_cbcmac_digest_final()
837 memcpy(out, dg, bs); in crypto_cbcmac_digest_final()
Dalgif_skcipher.c59 unsigned int bs = crypto_skcipher_chunksize(tfm); in _skcipher_recvmsg() local
64 if (!ctx->init || (ctx->more && ctx->used < bs)) { in _skcipher_recvmsg()
65 err = af_alg_wait_for_data(sk, flags, bs); in _skcipher_recvmsg()
86 len -= len % bs; in _skcipher_recvmsg()
Dxts.c88 const int bs = XTS_BLOCK_SIZE; in xts_xor_tweak() local
119 skcipher_walk_done(&w, avail - bs); in xts_xor_tweak()
125 } while ((avail -= bs) >= bs); in xts_xor_tweak()
Dlrw.c142 const int bs = LRW_BLOCK_SIZE; in lrw_xor_tweak() local
183 } while ((avail -= bs) >= bs); in lrw_xor_tweak()
Dskcipher.c402 unsigned bs = walk->stride; in skcipher_copy_iv() local
407 aligned_bs = ALIGN(bs, alignmask + 1); in skcipher_copy_iv()
418 size += (bs - 1) & ~(alignmask | a); in skcipher_copy_iv()
426 iv = skcipher_get_spot(iv, bs) + aligned_bs; in skcipher_copy_iv()