Home
last modified time | relevance | path

Searched refs:rsaResult (Results 1 – 3 of 3) sorted by relevance

/device/google/contexthub/util/nanoapp_sign/
Dnanoapp_sign.c127 const uint32_t *rsaResult; in validateSignature() local
139 rsaResult = rsaPubOp(&rsa->state, rsa->num, rsa->modulus); in validateSignature()
143 printHashRev(stderr, "RSA plaintext", rsaResult, RSA_LIMBS); in validateSignature()
146 if ((rsaResult[RSA_LIMBS - 1] & 0xffff0000) != 0x00020000) { in validateSignature()
152 if (!(rsaResult[RSA_LIMBS - 1] & 0xff00) || !(rsaResult[RSA_LIMBS - 1] & 0xff)) { in validateSignature()
158 …if (!(rsaResult[8] & 0xff000000) || !(rsaResult[8] & 0xff0000) || !(rsaResult[8] & 0xff00) || (rsa… in validateSignature()
165 …if (!(rsaResult[i] & 0xff000000) || !(rsaResult[i] & 0xff0000) || !(rsaResult[i] & 0xff00) || !(rs… in validateSignature()
171 printHash(stderr, "Recovered hash ", rsaResult, SHA2_HASH_WORDS); in validateSignature()
177 if (memcmp(rsaResult, refHash, SHA2_HASH_SIZE)) { in validateSignature()
184 memcpy(refHash, rsaResult, SHA2_HASH_SIZE); in validateSignature()
[all …]
/device/google/contexthub/firmware/os/core/
Dbl.c271 static const uint32_t* blExtApiSigPaddingVerify(const uint32_t *rsaResult) in blExtApiSigPaddingVerify() argument
277 if (!(uint8_t)(rsaResult[i] >> 0)) in blExtApiSigPaddingVerify()
279 if (!(uint8_t)(rsaResult[i] >> 8)) in blExtApiSigPaddingVerify()
281 if (!(uint8_t)(rsaResult[i] >> 16)) in blExtApiSigPaddingVerify()
283 if (!(uint8_t)(rsaResult[i] >> 24)) in blExtApiSigPaddingVerify()
288 …if ((rsaResult[SHA2_HASH_WORDS] & 0xff) || !(rsaResult[SHA2_HASH_WORDS] & 0xff00) || !(rsaResult[S… in blExtApiSigPaddingVerify()
292 if ((rsaResult[RSA_WORDS - 1] >> 16) != 2) in blExtApiSigPaddingVerify()
294 if (!(rsaResult[RSA_WORDS - 1] & 0xff00) || !(rsaResult[RSA_WORDS - 1] & 0xff)) in blExtApiSigPaddingVerify()
297 return rsaResult; in blExtApiSigPaddingVerify()
327 const uint32_t *rsaKey, *osSigHash, *osSigPubkey, *ourHash, *rsaResult, *expectedHash = NULL; in blVerifyOsImage() local
[all …]
/device/google/contexthub/firmware/os/inc/
Dbl.h74 …const uint32_t* (*blSigPaddingVerify)(const uint32_t *rsaResult); //return pointer to hash inside …