Lines Matching refs:key_rec

348 parse_tag_67_packet(struct ecryptfs_key_record *key_rec,  in parse_tag_67_packet()  argument
386 rc = ecryptfs_parse_packet_length(&data[i], &key_rec->enc_key_size, in parse_tag_67_packet()
394 if (message_len < (i + key_rec->enc_key_size)) { in parse_tag_67_packet()
397 __func__, message_len, (i + key_rec->enc_key_size)); in parse_tag_67_packet()
400 if (key_rec->enc_key_size > ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES) { in parse_tag_67_packet()
404 key_rec->enc_key_size, in parse_tag_67_packet()
408 memcpy(key_rec->enc_key, &data[i], key_rec->enc_key_size); in parse_tag_67_packet()
1966 struct ecryptfs_key_record *key_rec) in pki_encrypt_session_key() argument
1998 rc = parse_tag_67_packet(key_rec, msg); in pki_encrypt_session_key()
2024 struct ecryptfs_key_record *key_rec, size_t *packet_size) in write_tag_1_packet() argument
2033 ecryptfs_from_hex(key_rec->sig, auth_tok->token.private_key.signature, in write_tag_1_packet()
2040 memcpy(key_rec->enc_key, in write_tag_1_packet()
2051 key_rec); in write_tag_1_packet()
2059 ecryptfs_dump_hex(key_rec->enc_key, key_rec->enc_key_size); in write_tag_1_packet()
2069 + key_rec->enc_key_size); /* Encrypted key size */ in write_tag_1_packet()
2088 memcpy(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE); in write_tag_1_packet()
2091 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_1_packet()
2092 key_rec->enc_key_size); in write_tag_1_packet()
2093 (*packet_size) += key_rec->enc_key_size; in write_tag_1_packet()
2179 struct ecryptfs_key_record *key_rec, size_t *packet_size) in write_tag_3_packet() argument
2197 ecryptfs_from_hex(key_rec->sig, auth_tok->token.password.signature, in write_tag_3_packet()
2226 key_rec->enc_key_size = in write_tag_3_packet()
2236 key_rec->enc_key_size); in write_tag_3_packet()
2237 memcpy(key_rec->enc_key, in write_tag_3_packet()
2239 key_rec->enc_key_size); in write_tag_3_packet()
2260 rc = virt_to_scatterlist(crypt_stat->key, key_rec->enc_key_size, in write_tag_3_packet()
2266 rc, key_rec->enc_key_size); in write_tag_3_packet()
2270 rc = virt_to_scatterlist(key_rec->enc_key, key_rec->enc_key_size, in write_tag_3_packet()
2277 key_rec->enc_key_size); in write_tag_3_packet()
2308 (*key_rec).enc_key_size, NULL); in write_tag_3_packet()
2319 key_rec->enc_key_size); in write_tag_3_packet()
2320 ecryptfs_dump_hex(key_rec->enc_key, in write_tag_3_packet()
2321 key_rec->enc_key_size); in write_tag_3_packet()
2334 + key_rec->enc_key_size); /* Encrypted key size */ in write_tag_3_packet()
2372 memcpy(&dest[(*packet_size)], key_rec->enc_key, in write_tag_3_packet()
2373 key_rec->enc_key_size); in write_tag_3_packet()
2374 (*packet_size) += key_rec->enc_key_size; in write_tag_3_packet()
2412 struct ecryptfs_key_record *key_rec; in ecryptfs_generate_key_packet_set() local
2418 key_rec = kmem_cache_alloc(ecryptfs_key_record_cache, GFP_KERNEL); in ecryptfs_generate_key_packet_set()
2419 if (!key_rec) { in ecryptfs_generate_key_packet_set()
2425 memset(key_rec, 0, sizeof(*key_rec)); in ecryptfs_generate_key_packet_set()
2439 crypt_stat, key_rec, in ecryptfs_generate_key_packet_set()
2451 key_rec->sig, in ecryptfs_generate_key_packet_set()
2462 crypt_stat, key_rec, &written); in ecryptfs_generate_key_packet_set()
2485 kmem_cache_free(ecryptfs_key_record_cache, key_rec); in ecryptfs_generate_key_packet_set()