Lines Matching refs:session_key
139 write_tag_64_packet(char *signature, struct ecryptfs_session_key *session_key,
157 + session_key->encrypted_key_size);
177 session_key->encrypted_key_size,
185 memcpy(&message[i], session_key->encrypted_key,
186 session_key->encrypted_key_size);
187 i += session_key->encrypted_key_size;
194 parse_tag_65_packet(struct ecryptfs_session_key *session_key, u8 *cipher_code,
252 session_key->decrypted_key_size = m_size - 3;
253 if (session_key->decrypted_key_size > ECRYPTFS_MAX_KEY_BYTES) {
256 session_key->decrypted_key_size,
261 memcpy(session_key->decrypted_key, &data[i],
262 session_key->decrypted_key_size);
263 i += session_key->decrypted_key_size;
266 for (i = 0; i < session_key->decrypted_key_size; i++)
267 checksum += session_key->decrypted_key[i];
1039 rc = write_tag_64_packet(auth_tok_sig, &(auth_tok->session_key),
1058 rc = parse_tag_65_packet(&(auth_tok->session_key),
1065 auth_tok->session_key.flags |= ECRYPTFS_CONTAINS_DECRYPTED_KEY;
1066 memcpy(crypt_stat->key, auth_tok->session_key.decrypted_key,
1067 auth_tok->session_key.decrypted_key_size);
1068 crypt_stat->key_size = auth_tok->session_key.decrypted_key_size;
1197 (*new_auth_tok)->session_key.encrypted_key_size =
1199 if ((*new_auth_tok)->session_key.encrypted_key_size
1206 memcpy((*new_auth_tok)->session_key.encrypted_key,
1208 (*packet_size) += (*new_auth_tok)->session_key.encrypted_key_size;
1209 (*new_auth_tok)->session_key.flags &=
1211 (*new_auth_tok)->session_key.flags |=
1215 (*new_auth_tok)->session_key.flags &=
1217 (*new_auth_tok)->session_key.flags &=
1319 (*new_auth_tok)->session_key.encrypted_key_size =
1321 if ((*new_auth_tok)->session_key.encrypted_key_size
1346 (*new_auth_tok)->session_key.encrypted_key_size;
1369 * (*new_auth_tok)->session_key.encrypted_key_size =
1371 memcpy((*new_auth_tok)->session_key.encrypted_key,
1373 (*new_auth_tok)->session_key.encrypted_key_size);
1375 (*new_auth_tok)->session_key.encrypted_key_size;
1376 (*new_auth_tok)->session_key.flags &=
1378 (*new_auth_tok)->session_key.flags |=
1391 (*new_auth_tok)->session_key.flags &=
1393 (*new_auth_tok)->session_key.flags &=
1608 rc = virt_to_scatterlist(auth_tok->session_key.encrypted_key,
1609 auth_tok->session_key.encrypted_key_size,
1613 "auth_tok->session_key.encrypted_key to scatterlist; "
1615 "auth_tok->session_key.encrypted_key_size = [%d]\n", rc,
1616 auth_tok->session_key.encrypted_key_size);
1619 auth_tok->session_key.decrypted_key_size =
1620 auth_tok->session_key.encrypted_key_size;
1621 rc = virt_to_scatterlist(auth_tok->session_key.decrypted_key,
1622 auth_tok->session_key.decrypted_key_size,
1626 "auth_tok->session_key.decrypted_key to scatterlist; "
1641 auth_tok->session_key.encrypted_key_size);
1647 auth_tok->session_key.flags |= ECRYPTFS_CONTAINS_DECRYPTED_KEY;
1648 memcpy(crypt_stat->key, auth_tok->session_key.decrypted_key,
1649 auth_tok->session_key.decrypted_key_size);
1943 auth_tok->session_key.encrypted_key[i];
1946 auth_tok->session_key.encrypted_key,
1947 auth_tok->session_key.encrypted_key_size);
1950 if (auth_tok->session_key.encrypted_key_size == 0)
1951 auth_tok->session_key.encrypted_key_size =
2122 if (auth_tok->session_key.encrypted_key_size == 0)
2123 auth_tok->session_key.encrypted_key_size =
2128 auth_tok->session_key.encrypted_key_size = 32;
2130 auth_tok->session_key.encrypted_key_size = crypt_stat->key_size;
2132 auth_tok->session_key.encrypted_key_size;
2134 for (i = 0; i < auth_tok->session_key.encrypted_key_size; i++)
2136 auth_tok->session_key.encrypted_key[i];
2139 "using auth_tok->session_key.encrypted_key, "
2143 auth_tok->session_key.encrypted_key,