Lines Matching refs:in_key
146 static int check_key(const u8 *in_key, size_t key_len, enum ocs_cipher cipher)
148 if (!in_key)
165 static int save_key(struct ocs_aes_tctx *tctx, const u8 *in_key, size_t key_len,
170 ret = check_key(in_key, key_len, cipher);
174 memcpy(tctx->key, in_key, key_len);
182 static int kmb_ocs_sk_set_key(struct crypto_skcipher *tfm, const u8 *in_key,
192 return save_key(tctx, in_key, key_len, cipher);
200 return crypto_sync_skcipher_setkey(tctx->sw_cipher.sk, in_key, key_len);
204 static int kmb_ocs_aead_set_key(struct crypto_aead *tfm, const u8 *in_key,
214 return save_key(tctx, in_key, key_len, cipher);
220 return crypto_aead_setkey(tctx->sw_cipher.aead, in_key, key_len);
996 static int kmb_ocs_aes_set_key(struct crypto_skcipher *tfm, const u8 *in_key,
999 return kmb_ocs_sk_set_key(tfm, in_key, key_len, OCS_AES);
1002 static int kmb_ocs_aes_aead_set_key(struct crypto_aead *tfm, const u8 *in_key,
1005 return kmb_ocs_aead_set_key(tfm, in_key, key_len, OCS_AES);
1072 static int kmb_ocs_sm4_set_key(struct crypto_skcipher *tfm, const u8 *in_key,
1075 return kmb_ocs_sk_set_key(tfm, in_key, key_len, OCS_SM4);
1078 static int kmb_ocs_sm4_aead_set_key(struct crypto_aead *tfm, const u8 *in_key,
1081 return kmb_ocs_aead_set_key(tfm, in_key, key_len, OCS_SM4);