/kernel/linux/linux-5.10/fs/ecryptfs/ |
H A D | debug.c | 18 void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok) in ecryptfs_dump_auth_tok() argument 24 auth_tok); in ecryptfs_dump_auth_tok() 25 if (auth_tok->flags & ECRYPTFS_PRIVATE_KEY) { in ecryptfs_dump_auth_tok() 29 ecryptfs_to_hex(salt, auth_tok->token.password.salt, in ecryptfs_dump_auth_tok() 33 if (auth_tok->token.password.flags & in ecryptfs_dump_auth_tok() 37 memcpy(sig, auth_tok->token.password.signature, in ecryptfs_dump_auth_tok() 43 auth_tok->session_key.flags); in ecryptfs_dump_auth_tok() 44 if (auth_tok->session_key.flags in ecryptfs_dump_auth_tok() 48 if (auth_tok->session_key.flags in ecryptfs_dump_auth_tok() 52 if (auth_tok in ecryptfs_dump_auth_tok() [all...] |
H A D | keystore.c | 446 * @auth_tok: authentication token 453 struct ecryptfs_auth_tok **auth_tok) in ecryptfs_verify_auth_tok_from_key() 457 (*auth_tok) = ecryptfs_get_key_payload_data(auth_tok_key); in ecryptfs_verify_auth_tok_from_key() 458 if (IS_ERR(*auth_tok)) { in ecryptfs_verify_auth_tok_from_key() 459 rc = PTR_ERR(*auth_tok); in ecryptfs_verify_auth_tok_from_key() 460 *auth_tok = NULL; in ecryptfs_verify_auth_tok_from_key() 464 if (ecryptfs_verify_version((*auth_tok)->version)) { in ecryptfs_verify_auth_tok_from_key() 472 if ((*auth_tok)->token_type != ECRYPTFS_PASSWORD in ecryptfs_verify_auth_tok_from_key() 473 && (*auth_tok)->token_type != ECRYPTFS_PRIVATE_KEY) { in ecryptfs_verify_auth_tok_from_key() 474 printk(KERN_ERR "Invalid auth_tok structur in ecryptfs_verify_auth_tok_from_key() 452 ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key, struct ecryptfs_auth_tok **auth_tok) ecryptfs_verify_auth_tok_from_key() argument 484 ecryptfs_find_global_auth_tok_for_sig( struct key **auth_tok_key, struct ecryptfs_auth_tok **auth_tok, struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *sig) ecryptfs_find_global_auth_tok_for_sig() argument 553 ecryptfs_find_auth_tok_for_sig( struct key **auth_tok_key, struct ecryptfs_auth_tok **auth_tok, struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *sig) ecryptfs_find_auth_tok_for_sig() argument 595 struct ecryptfs_auth_tok *auth_tok; global() member 865 struct ecryptfs_auth_tok *auth_tok; global() member 1097 ecryptfs_get_auth_tok_sig(char **sig, struct ecryptfs_auth_tok *auth_tok) ecryptfs_get_auth_tok_sig() argument 1125 decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat) decrypt_pki_encrypted_session_key() argument 1608 ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, struct ecryptfs_auth_tok **auth_tok, char *sig) ecryptfs_keyring_auth_tok_for_sig() argument 1645 decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat) decrypt_passphrase_encrypted_session_key() argument 1960 pki_encrypt_session_key(struct key *auth_tok_key, struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_key_record *key_rec) pki_encrypt_session_key() argument 2018 write_tag_1_packet(char *dest, size_t *remaining_bytes, struct key *auth_tok_key, struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_key_record *key_rec, size_t *packet_size) write_tag_1_packet() argument 2173 write_tag_3_packet(char *dest, size_t *remaining_bytes, struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_key_record *key_rec, size_t *packet_size) write_tag_3_packet() argument 2403 struct ecryptfs_auth_tok *auth_tok; ecryptfs_generate_key_packet_set() local [all...] |
H A D | ecryptfs_kernel.h | 40 void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok); 58 struct ecryptfs_auth_tok *auth_tok; member 114 struct ecryptfs_auth_tok *auth_tok; in ecryptfs_get_key_payload_data() local 117 auth_tok = ecryptfs_get_encrypted_key_payload_data(key); in ecryptfs_get_key_payload_data() 118 if (auth_tok) in ecryptfs_get_key_payload_data() 119 return auth_tok; in ecryptfs_get_key_payload_data() 363 /* auth_tok <=> encrypted_session_key mappings */ 367 struct ecryptfs_auth_tok auth_tok; member 666 struct ecryptfs_auth_tok **auth_tok,
|
H A D | crypto.c | 202 struct ecryptfs_global_auth_tok *auth_tok, *auth_tok_tmp; in ecryptfs_destroy_mount_crypt_stat() local 207 list_for_each_entry_safe(auth_tok, auth_tok_tmp, in ecryptfs_destroy_mount_crypt_stat() 210 list_del(&auth_tok->mount_crypt_stat_list); in ecryptfs_destroy_mount_crypt_stat() 211 if (!(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID)) in ecryptfs_destroy_mount_crypt_stat() 212 key_put(auth_tok->global_auth_tok_key); in ecryptfs_destroy_mount_crypt_stat() 213 kmem_cache_free(ecryptfs_global_auth_tok_cache, auth_tok); in ecryptfs_destroy_mount_crypt_stat()
|
H A D | main.c | 188 struct ecryptfs_auth_tok *auth_tok; in ecryptfs_init_global_auth_toks() local 195 &global_auth_tok->global_auth_tok_key, &auth_tok, in ecryptfs_init_global_auth_toks()
|
/kernel/linux/linux-6.6/fs/ecryptfs/ |
H A D | debug.c | 18 void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok) in ecryptfs_dump_auth_tok() argument 24 auth_tok); in ecryptfs_dump_auth_tok() 25 if (auth_tok->flags & ECRYPTFS_PRIVATE_KEY) { in ecryptfs_dump_auth_tok() 29 ecryptfs_to_hex(salt, auth_tok->token.password.salt, in ecryptfs_dump_auth_tok() 33 if (auth_tok->token.password.flags & in ecryptfs_dump_auth_tok() 37 memcpy(sig, auth_tok->token.password.signature, in ecryptfs_dump_auth_tok() 43 auth_tok->session_key.flags); in ecryptfs_dump_auth_tok() 44 if (auth_tok->session_key.flags in ecryptfs_dump_auth_tok() 48 if (auth_tok->session_key.flags in ecryptfs_dump_auth_tok() 52 if (auth_tok in ecryptfs_dump_auth_tok() [all...] |
H A D | keystore.c | 446 * @auth_tok: authentication token 453 struct ecryptfs_auth_tok **auth_tok) in ecryptfs_verify_auth_tok_from_key() 457 (*auth_tok) = ecryptfs_get_key_payload_data(auth_tok_key); in ecryptfs_verify_auth_tok_from_key() 458 if (IS_ERR(*auth_tok)) { in ecryptfs_verify_auth_tok_from_key() 459 rc = PTR_ERR(*auth_tok); in ecryptfs_verify_auth_tok_from_key() 460 *auth_tok = NULL; in ecryptfs_verify_auth_tok_from_key() 464 if (ecryptfs_verify_version((*auth_tok)->version)) { in ecryptfs_verify_auth_tok_from_key() 472 if ((*auth_tok)->token_type != ECRYPTFS_PASSWORD in ecryptfs_verify_auth_tok_from_key() 473 && (*auth_tok)->token_type != ECRYPTFS_PRIVATE_KEY) { in ecryptfs_verify_auth_tok_from_key() 474 printk(KERN_ERR "Invalid auth_tok structur in ecryptfs_verify_auth_tok_from_key() 452 ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key, struct ecryptfs_auth_tok **auth_tok) ecryptfs_verify_auth_tok_from_key() argument 484 ecryptfs_find_global_auth_tok_for_sig( struct key **auth_tok_key, struct ecryptfs_auth_tok **auth_tok, struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *sig) ecryptfs_find_global_auth_tok_for_sig() argument 554 ecryptfs_find_auth_tok_for_sig( struct key **auth_tok_key, struct ecryptfs_auth_tok **auth_tok, struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *sig) ecryptfs_find_auth_tok_for_sig() argument 596 struct ecryptfs_auth_tok *auth_tok; global() member 866 struct ecryptfs_auth_tok *auth_tok; global() member 1098 ecryptfs_get_auth_tok_sig(char **sig, struct ecryptfs_auth_tok *auth_tok) ecryptfs_get_auth_tok_sig() argument 1126 decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat) decrypt_pki_encrypted_session_key() argument 1609 ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, struct ecryptfs_auth_tok **auth_tok, char *sig) ecryptfs_keyring_auth_tok_for_sig() argument 1646 decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat) decrypt_passphrase_encrypted_session_key() argument 1961 pki_encrypt_session_key(struct key *auth_tok_key, struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_key_record *key_rec) pki_encrypt_session_key() argument 2019 write_tag_1_packet(char *dest, size_t *remaining_bytes, struct key *auth_tok_key, struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_key_record *key_rec, size_t *packet_size) write_tag_1_packet() argument 2174 write_tag_3_packet(char *dest, size_t *remaining_bytes, struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_key_record *key_rec, size_t *packet_size) write_tag_3_packet() argument 2404 struct ecryptfs_auth_tok *auth_tok; ecryptfs_generate_key_packet_set() local [all...] |
H A D | ecryptfs_kernel.h | 40 void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok); 58 struct ecryptfs_auth_tok *auth_tok; member 114 struct ecryptfs_auth_tok *auth_tok; in ecryptfs_get_key_payload_data() local 117 auth_tok = ecryptfs_get_encrypted_key_payload_data(key); in ecryptfs_get_key_payload_data() 118 if (auth_tok) in ecryptfs_get_key_payload_data() 119 return auth_tok; in ecryptfs_get_key_payload_data() 360 /* auth_tok <=> encrypted_session_key mappings */ 364 struct ecryptfs_auth_tok auth_tok; member 651 struct ecryptfs_auth_tok **auth_tok,
|
H A D | crypto.c | 202 struct ecryptfs_global_auth_tok *auth_tok, *auth_tok_tmp; in ecryptfs_destroy_mount_crypt_stat() local 207 list_for_each_entry_safe(auth_tok, auth_tok_tmp, in ecryptfs_destroy_mount_crypt_stat() 210 list_del(&auth_tok->mount_crypt_stat_list); in ecryptfs_destroy_mount_crypt_stat() 211 if (!(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID)) in ecryptfs_destroy_mount_crypt_stat() 212 key_put(auth_tok->global_auth_tok_key); in ecryptfs_destroy_mount_crypt_stat() 213 kmem_cache_free(ecryptfs_global_auth_tok_cache, auth_tok); in ecryptfs_destroy_mount_crypt_stat()
|
H A D | main.c | 188 struct ecryptfs_auth_tok *auth_tok; in ecryptfs_init_global_auth_toks() local 195 &global_auth_tok->global_auth_tok_key, &auth_tok, in ecryptfs_init_global_auth_toks()
|
/kernel/linux/linux-5.10/security/keys/encrypted-keys/ |
H A D | ecryptfs_format.c | 19 u8 *ecryptfs_get_auth_tok_key(struct ecryptfs_auth_tok *auth_tok) in ecryptfs_get_auth_tok_key() argument 21 return auth_tok->token.password.session_key_encryption_key; in ecryptfs_get_auth_tok_key() 48 int ecryptfs_fill_auth_tok(struct ecryptfs_auth_tok *auth_tok, in ecryptfs_fill_auth_tok() argument 54 auth_tok->version = (((uint16_t)(major << 8) & 0xFF00) in ecryptfs_fill_auth_tok() 56 auth_tok->token_type = ECRYPTFS_PASSWORD; in ecryptfs_fill_auth_tok() 57 strncpy((char *)auth_tok->token.password.signature, key_desc, in ecryptfs_fill_auth_tok() 59 auth_tok->token.password.session_key_encryption_key_bytes = in ecryptfs_fill_auth_tok() 62 * Removed auth_tok->token.password.salt and in ecryptfs_fill_auth_tok() 63 * auth_tok->token.password.session_key_encryption_key in ecryptfs_fill_auth_tok() 67 auth_tok in ecryptfs_fill_auth_tok() [all...] |
H A D | ecryptfs_format.h | 22 u8 *ecryptfs_get_auth_tok_key(struct ecryptfs_auth_tok *auth_tok); 24 int ecryptfs_fill_auth_tok(struct ecryptfs_auth_tok *auth_tok,
|
/kernel/linux/linux-6.6/security/keys/encrypted-keys/ |
H A D | ecryptfs_format.c | 19 u8 *ecryptfs_get_auth_tok_key(struct ecryptfs_auth_tok *auth_tok) in ecryptfs_get_auth_tok_key() argument 21 return auth_tok->token.password.session_key_encryption_key; in ecryptfs_get_auth_tok_key() 48 int ecryptfs_fill_auth_tok(struct ecryptfs_auth_tok *auth_tok, in ecryptfs_fill_auth_tok() argument 54 auth_tok->version = (((uint16_t)(major << 8) & 0xFF00) in ecryptfs_fill_auth_tok() 56 auth_tok->token_type = ECRYPTFS_PASSWORD; in ecryptfs_fill_auth_tok() 57 strncpy((char *)auth_tok->token.password.signature, key_desc, in ecryptfs_fill_auth_tok() 59 auth_tok->token.password.session_key_encryption_key_bytes = in ecryptfs_fill_auth_tok() 62 * Removed auth_tok->token.password.salt and in ecryptfs_fill_auth_tok() 63 * auth_tok->token.password.session_key_encryption_key in ecryptfs_fill_auth_tok() 67 auth_tok in ecryptfs_fill_auth_tok() [all...] |
H A D | ecryptfs_format.h | 22 u8 *ecryptfs_get_auth_tok_key(struct ecryptfs_auth_tok *auth_tok); 24 int ecryptfs_fill_auth_tok(struct ecryptfs_auth_tok *auth_tok,
|