Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\big_key.c Create Date:2022-07-28 18:28:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Register key type

Proto:static int __init big_key_init(void)

Type:int

Parameter:Nothing

420  Crypto algorithms for big_key data authenticated encryption = rypto_alloc_aead() - allocate AEAD cipher handle*@alg_name: is the cra_name / name or cra_driver_name / driver name of the* AEAD cipher*@type: specifies the type of the cipher*@mask: specifies the mask for the cipher* Allocate a cipher handle for an AEAD
421  If IS_ERR(Crypto algorithms for big_key data authenticated encryption) Then
422  ret = PTR_ERR(Crypto algorithms for big_key data authenticated encryption)
423  pr_err("Can't alloc crypto: %d\n", ret)
424  Return ret
427  If Value for the false possibility is greater at compile time(rypto_aead_ivsize() - obtain IV size*@tfm: cipher handle* The size of the IV for the aead referenced by the cipher handle is* returned. This IV size may be zero if the cipher does not need an IV.* Return: IV size in bytes != BIG_KEY_IV_SIZE) Then
428  WARN(1, "big key algorithm changed?")
429  ret = -EINVAL
430  Go to free_aead
433  ret = rypto_aead_setauthsize() - set authentication data size*@tfm: cipher handle*@authsize: size of the authentication data / tag in bytes* Set the authentication data size / tag size. AEAD requires an authentication
434  If ret < 0 Then
435  pr_err("Can't set crypto auth tag len: %d\n", ret)
436  Go to free_aead
439  ret = gister_key_type - Register a type of key.*@ktype: The new key type.* Register a new key type.* Returns 0 on success or -EEXIST if a type of this name already exists.
440  If ret < 0 Then
441  pr_err("Can't register type: %d\n", ret)
442  Go to free_aead
445  Return 0
447  free_aead :
448  rypto_free_aead() - zeroize and free aead handle*@tfm: cipher handle to be freed
449  Return ret