Home
last modified time | relevance | path

Searched refs:crypt_stat (Results 1 – 8 of 8) sorted by relevance

/Linux-v5.4/fs/ecryptfs/
Dcrypto.c74 struct ecryptfs_crypt_stat *crypt_stat, in ecryptfs_calculate_md5() argument
80 tfm = crypt_stat->hash_tfm; in ecryptfs_calculate_md5()
125 int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat, in ecryptfs_derive_iv() argument
134 ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes); in ecryptfs_derive_iv()
140 memcpy(src, crypt_stat->root_iv, crypt_stat->iv_bytes); in ecryptfs_derive_iv()
141 memset((src + crypt_stat->iv_bytes), 0, 16); in ecryptfs_derive_iv()
142 snprintf((src + crypt_stat->iv_bytes), 16, "%lld", offset); in ecryptfs_derive_iv()
145 ecryptfs_dump_hex(src, (crypt_stat->iv_bytes + 16)); in ecryptfs_derive_iv()
147 rc = ecryptfs_calculate_md5(dst, crypt_stat, src, in ecryptfs_derive_iv()
148 (crypt_stat->iv_bytes + 16)); in ecryptfs_derive_iv()
[all …]
Dmmap.c69 struct ecryptfs_crypt_stat *crypt_stat) in strip_xattr_flag() argument
71 if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) { in strip_xattr_flag()
74 crypt_stat->flags &= ~ECRYPTFS_METADATA_IN_XATTR; in strip_xattr_flag()
75 ecryptfs_write_crypt_stat_flags(page_virt, crypt_stat, in strip_xattr_flag()
77 crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR; in strip_xattr_flag()
109 struct ecryptfs_crypt_stat *crypt_stat) in ecryptfs_copy_up_encrypted_with_header() argument
113 / crypt_stat->extent_size); in ecryptfs_copy_up_encrypted_with_header()
121 (crypt_stat->metadata_size / crypt_stat->extent_size); in ecryptfs_copy_up_encrypted_with_header()
135 strip_xattr_flag(page_virt + 16, crypt_stat); in ecryptfs_copy_up_encrypted_with_header()
137 crypt_stat, in ecryptfs_copy_up_encrypted_with_header()
[all …]
Dkeystore.c286 struct ecryptfs_crypt_stat *crypt_stat, char **packet, in write_tag_66_packet() argument
305 data_len = (5 + ECRYPTFS_SIG_SIZE_HEX + crypt_stat->key_size); in write_tag_66_packet()
325 rc = ecryptfs_write_packet_length(&message[i], crypt_stat->key_size + 3, in write_tag_66_packet()
334 memcpy(&message[i], crypt_stat->key, crypt_stat->key_size); in write_tag_66_packet()
335 i += crypt_stat->key_size; in write_tag_66_packet()
336 for (j = 0; j < crypt_stat->key_size; j++) in write_tag_66_packet()
337 checksum += crypt_stat->key[j]; in write_tag_66_packet()
1126 struct ecryptfs_crypt_stat *crypt_stat) in decrypt_pki_encrypted_session_key() argument
1169 memcpy(crypt_stat->key, auth_tok->session_key.decrypted_key, in decrypt_pki_encrypted_session_key()
1171 crypt_stat->key_size = auth_tok->session_key.decrypted_key_size; in decrypt_pki_encrypted_session_key()
[all …]
Dfile.c131 struct ecryptfs_crypt_stat *crypt_stat; in read_or_initialize_metadata() local
134 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in read_or_initialize_metadata()
137 mutex_lock(&crypt_stat->cs_mutex); in read_or_initialize_metadata()
139 if (crypt_stat->flags & ECRYPTFS_POLICY_APPLIED && in read_or_initialize_metadata()
140 crypt_stat->flags & ECRYPTFS_KEY_VALID) { in read_or_initialize_metadata()
150 crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED in read_or_initialize_metadata()
165 mutex_unlock(&crypt_stat->cs_mutex); in read_or_initialize_metadata()
194 struct ecryptfs_crypt_stat *crypt_stat = NULL; in ecryptfs_open() local
209 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_open()
210 mutex_lock(&crypt_stat->cs_mutex); in ecryptfs_open()
[all …]
Dinode.c214 struct ecryptfs_crypt_stat *crypt_stat = in ecryptfs_initialize_file() local
215 &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; in ecryptfs_initialize_file()
220 crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); in ecryptfs_initialize_file()
287 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_i_size_read() local
299 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_i_size_read()
301 if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) in ecryptfs_i_size_read()
302 ecryptfs_set_default_sizes(crypt_stat); in ecryptfs_i_size_read()
309 crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR; in ecryptfs_i_size_read()
692 upper_size_to_lower_size(struct ecryptfs_crypt_stat *crypt_stat, in upper_size_to_lower_size() argument
697 lower_size = ecryptfs_lower_header_size(crypt_stat); in upper_size_to_lower_size()
[all …]
Decryptfs_kernel.h258 struct ecryptfs_crypt_stat crypt_stat; member
266 struct ecryptfs_crypt_stat *crypt_stat; member
360 struct ecryptfs_crypt_stat *crypt_stat; member
424 ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat) in ecryptfs_lower_header_size() argument
426 if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) in ecryptfs_lower_header_size()
428 return crypt_stat->metadata_size; in ecryptfs_lower_header_size()
579 int ecryptfs_compute_root_iv(struct ecryptfs_crypt_stat *crypt_stat);
581 int ecryptfs_init_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat);
582 void ecryptfs_destroy_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat);
585 int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat);
[all …]
Dread_write.c97 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_write() local
104 crypt_stat = &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; in ecryptfs_write()
170 if (crypt_stat->flags & ECRYPTFS_ENCRYPTED) in ecryptfs_write()
187 if (crypt_stat->flags & ECRYPTFS_ENCRYPTED) { in ecryptfs_write()
Dsuper.c44 if (ecryptfs_init_crypt_stat(&inode_info->crypt_stat)) { in ecryptfs_alloc_inode()
79 ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat); in ecryptfs_destroy_inode()