Lines Matching refs:rsaResult
127 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()
322 const uint32_t *rsaResult; in handleSign() local
384 rsaResult = rsaPrivOp(&rsa->state, rsa->num, rsa->exponent, rsa->modulus); in handleSign()
389 printHashRev(stderr, "RSA cyphertext", rsaResult, RSA_LIMBS); in handleSign()
394 fwrite(rsaResult, 1, sizeof(uint32_t[RSA_LIMBS]), out); in handleSign()