Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ryptfs_fill_auth_tok - fill the ecryptfs_auth_tok structure* Fill the ecryptfs_auth_tok structure with required ecryptfs data.* The source code is inspired to the original function generate_payload()* shipped with the software 'ecryptfs-utils' version 83.

Proto:int ecryptfs_fill_auth_tok(struct ecryptfs_auth_tok *auth_tok, const char *key_desc)

Type:int

Parameter:

TypeParameterName
struct ecryptfs_auth_tok *auth_tok
const char *key_desc
53  ryptfs_get_versions()* Source code taken from the software 'ecryptfs-utils' version 83.
54  8-bit major and 8-bit minor = major << 8 & 0xFF00 | minor & 0x00FF
56  token_type = ECRYPTFS_PASSWORD
57  strncpy((char * )signature, key_desc, ECRYPTFS_PASSWORD_SIG_SIZE)
59  session_key_encryption_key_bytes = ECRYPTFS_MAX_KEY_BYTES
67  flags |= ECRYPTFS_SESSION_KEY_ENCRYPTION_KEY_SET
70  encrypted_key[0] = 0
71  encrypted_key_size = 0
73  hash_algo = PGP_DIGEST_ALGO_SHA512
74  flags &= ~ECRYPTFS_PERSISTENT_PASSWORD
75  Return 0