Home
last modified time | relevance | path

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

/fs/ecryptfs/
Dcrypto.c40 ecryptfs_decrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat,
45 ecryptfs_encrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat,
95 struct ecryptfs_crypt_stat *crypt_stat, in ecryptfs_calculate_md5() argument
100 .tfm = crypt_stat->hash_tfm, in ecryptfs_calculate_md5()
105 mutex_lock(&crypt_stat->cs_hash_tfm_mutex); in ecryptfs_calculate_md5()
117 crypt_stat->hash_tfm = desc.tfm; in ecryptfs_calculate_md5()
141 mutex_unlock(&crypt_stat->cs_hash_tfm_mutex); in ecryptfs_calculate_md5()
178 int ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat, in ecryptfs_derive_iv() argument
187 ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes); in ecryptfs_derive_iv()
193 memcpy(src, crypt_stat->root_iv, crypt_stat->iv_bytes); in ecryptfs_derive_iv()
[all …]
Dmmap.c101 struct ecryptfs_crypt_stat *crypt_stat) in set_header_info() argument
105 crypt_stat->num_header_bytes_at_front; in set_header_info()
107 crypt_stat->num_header_bytes_at_front = in set_header_info()
109 ecryptfs_write_header_metadata(page_virt + 20, crypt_stat, &written); in set_header_info()
110 crypt_stat->num_header_bytes_at_front = in set_header_info()
126 struct ecryptfs_crypt_stat *crypt_stat) in ecryptfs_copy_up_encrypted_with_header() argument
130 / crypt_stat->extent_size); in ecryptfs_copy_up_encrypted_with_header()
138 (crypt_stat->num_header_bytes_at_front in ecryptfs_copy_up_encrypted_with_header()
139 / crypt_stat->extent_size); in ecryptfs_copy_up_encrypted_with_header()
151 set_header_info(page_virt, crypt_stat); in ecryptfs_copy_up_encrypted_with_header()
[all …]
Dfile.c156 struct ecryptfs_crypt_stat *crypt_stat = NULL; in ecryptfs_open() local
185 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_open()
186 mutex_lock(&crypt_stat->cs_mutex); in ecryptfs_open()
187 if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) { in ecryptfs_open()
190 crypt_stat->flags |= (ECRYPTFS_POLICY_APPLIED in ecryptfs_open()
193 mutex_unlock(&crypt_stat->cs_mutex); in ecryptfs_open()
215 mutex_lock(&crypt_stat->cs_mutex); in ecryptfs_open()
216 crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); in ecryptfs_open()
217 mutex_unlock(&crypt_stat->cs_mutex); in ecryptfs_open()
221 mutex_lock(&crypt_stat->cs_mutex); in ecryptfs_open()
[all …]
Dkeystore.c280 struct ecryptfs_crypt_stat *crypt_stat, char **packet, in write_tag_66_packet() argument
299 data_len = (5 + ECRYPTFS_SIG_SIZE_HEX + crypt_stat->key_size); in write_tag_66_packet()
319 rc = ecryptfs_write_packet_length(&message[i], crypt_stat->key_size + 3, in write_tag_66_packet()
328 memcpy(&message[i], crypt_stat->key, crypt_stat->key_size); in write_tag_66_packet()
329 i += crypt_stat->key_size; in write_tag_66_packet()
330 for (j = 0; j < crypt_stat->key_size; j++) in write_tag_66_packet()
331 checksum += crypt_stat->key[j]; in write_tag_66_packet()
1009 struct ecryptfs_crypt_stat *crypt_stat) in decrypt_pki_encrypted_session_key() argument
1052 memcpy(crypt_stat->key, auth_tok->session_key.decrypted_key, in decrypt_pki_encrypted_session_key()
1054 crypt_stat->key_size = auth_tok->session_key.decrypted_key_size; in decrypt_pki_encrypted_session_key()
[all …]
Dinode.c159 ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat.flags |= in grow_file()
174 struct ecryptfs_crypt_stat *crypt_stat = in ecryptfs_initialize_file() local
175 &ecryptfs_inode_to_private(ecryptfs_dentry->d_inode)->crypt_stat; in ecryptfs_initialize_file()
180 crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); in ecryptfs_initialize_file()
183 crypt_stat->flags |= ECRYPTFS_NEW_FILE; in ecryptfs_initialize_file()
256 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_lookup_and_interpose_lower() local
317 crypt_stat = &ecryptfs_inode_to_private( in ecryptfs_lookup_and_interpose_lower()
318 ecryptfs_dentry->d_inode)->crypt_stat; in ecryptfs_lookup_and_interpose_lower()
320 if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) in ecryptfs_lookup_and_interpose_lower()
321 ecryptfs_set_default_sizes(crypt_stat); in ecryptfs_lookup_and_interpose_lower()
[all …]
Decryptfs_kernel.h300 struct ecryptfs_crypt_stat crypt_stat; member
307 struct ecryptfs_crypt_stat *crypt_stat; member
400 struct ecryptfs_crypt_stat *crypt_stat; member
633 struct ecryptfs_crypt_stat *crypt_stat,
640 int ecryptfs_compute_root_iv(struct ecryptfs_crypt_stat *crypt_stat);
642 void ecryptfs_init_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat);
643 void ecryptfs_destroy_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat);
646 int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat);
659 void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat);
661 struct ecryptfs_crypt_stat *crypt_stat,
[all …]
Dsuper.c56 ecryptfs_init_crypt_stat(&inode_info->crypt_stat); in ecryptfs_alloc_inode()
92 ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat); in ecryptfs_destroy_inode()