Lines Matching refs:keylen
233 u32 keylen) in cvm_xts_setkey() argument
239 const u8 *key2 = key + (keylen / 2); in cvm_xts_setkey()
241 err = xts_check_key(tfm, key, keylen); in cvm_xts_setkey()
244 ctx->key_len = keylen; in cvm_xts_setkey()
245 memcpy(ctx->enc_key, key1, keylen / 2); in cvm_xts_setkey()
246 memcpy(ctx->enc_key + KEY2_OFFSET, key2, keylen / 2); in cvm_xts_setkey()
262 static int cvm_validate_keylen(struct cvm_enc_ctx *ctx, u32 keylen) in cvm_validate_keylen() argument
264 if ((keylen == 16) || (keylen == 24) || (keylen == 32)) { in cvm_validate_keylen()
265 ctx->key_len = keylen; in cvm_validate_keylen()
290 u32 keylen, u8 cipher_type) in cvm_setkey() argument
296 if (!cvm_validate_keylen(ctx, keylen)) { in cvm_setkey()
297 memcpy(ctx->enc_key, key, keylen); in cvm_setkey()
305 u32 keylen) in cvm_cbc_aes_setkey() argument
307 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey()
311 u32 keylen) in cvm_ecb_aes_setkey() argument
313 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey()
317 u32 keylen) in cvm_cfb_aes_setkey() argument
319 return cvm_setkey(cipher, key, keylen, AES_CFB); in cvm_cfb_aes_setkey()
323 u32 keylen) in cvm_cbc_des3_setkey() argument
326 cvm_setkey(cipher, key, keylen, DES3_CBC); in cvm_cbc_des3_setkey()
330 u32 keylen) in cvm_ecb_des3_setkey() argument
333 cvm_setkey(cipher, key, keylen, DES3_ECB); in cvm_ecb_des3_setkey()