Lines Matching refs:key_len

45 	int key_len;  member
56 int key_len; member
73 unsigned int key_len) in setkey_fallback_cip() argument
81 return crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip()
85 unsigned int key_len) in aes_set_key() argument
91 fc = (key_len == 16) ? CPACF_KM_AES_128 : in aes_set_key()
92 (key_len == 24) ? CPACF_KM_AES_192 : in aes_set_key()
93 (key_len == 32) ? CPACF_KM_AES_256 : 0; in aes_set_key()
98 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key()
100 sctx->key_len = key_len; in aes_set_key()
101 memcpy(sctx->key, in_key, key_len); in aes_set_key()
202 unsigned int key_len) in ecb_aes_set_key() argument
208 fc = (key_len == 16) ? CPACF_KM_AES_128 : in ecb_aes_set_key()
209 (key_len == 24) ? CPACF_KM_AES_192 : in ecb_aes_set_key()
210 (key_len == 32) ? CPACF_KM_AES_256 : 0; in ecb_aes_set_key()
215 return setkey_fallback_skcipher(tfm, in_key, key_len); in ecb_aes_set_key()
217 sctx->key_len = key_len; in ecb_aes_set_key()
218 memcpy(sctx->key, in_key, key_len); in ecb_aes_set_key()
298 unsigned int key_len) in cbc_aes_set_key() argument
304 fc = (key_len == 16) ? CPACF_KMC_AES_128 : in cbc_aes_set_key()
305 (key_len == 24) ? CPACF_KMC_AES_192 : in cbc_aes_set_key()
306 (key_len == 32) ? CPACF_KMC_AES_256 : 0; in cbc_aes_set_key()
311 return setkey_fallback_skcipher(tfm, in_key, key_len); in cbc_aes_set_key()
313 sctx->key_len = key_len; in cbc_aes_set_key()
314 memcpy(sctx->key, in_key, key_len); in cbc_aes_set_key()
337 memcpy(param.key, sctx->key, sctx->key_len); in cbc_aes_crypt()
391 unsigned int key_len) in xts_aes_set_key() argument
397 err = xts_fallback_setkey(tfm, in_key, key_len); in xts_aes_set_key()
402 if (fips_enabled && key_len != 32 && key_len != 64) in xts_aes_set_key()
406 fc = (key_len == 32) ? CPACF_KM_XTS_128 : in xts_aes_set_key()
407 (key_len == 64) ? CPACF_KM_XTS_256 : 0; in xts_aes_set_key()
415 key_len = key_len / 2; in xts_aes_set_key()
416 xts_ctx->key_len = key_len; in xts_aes_set_key()
417 memcpy(xts_ctx->key, in_key, key_len); in xts_aes_set_key()
418 memcpy(xts_ctx->pcc_key, in_key + key_len, key_len); in xts_aes_set_key()
457 offset = xts_ctx->key_len & 0x10; in xts_aes_crypt()
462 memcpy(pcc_param.key + offset, xts_ctx->pcc_key, xts_ctx->key_len); in xts_aes_crypt()
465 memcpy(xts_param.key + offset, xts_ctx->key, xts_ctx->key_len); in xts_aes_crypt()
534 unsigned int key_len) in ctr_aes_set_key() argument
540 fc = (key_len == 16) ? CPACF_KMCTR_AES_128 : in ctr_aes_set_key()
541 (key_len == 24) ? CPACF_KMCTR_AES_192 : in ctr_aes_set_key()
542 (key_len == 32) ? CPACF_KMCTR_AES_256 : 0; in ctr_aes_set_key()
547 return setkey_fallback_skcipher(tfm, in_key, key_len); in ctr_aes_set_key()
549 sctx->key_len = key_len; in ctr_aes_set_key()
550 memcpy(sctx->key, in_key, key_len); in ctr_aes_set_key()
653 ctx->key_len = keylen; in gcm_aes_setkey()
873 memcpy(param.k, ctx->key, ctx->key_len); in gcm_aes_crypt()