• Home
  • Raw
  • Download

Lines Matching refs:key_rec

340 parse_tag_67_packet(struct ecryptfs_key_record *key_rec,  in parse_tag_67_packet()  argument
378 rc = ecryptfs_parse_packet_length(&data[i], &key_rec->enc_key_size, in parse_tag_67_packet()
386 if (message_len < (i + key_rec->enc_key_size)) { in parse_tag_67_packet()
389 __func__, message_len, (i + key_rec->enc_key_size)); in parse_tag_67_packet()
392 if (key_rec->enc_key_size > ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES) { in parse_tag_67_packet()
396 key_rec->enc_key_size, in parse_tag_67_packet()
400 memcpy(key_rec->enc_key, &data[i], key_rec->enc_key_size); in parse_tag_67_packet()
1844 struct ecryptfs_key_record *key_rec) in pki_encrypt_session_key() argument
1874 rc = parse_tag_67_packet(key_rec, msg); in pki_encrypt_session_key()
1898 struct ecryptfs_key_record *key_rec, size_t *packet_size) in write_tag_1_packet() argument
1907 ecryptfs_from_hex(key_rec->sig, auth_tok->token.private_key.signature, in write_tag_1_packet()
1914 memcpy(key_rec->enc_key, in write_tag_1_packet()
1922 rc = pki_encrypt_session_key(auth_tok, crypt_stat, key_rec); in write_tag_1_packet()
1930 ecryptfs_dump_hex(key_rec->enc_key, key_rec->enc_key_size); in write_tag_1_packet()
1940 + key_rec->enc_key_size); /* Encrypted key size */ in write_tag_1_packet()
1959 memcpy(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE); in write_tag_1_packet()
1962 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_1_packet()
1963 key_rec->enc_key_size); in write_tag_1_packet()
1964 (*packet_size) += key_rec->enc_key_size; in write_tag_1_packet()
2050 struct ecryptfs_key_record *key_rec, size_t *packet_size) in write_tag_3_packet() argument
2070 ecryptfs_from_hex(key_rec->sig, auth_tok->token.password.signature, in write_tag_3_packet()
2100 key_rec->enc_key_size = in write_tag_3_packet()
2110 key_rec->enc_key_size); in write_tag_3_packet()
2111 memcpy(key_rec->enc_key, in write_tag_3_packet()
2113 key_rec->enc_key_size); in write_tag_3_packet()
2134 rc = virt_to_scatterlist(crypt_stat->key, key_rec->enc_key_size, in write_tag_3_packet()
2140 rc, key_rec->enc_key_size); in write_tag_3_packet()
2144 rc = virt_to_scatterlist(key_rec->enc_key, key_rec->enc_key_size, in write_tag_3_packet()
2151 key_rec->enc_key_size); in write_tag_3_packet()
2168 (*key_rec).enc_key_size); in write_tag_3_packet()
2177 key_rec->enc_key_size); in write_tag_3_packet()
2178 ecryptfs_dump_hex(key_rec->enc_key, in write_tag_3_packet()
2179 key_rec->enc_key_size); in write_tag_3_packet()
2192 + key_rec->enc_key_size); /* Encrypted key size */ in write_tag_3_packet()
2230 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_3_packet()
2231 key_rec->enc_key_size); in write_tag_3_packet()
2232 (*packet_size) += key_rec->enc_key_size; in write_tag_3_packet()
2270 struct ecryptfs_key_record *key_rec; in ecryptfs_generate_key_packet_set() local
2276 key_rec = kmem_cache_alloc(ecryptfs_key_record_cache, GFP_KERNEL); in ecryptfs_generate_key_packet_set()
2277 if (!key_rec) { in ecryptfs_generate_key_packet_set()
2283 memset(key_rec, 0, sizeof(*key_rec)); in ecryptfs_generate_key_packet_set()
2302 crypt_stat, key_rec, in ecryptfs_generate_key_packet_set()
2312 key_rec->sig, in ecryptfs_generate_key_packet_set()
2323 crypt_stat, key_rec, &written); in ecryptfs_generate_key_packet_set()
2344 kmem_cache_free(ecryptfs_key_record_cache, key_rec); in ecryptfs_generate_key_packet_set()