/aosp12/system/keymaster/key_blob_utils/ |
H A D | auth_encrypted_key_blob.cpp | 82 const KeymasterKeyBlob& master_key, keymaster_error_t* error) { in DeriveAesGcmKeyEncryptionKey() argument 88 if (!HKDF_extract(prk.peek_write(), &out_len, EVP_sha256(), master_key.key_material, in DeriveAesGcmKeyEncryptionKey() 89 master_key.key_material_size, nullptr /* salt */, 0 /* salt_len */)) { in DeriveAesGcmKeyEncryptionKey() 117 const KeymasterKeyBlob& master_key, // in AesGcmEncryptKey() argument 163 const KeymasterKeyBlob& master_key, keymaster_error_t* error) { in AesGcmDecryptKey() argument 292 const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, in EncryptKey() argument 304 *error = OcbEncryptKey(hw_enforced, sw_enforced, hidden, master_key, plaintext, in EncryptKey() 312 return AesGcmEncryptKey(hw_enforced, sw_enforced, hidden, master_key, plaintext, format, in EncryptKey() 323 const KeymasterKeyBlob& master_key, keymaster_error_t* error) { in DecryptKey() argument 331 *error = OcbDecryptKey(key.hw_enforced, key.sw_enforced, hidden, master_key, in DecryptKey() [all …]
|
H A D | ocb_utils.cpp | 68 const KeymasterKeyBlob& master_key, in InitializeKeyWrappingContext() argument 97 AES_set_encrypt_key(master_key.key_material, master_key.key_material_size * 8, &aes_key)) in InitializeKeyWrappingContext() 114 const KeymasterKeyBlob& master_key, in OcbEncryptKey() argument 126 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbEncryptKey() 146 const KeymasterKeyBlob& master_key, in OcbDecryptKey() argument 158 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbDecryptKey()
|
/aosp12/system/keymaster/include/keymaster/key_blob_utils/ |
H A D | ocb_utils.h | 36 const KeymasterKeyBlob& master_key, 42 const KeymasterKeyBlob& master_key,
|
H A D | auth_encrypted_key_blob.h | 65 const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, 88 const KeymasterKeyBlob& master_key, keymaster_error_t* error);
|
/aosp12/system/vold/ |
H A D | cryptfs.cpp | 185 unsigned char master_key[MAX_KEY_LEN]; /* The encrypted key for decrypting the filesystem */ member 1112 static void convert_key_to_hex_ascii(const unsigned char* master_key, unsigned int keysize, in convert_key_to_hex_ascii() argument 1119 nibble = (master_key[i] >> 4) & 0xf; in convert_key_to_hex_ascii() 1122 nibble = master_key[i] & 0xf; in convert_key_to_hex_ascii() 1161 static int create_crypto_blk_dev(struct crypt_mnt_ftr* crypt_ftr, const unsigned char* master_key, in create_crypto_blk_dev() argument 1169 convert_key_to_hex_ascii(master_key, crypt_ftr->keysize, master_key_ascii); in create_crypto_blk_dev() 1465 static int create_encrypted_random_key(const char* passwd, unsigned char* master_key, in create_encrypted_random_key() argument 1478 return encrypt_master_key(passwd, salt, key_buf, master_key, crypt_ftr); in create_encrypted_random_key() 1922 crypt_ftr->master_key, crypt_ftr); in test_mount_encrypted_fs() 2289 crypt_ftr.master_key, crypt_ftr.salt, &crypt_ftr)) { in cryptfs_enable_internal() [all …]
|