Lines Matching refs:ukey
255 static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey,
328 int tipc_aead_key_validate(struct tipc_aead_key *ukey, struct genl_info *info) in tipc_aead_key_validate() argument
333 if (unlikely(!crypto_has_alg(ukey->alg_name, 0, 0))) { in tipc_aead_key_validate()
339 if (strcmp(ukey->alg_name, "gcm(aes)")) { in tipc_aead_key_validate()
345 keylen = ukey->keylen - TIPC_AES_GCM_SALT_SIZE; in tipc_aead_key_validate()
507 static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey, in tipc_aead_init() argument
525 keylen = ukey->keylen - TIPC_AES_GCM_SALT_SIZE; in tipc_aead_init()
536 tfm = crypto_alloc_aead(ukey->alg_name, 0, 0); in tipc_aead_init()
550 err |= crypto_aead_setkey(tfm, ukey->key, keylen); in tipc_aead_init()
585 bin2hex(tmp->hint, ukey->key + keylen - TIPC_AEAD_HINT_LEN, in tipc_aead_init()
592 tmp->key = kmemdup(ukey, tipc_aead_key_size(ukey), GFP_KERNEL); in tipc_aead_init()
597 memcpy(&tmp->salt, ukey->key + keylen, TIPC_AES_GCM_SALT_SIZE); in tipc_aead_init()
1123 int tipc_crypto_key_init(struct tipc_crypto *c, struct tipc_aead_key *ukey, in tipc_crypto_key_init() argument
1130 rc = tipc_aead_init(&aead, ukey, mode); in tipc_crypto_key_init()