Lines Matching refs:bad
691 unsigned char *p, bad, pad_done; in mbedtls_rsa_rsaes_oaep_decrypt() local
757 bad = 0; in mbedtls_rsa_rsaes_oaep_decrypt()
759 bad |= *p++; /* First byte must be 0 */ in mbedtls_rsa_rsaes_oaep_decrypt()
765 bad |= lhash[i] ^ *p++; in mbedtls_rsa_rsaes_oaep_decrypt()
778 bad |= *p++ ^ 0x01; in mbedtls_rsa_rsaes_oaep_decrypt()
786 if( bad != 0 ) in mbedtls_rsa_rsaes_oaep_decrypt()
813 unsigned char *p, bad, pad_done = 0; in mbedtls_rsa_rsaes_pkcs1_v15_decrypt() local
832 bad = 0; in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
837 bad |= *p++; /* First byte must be 0 */ in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
842 bad |= *p++ ^ MBEDTLS_RSA_CRYPT; in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
853 bad |= *p++; /* Must be zero */ in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
857 bad |= *p++ ^ MBEDTLS_RSA_SIGN; in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
868 bad |= *p++; /* Must be zero */ in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
871 bad |= ( pad_count < 8 ); in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
873 if( bad ) in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()