Home
last modified time | relevance | path

Searched refs:sig_offset (Results 1 – 21 of 21) sorted by relevance

/external/vboot_reference/firmware/lib21/
Dcommon.c205 sig->sig_offset, sig->sig_size); in vb2_verify_signature()
224 return (uint8_t *)sig + sig->sig_offset; in vb2_signature_data()
313 uint32_t min_offset = 0, sig_offset; in vb2_verify_keyblock() local
343 sig_offset = block->sig_offset; in vb2_verify_keyblock()
344 for (i = 0; i < block->sig_count; i++, sig_offset = min_offset) { in vb2_verify_keyblock()
349 sig_offset); in vb2_verify_keyblock()
353 sig = (struct vb2_signature *)((uint8_t *)block + sig_offset); in vb2_verify_keyblock()
357 block->c.total_size - sig_offset); in vb2_verify_keyblock()
366 if (sig->data_size != block->sig_offset) in vb2_verify_keyblock()
369 return vb2_verify_data(block, block->sig_offset, sig, key, wb); in vb2_verify_keyblock()
[all …]
Dapi.c159 if (vb2_safe_memcmp(digest, (const uint8_t *)sig + sig->sig_offset, in vb2api_check_hash()
/external/vboot_reference/host/lib21/
Dhost_signature.c112 s.sig_offset = s.c.fixed_size + s.c.desc_size; in vb2_sign_data()
117 s.c.total_size = s.sig_offset + s.sig_size; in vb2_sign_data()
164 memcpy(buf + s.sig_offset, sig_digest, sig_digest_size); in vb2_sign_data()
169 buf + s.sig_offset, in vb2_sign_data()
220 uint32_t sig_offset, in vb2_sign_object() argument
228 rv = vb2_sign_data(&sig, buf, sig_offset, key, desc); in vb2_sign_object()
232 if (sig_offset + sig->c.total_size > c->total_size) { in vb2_sign_object()
237 memcpy(buf + sig_offset, sig, sig->c.total_size); in vb2_sign_object()
244 uint32_t sig_offset, in vb2_sign_object_multiple() argument
249 uint32_t sig_next = sig_offset; in vb2_sign_object_multiple()
[all …]
Dhost_keyblock.c52 kb.sig_offset = kb.key_offset + key->c.total_size; in vb2_keyblock_create()
53 kb.c.total_size = kb.sig_offset + sig_size; in vb2_keyblock_create()
69 if (vb2_sign_object_multiple(buf, kb.sig_offset, signing_keys, in vb2_keyblock_create()
Dhost_fw_preamble.c51 fp.sig_offset = hash_next; in vb2_fw_preamble_create()
56 fp.c.total_size = fp.sig_offset + sig_size; in vb2_fw_preamble_create()
75 if (vb2_sign_object(buf, fp.sig_offset, signing_key, NULL)) { in vb2_fw_preamble_create()
/external/vboot_reference/tests/
Dvb21_common_tests.c242 *((uint8_t *)sig + sig->sig_offset) ^= 0xab; in test_verify_hash()
325 vb2_sign_data(&sig, buf, kbuf->sig_offset, prik[0], NULL); in test_verify_keyblock()
326 memcpy(buf + kbuf->sig_offset, sig, sig->c.total_size); in test_verify_keyblock()
345 sig = (struct vb2_signature *)(buf + kbuf->sig_offset); in test_verify_keyblock()
352 sig = (struct vb2_signature *)(buf + kbuf->sig_offset); in test_verify_keyblock()
359 sig = (struct vb2_signature *)(buf + kbuf->sig_offset); in test_verify_keyblock()
456 vb2_sign_data(&sig, buf, pre->sig_offset, prikhash, NULL); in test_verify_fw_preamble()
457 memcpy(buf + pre->sig_offset, sig, sig->c.total_size); in test_verify_fw_preamble()
490 sig = (struct vb2_signature *)(buf + pre->sig_offset); in test_verify_fw_preamble()
497 sig = (struct vb2_signature *)(buf + pre->sig_offset); in test_verify_fw_preamble()
[all …]
Dvb21_api_tests.c69 uint32_t sig_offset; in reset_common_data() local
98 pre->hash_offset = sig_offset = sizeof(*pre); in reset_common_data()
108 memcpy((uint8_t *)pre + sig_offset, sig, sig->c.total_size); in reset_common_data()
109 sig_offset += sig->c.total_size; in reset_common_data()
114 sd->workbuf_preamble_size = sig_offset; in reset_common_data()
341 *((uint8_t *)sig + sig->sig_offset) ^= 0x55; in check_hash_tests()
353 *((uint8_t *)sig + sig->sig_offset) ^= 0x55; in check_hash_tests()
Dvb20_common_tests.c76 struct vb2_signature s = {.sig_offset = sizeof(s)}; in test_helper_functions()
82 struct vb2_signature s = {.sig_offset = 123}; in test_helper_functions()
147 struct vb2_signature s = {.sig_offset = sizeof(s), in test_helper_functions()
160 struct vb2_signature s = {.sig_offset = 100, in test_helper_functions()
Dvboot_common3_tests.c89 h->key_block_checksum.sig_offset = hsize; in KeyBlockVerifyTest()
107 h->key_block_signature.sig_offset = hsize; in KeyBlockVerifyTest()
223 h->preamble_signature.sig_offset = hsize; in VerifyFirmwarePreambleTest()
244 h->body_signature.sig_offset = 0; in VerifyFirmwarePreambleTest()
257 h->body_signature.sig_offset = hsize; in VerifyFirmwarePreambleTest()
Dvb20_common3_tests.c106 h->keyblock_signature.sig_offset = hsize; in test_verify_keyblock()
252 h->preamble_signature.sig_offset = hsize; in test_verify_fw_preamble()
276 h->body_signature.sig_offset = 0; in test_verify_fw_preamble()
291 h->body_signature.sig_offset = hsize; in test_verify_fw_preamble()
Dvboot_common2_tests.c174 h->preamble_signature.sig_offset = hsize; in VerifyKernelPreambleTest()
193 h->body_signature.sig_offset = 0; in VerifyKernelPreambleTest()
200 h->body_signature.sig_offset = hsize; in VerifyKernelPreambleTest()
Dvboot_firmware_tests.c177 if (42 == mpreamble[hash_fw_index].body_signature.sig_offset) { in VbExHashFirmwareBody()
183 return mpreamble[hash_fw_index].body_signature.sig_offset; in VbExHashFirmwareBody()
405 mpreamble[0].body_signature.sig_offset = VBERROR_UNKNOWN; in LoadFirmwareTest()
416 mpreamble[0].body_signature.sig_offset = 42; /* Mock hashing wrong amount */ in LoadFirmwareTest()
Dvb20_common2_tests.c86 uint32_t sig_total_size = sig->sig_offset + sig->sig_size; in test_verify_data()
Dvb21_common2_tests.c232 buf2[sig2->sig_offset] ^= 0x5A; in test_verify_data()
/external/vboot_reference/firmware/lib21/include/
Dvb2_struct.h203 uint32_t sig_offset; member
284 uint32_t sig_offset; member
322 uint32_t sig_offset; member
/external/vboot_reference/host/lib21/include/
Dhost_signature2.h69 uint32_t sig_offset,
84 uint32_t sig_offset,
/external/vboot_reference/host/lib/
Dhost_signature.c29 sig->sig_offset = sizeof(VbSignature); in SignatureAlloc()
38 sig->sig_offset = OffsetOf(sig, sig_data); in SignatureInit()
68 sig->sig_offset = sizeof(VbSignature); in CalculateChecksum()
/external/vboot_reference/firmware/lib20/
Dcommon.c16 return (uint8_t *)sig + sig->sig_offset; in vb2_signature_data()
64 sig->sig_offset, sig->sig_size); in vb2_verify_signature_inside()
/external/vboot_reference/firmware/lib/
Dvboot_common.c45 return (uint8_t *)sig + sig->sig_offset; in GetSignatureData()
50 return (const uint8_t *)sig + sig->sig_offset; in GetSignatureDataC()
100 sig->sig_offset, sig->sig_size); in VerifySignatureInside()
/external/vboot_reference/firmware/lib20/include/
Dvb2_struct.h47 uint32_t sig_offset; member
/external/vboot_reference/firmware/include/
Dvboot_struct.h30 uint64_t sig_offset; member