Lines Matching refs:key_rec

346 parse_tag_67_packet(struct ecryptfs_key_record *key_rec,  in parse_tag_67_packet()  argument
384 rc = ecryptfs_parse_packet_length(&data[i], &key_rec->enc_key_size, in parse_tag_67_packet()
392 if (message_len < (i + key_rec->enc_key_size)) { in parse_tag_67_packet()
395 __func__, message_len, (i + key_rec->enc_key_size)); in parse_tag_67_packet()
398 if (key_rec->enc_key_size > ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES) { in parse_tag_67_packet()
402 key_rec->enc_key_size, in parse_tag_67_packet()
406 memcpy(key_rec->enc_key, &data[i], key_rec->enc_key_size); in parse_tag_67_packet()
1964 struct ecryptfs_key_record *key_rec) in pki_encrypt_session_key() argument
1996 rc = parse_tag_67_packet(key_rec, msg); in pki_encrypt_session_key()
2022 struct ecryptfs_key_record *key_rec, size_t *packet_size) in write_tag_1_packet() argument
2031 ecryptfs_from_hex(key_rec->sig, auth_tok->token.private_key.signature, in write_tag_1_packet()
2038 memcpy(key_rec->enc_key, in write_tag_1_packet()
2049 key_rec); in write_tag_1_packet()
2057 ecryptfs_dump_hex(key_rec->enc_key, key_rec->enc_key_size); in write_tag_1_packet()
2067 + key_rec->enc_key_size); /* Encrypted key size */ in write_tag_1_packet()
2086 memcpy(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE); in write_tag_1_packet()
2089 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_1_packet()
2090 key_rec->enc_key_size); in write_tag_1_packet()
2091 (*packet_size) += key_rec->enc_key_size; in write_tag_1_packet()
2177 struct ecryptfs_key_record *key_rec, size_t *packet_size) in write_tag_3_packet() argument
2195 ecryptfs_from_hex(key_rec->sig, auth_tok->token.password.signature, in write_tag_3_packet()
2224 key_rec->enc_key_size = in write_tag_3_packet()
2234 key_rec->enc_key_size); in write_tag_3_packet()
2235 memcpy(key_rec->enc_key, in write_tag_3_packet()
2237 key_rec->enc_key_size); in write_tag_3_packet()
2258 rc = virt_to_scatterlist(crypt_stat->key, key_rec->enc_key_size, in write_tag_3_packet()
2264 rc, key_rec->enc_key_size); in write_tag_3_packet()
2268 rc = virt_to_scatterlist(key_rec->enc_key, key_rec->enc_key_size, in write_tag_3_packet()
2275 key_rec->enc_key_size); in write_tag_3_packet()
2306 (*key_rec).enc_key_size, NULL); in write_tag_3_packet()
2317 key_rec->enc_key_size); in write_tag_3_packet()
2318 ecryptfs_dump_hex(key_rec->enc_key, in write_tag_3_packet()
2319 key_rec->enc_key_size); in write_tag_3_packet()
2332 + key_rec->enc_key_size); /* Encrypted key size */ in write_tag_3_packet()
2370 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_3_packet()
2371 key_rec->enc_key_size); in write_tag_3_packet()
2372 (*packet_size) += key_rec->enc_key_size; in write_tag_3_packet()
2410 struct ecryptfs_key_record *key_rec; in ecryptfs_generate_key_packet_set() local
2416 key_rec = kmem_cache_alloc(ecryptfs_key_record_cache, GFP_KERNEL); in ecryptfs_generate_key_packet_set()
2417 if (!key_rec) { in ecryptfs_generate_key_packet_set()
2423 memset(key_rec, 0, sizeof(*key_rec)); in ecryptfs_generate_key_packet_set()
2437 crypt_stat, key_rec, in ecryptfs_generate_key_packet_set()
2449 key_rec->sig, in ecryptfs_generate_key_packet_set()
2460 crypt_stat, key_rec, &written); in ecryptfs_generate_key_packet_set()
2483 kmem_cache_free(ecryptfs_key_record_cache, key_rec); in ecryptfs_generate_key_packet_set()