Home
last modified time | relevance | path

Searched refs:sig_size (Results 1 – 25 of 34) sorted by relevance

12

/external/vboot_reference/host/lib/
Dhost_signature.c24 VbSignature* SignatureAlloc(uint64_t sig_size, uint64_t data_size) { in SignatureAlloc() argument
25 VbSignature* sig = (VbSignature*)malloc(sizeof(VbSignature) + sig_size); in SignatureAlloc()
30 sig->sig_size = sig_size; in SignatureAlloc()
37 uint64_t sig_size, uint64_t data_size) { in SignatureInit() argument
39 sig->sig_size = sig_size; in SignatureInit()
45 if (dest->sig_size < src->sig_size) in SignatureCopy()
47 dest->sig_size = src->sig_size; in SignatureCopy()
49 Memcpy(GetSignatureData(dest), GetSignatureDataC(src), src->sig_size); in SignatureCopy()
69 sig->sig_size = SHA512_DIGEST_SIZE; in CalculateChecksum()
Dhost_common.c27 body_signature->sig_size); in CreateFirmwarePreamble()
42 block_sig_dest = body_sig_dest + body_signature->sig_size; in CreateFirmwarePreamble()
57 body_signature->sig_size, 0); in CreateFirmwarePreamble()
87 body_signature->sig_size); in CreateKernelPreamble()
104 block_sig_dest = body_sig_dest + body_signature->sig_size; in CreateKernelPreamble()
119 body_signature->sig_size, 0); in CreateKernelPreamble()
/external/vboot_reference/firmware/2lib/
D2rsa.c193 uint32_t sig_size = vb2_rsa_sig_size(sig_alg); in vb2_packed_key_size() local
195 if (!sig_size) in vb2_packed_key_size()
203 return 2 * sig_size + 2 * sizeof(uint32_t); in vb2_packed_key_size()
246 uint32_t sig_size = vb2_rsa_sig_size(key->sig_alg); in vb2_check_padding() local
248 uint32_t pad_size = sig_size - hash_size; in vb2_check_padding()
254 if (!sig_size || !hash_size || hash_size > sig_size) in vb2_check_padding()
299 int sig_size; in vb2_rsa_verify_digest() local
306 sig_size = vb2_rsa_sig_size(key->sig_alg); in vb2_rsa_verify_digest()
307 if (!sig_size) { in vb2_rsa_verify_digest()
314 if (key_bytes != sig_size) { in vb2_rsa_verify_digest()
[all …]
/external/fsverity-utils/
Dsign.c289 int sig_size; in sign_pkcs7() local
326 sig_size = BIO_get_mem_data(bio, &sig); in sign_pkcs7()
327 *sig_ret = xmemdup(sig, sig_size); in sign_pkcs7()
328 *sig_size_ret = sig_size; in sign_pkcs7()
469 const void *sig, int sig_size) in write_signature() argument
476 ok = full_write(&file, sig, sig_size); in write_signature()
498 int sig_size; in append_signed_measurement() local
523 &sig, &sig_size)) in append_signed_measurement()
527 !write_signature(params->signature_file, sig, sig_size)) in append_signed_measurement()
532 params->hash_alg, &sig, &sig_size)) in append_signed_measurement()
[all …]
/external/epid-sdk/tools/revokesig/src/
Dmain.c83 size_t sig_size, char const* msg_str, size_t msg_size,
259 size_t sig_size, char const* msg_str, size_t msg_size, in FillRequest() argument
276 for (i = 0; i < sig_size; i++) { in FillRequest()
292 size_t sig_size = 0; in MakeRequest() local
331 sig = NewBufferFromFile(sig_file, &sig_size); in MakeRequest()
369 log_msg(" [in] Signature Len: %d", (int)sig_size); in MakeRequest()
371 PrintBuffer(sig, sig_size); in MakeRequest()
379 req_extra_space += sig_size + kMsgSizeSize + msg_size; in MakeRequest()
404 FillRequest(&pubkey, sig, sig_size, msg_str, msg_size, req_buf, req_size, in MakeRequest()
/external/vboot_reference/firmware/lib/cryptolib/
Drsa_utility.c92 int sig_size; in RSAVerifyBinary_f() local
99 sig_size = siglen_map[algorithm]; in RSAVerifyBinary_f()
113 success = RSAVerify(verification_key, sig, (uint32_t)sig_size, in RSAVerifyBinary_f()
131 int sig_size; in RSAVerifyBinaryWithDigest_f() local
138 sig_size = siglen_map[algorithm]; in RSAVerifyBinaryWithDigest_f()
151 success = RSAVerify(verification_key, sig, (uint32_t)sig_size, in RSAVerifyBinaryWithDigest_f()
/external/vboot_reference/host/lib21/
Dhost_keyblock.c35 uint32_t sig_size; in vb2_keyblock_create() local
46 if (vb2_sig_size_for_keys(&sig_size, signing_keys, signing_key_count)) in vb2_keyblock_create()
53 kb.c.total_size = kb.sig_offset + sig_size; in vb2_keyblock_create()
Dhost_fw_preamble.c39 uint32_t sig_size; in vb2_fw_preamble_create() local
53 if (vb2_sig_size_for_key(&sig_size, signing_key, NULL)) in vb2_fw_preamble_create()
56 fp.c.total_size = fp.sig_offset + sig_size; in vb2_fw_preamble_create()
Dhost_signature.c113 s.sig_size = vb2_sig_size(key->sig_alg, key->hash_alg); in vb2_sign_data()
114 if (!s.sig_size) in vb2_sign_data()
117 s.c.total_size = s.sig_offset + s.sig_size; in vb2_sign_data()
/external/vboot_reference/firmware/lib21/
Dpacked_key.c51 uint32_t sig_size; in vb2_unpack_key() local
84 sig_size = vb2_rsa_sig_size(key->sig_alg); in vb2_unpack_key()
85 if (!sig_size) in vb2_unpack_key()
Dcommon.c205 sig->sig_offset, sig->sig_size); in vb2_verify_signature()
213 if (sig->sig_size != expect_sig_size) in vb2_verify_signature()
242 if (sig->sig_size != key_sig_size) in vb2_verify_digest()
/external/vboot_reference/tests/
Dvboot_common2_tests.c63 sig->sig_size -= 16; in VerifyDataTest()
66 sig->sig_size += 16; in VerifyDataTest()
100 sig->sig_size = 1; in VerifyDigestTest()
180 h->preamble_signature.sig_size--; in VerifyKernelPreambleTest()
194 h->body_signature.sig_size = 0; in VerifyKernelPreambleTest()
Dvboot_common3_tests.c95 h->key_block_checksum.sig_size /= 2; in KeyBlockVerifyTest()
113 h->key_block_signature.sig_size--; in KeyBlockVerifyTest()
229 h->preamble_signature.sig_size--; in VerifyFirmwarePreambleTest()
245 h->body_signature.sig_size = 0; in VerifyFirmwarePreambleTest()
Dvb20_common_tests.c148 .sig_size = 128}; in test_helper_functions()
161 .sig_size = 4}; in test_helper_functions()
Dvb20_common2_tests.c86 uint32_t sig_total_size = sig->sig_offset + sig->sig_size; in test_verify_data()
121 sig2->sig_size -= 16; in test_verify_data()
Dvb20_common3_tests.c113 h->keyblock_signature.sig_size--; in test_verify_keyblock()
259 h->preamble_signature.sig_size--; in test_verify_fw_preamble()
277 h->body_signature.sig_size = 0; in test_verify_fw_preamble()
Dvboot_firmware_tests.c192 return sig->sig_size; in VerifyDigest()
337 mpreamble[0].body_signature.sig_size = 1; in LoadFirmwareTest()
427 mpreamble[0].body_signature.sig_size = 1; /* Mock bad sig */ in LoadFirmwareTest()
/external/epid-sdk/example/verifysig/src/
Dmain.c85 size_t sig_size = 0; in main() local
287 sig = NewBufferFromFile(sig_file->filename[0], &sig_size); in main()
395 log_msg(" [in] Signature Len: %d", (int)sig_size); in main()
397 PrintBuffer(sig, sig_size); in main()
449 Verify(sig, sig_size, msg_str, msg_size, basename_str, basename_size, in main()
461 result = Verify11(sig, sig_size, msg_str, msg_size, basename_str, in main()
/external/vboot_reference/firmware/lib/
Dvboot_common.c100 sig->sig_offset, sig->sig_size); in VerifySignatureInside()
150 (unsigned)sig->sig_size, siglen_map[key->algorithm], in VerifyData()
152 if (sig->sig_size != siglen_map[key->algorithm]) { in VerifyData()
155 (int)sig->sig_size, siglen_map[key->algorithm], in VerifyData()
174 if (sig->sig_size != siglen_map[key->algorithm]) { in VerifyDigest()
231 if (sig->sig_size != SHA512_DIGEST_SIZE) { in KeyBlockVerify()
/external/vboot_reference/host/lib/include/
Dhost_signature.h19 uint64_t sig_size, uint64_t data_size);
23 VbSignature* SignatureAlloc(uint64_t sig_size, uint64_t data_size);
/external/epid-sdk/example/signmsg/src/
Dmain.c77 size_t sig_size = 0; in main() local
373 member_precmp_ptr, &sig, &sig_size, &cacert); in main()
386 if (sig && sig_size != 0) { in main()
388 if (0 != WriteLoud(sig, sig_size, sig_file->filename[0])) { in main()
/external/vboot_reference/firmware/lib20/
Dcommon.c64 sig->sig_offset, sig->sig_size); in vb2_verify_signature_inside()
74 if (sig->sig_size != vb2_rsa_sig_size(key->sig_alg)) { in vb2_verify_digest()
77 sig->sig_size, vb2_rsa_sig_size(key->sig_alg), in vb2_verify_digest()
/external/u-boot/lib/rsa/
Drsa-sign.c387 uint8_t **sigp, uint *sig_size) in rsa_sign_with_key() argument
431 if (!EVP_SignFinal(context, sig, sig_size, key)) { in rsa_sign_with_key()
443 debug("Got signature: %d bytes, expected %d\n", *sig_size, size); in rsa_sign_with_key()
445 *sig_size = size; in rsa_sign_with_key()
/external/vboot_reference/firmware/lib20/include/
Dvb2_struct.h51 uint32_t sig_size; member
/external/vboot_reference/firmware/lib21/include/
Dvb2_struct.h206 uint32_t sig_size; member

12