/trusty/user/app/storage/ |
D | rpmb.c | 115 struct rpmb_key* mac) { in rpmb_mac() argument 136 hmac_ret = HMAC_Final(&hmac_ctx, mac->byte, &md_len); in rpmb_mac() 137 if (md_len != sizeof(mac->byte)) { in rpmb_mac() 138 fprintf(stderr, "bad md_len %d != %zd\n", md_len, sizeof(mac->byte)); in rpmb_mac() 155 struct rpmb_key* mac, in rpmb_check_response() argument 178 if (i == res_count - 1 && mac && in rpmb_check_response() 179 CRYPTO_memcmp(res[i].key_mac.byte, mac->byte, sizeof(mac->byte))) { in rpmb_check_response() 242 struct rpmb_key mac; in rpmb_read_counter() local 255 ret = rpmb_mac(state->key, &res, 1, &mac); in rpmb_read_counter() 260 rpmb_dprint_key(" key/mac ", res.key_mac, " expected mac ", mac); in rpmb_read_counter() [all …]
|
D | block_mac.h | 35 uint8_t data[sizeof(data_block_t) + sizeof(struct mac)]; 57 const struct mac* mac); 85 block_mac_set_mac(tr, dest, (const struct mac*)block_mac_to_mac(tr, src)); in block_mac_copy_mac()
|
D | crypt.h | 27 struct mac { struct 58 struct mac* mac,
|
D | block_mac.c | 34 assert(size <= sizeof(struct mac)); in block_mac_mac_size() 70 const struct mac* mac) { in block_mac_set_mac() argument 71 memcpy(block_mac->data + block_mac_block_size(tr->fs), mac, in block_mac_set_mac()
|
D | crypt.c | 193 struct mac* mac, in calculate_mac() argument 220 if (md_len < sizeof(*mac)) { in calculate_mac() 221 fprintf(stderr, "bad md_len %d < %zd\n", md_len, sizeof(*mac)); in calculate_mac() 225 memcpy(mac, mac_buf, sizeof(*mac)); in calculate_mac()
|
D | block_cache_priv.h | 123 struct mac mac; member
|
D | block_cache.c | 241 ret = calculate_mac(entry->key, &entry->mac, entry->data, in block_cache_complete_read() 391 struct mac mac; in block_cache_entry_encrypt() local 417 mac = entry->mac; in block_cache_entry_encrypt() 421 ret = calculate_mac(entry->key, &entry->mac, entry->data, in block_cache_entry_encrypt() 427 assert(!CRYPTO_memcmp(&mac, &entry->mac, sizeof(mac))); in block_cache_entry_encrypt() 755 const void* mac, in block_cache_load_entry() argument 778 if (mac) { in block_cache_load_entry() 779 if (CRYPTO_memcmp(&entry->mac, mac, mac_size)) { in block_cache_load_entry() 821 const void* mac, in block_cache_get() argument 845 res = block_cache_load_entry(entry, mac, mac_size); in block_cache_get() [all …]
|
D | README.md | 33 - crypt - Encrypt/decrypt, mac and hash functions. 38 - block_mac - Helper functions to bundle block numbers and mac values. 45 - block_map - Maps a logical block number to a physical block number and a mac. 65 different block, block number and mac sizes. Two super blocks are used to allow 82 system. The data value is a block-mac that points to a file-entry block. 101 numbers and 16 byte mac values:
|
D | super.c | 500 if (!dev->tamper_detecting && super->mac_size != sizeof(struct mac)) { in super_block_valid() 894 assert(fs->mac_size <= sizeof(struct mac)); in fs_init_from_super() 895 assert(fs->mac_size == sizeof(struct mac) || fs->dev->tamper_detecting); in fs_init_from_super()
|
D | block_device_tipc.c | 297 dev_ns->dev.mac_size = sizeof(struct mac); in block_device_tipc_init_dev_ns()
|
/trusty/user/app/storage/rpmb_dev/ |
D | rpmb_dev.c | 55 struct rpmb_key* mac) { in rpmb_mac() argument 74 hmac_ret = HMAC_Final(hmac_ctx, mac->byte, &md_len); in rpmb_mac() 75 if (md_len != sizeof(mac->byte)) { in rpmb_mac() 76 fprintf(stderr, "bad md_len %d != %zd\n", md_len, sizeof(mac->byte)); in rpmb_mac() 311 struct rpmb_key mac; in rpmb_dev_process_cmd() local 329 if (rpmb_mac(s->header.key, s->cmd, s->cmd_count, &mac) != 0) { in rpmb_dev_process_cmd() 334 mac = s->cmd[s->cmd_count - 1].key_mac; in rpmb_dev_process_cmd() 336 memset(mac.byte, 0, sizeof(mac.byte)); in rpmb_dev_process_cmd() 339 if (memcmp(&mac, s->cmd[s->cmd_count - 1].key_mac.byte, sizeof(mac))) { in rpmb_dev_process_cmd()
|
/trusty/user/app/keymaster/ |
D | openssl_keymaster_enforcement.cpp | 226 response.error = hmacSha256(hmac_key_, data_chunks, 5, &response.token.mac); in VerifyAuthorization() 268 KeymasterBlob mac; in ComputeHmac() local 269 auto error = hmacSha256(hmac_key_, data_chunks, 1, &mac); in ComputeHmac() 275 if (mac.size() != retval.size()) { in ComputeHmac() 278 std::copy(mac.begin(), mac.end(), retval.begin()); in ComputeHmac()
|
/trusty/user/base/lib/hwbcc/test/ |
D | main.cpp | 63 TEST_F(swbcc, mac) { in TEST_F() argument
|
/trusty/user/app/storage/test/block_host_test/ |
D | block_test.c | 98 struct mac mac; member
|