Lines Matching +full:num +full:- +full:vectors

2  * Copyright 1999-2023 The OpenSSL Project Authors. All Rights Reserved.
10 /* test vectors from p1ovect1.txt */
34 BN_bin2bn(n, sizeof(n)-1, NULL), \
35 BN_bin2bn(e, sizeof(e)-1, NULL), \
36 BN_bin2bn(d, sizeof(d)-1, NULL)); \
38 BN_bin2bn(p, sizeof(p)-1, NULL), \
39 BN_bin2bn(q, sizeof(q)-1, NULL)); \
41 BN_bin2bn(dmp1, sizeof(dmp1)-1, NULL), \
42 BN_bin2bn(dmq1, sizeof(dmq1)-1, NULL), \
43 BN_bin2bn(iqmp, sizeof(iqmp)-1, NULL)); \
45 memcpy(c, ctext_ex, sizeof(ctext_ex) - 1); \
46 return sizeof(ctext_ex) - 1;
245 int num; in test_rsa_simple() local
247 plen = sizeof(ptext_ex) - 1; in test_rsa_simple()
252 num = RSA_public_encrypt(plen, ptext_ex, ctext, key, en_pad_type); in test_rsa_simple()
253 if (!TEST_int_eq(num, clentmp)) in test_rsa_simple()
256 num = RSA_private_decrypt(num, ctext, ptext, key, de_pad_type); in test_rsa_simple()
258 if (!TEST_int_gt(num, 0) || !TEST_mem_eq(ptext, num, ptext_ex, plen)) in test_rsa_simple()
261 if (!TEST_int_lt(num, 0)) in test_rsa_simple()
290 int num; in test_rsa_oaep() local
297 plen = sizeof(ptext_ex) - 1; in test_rsa_oaep()
300 num = RSA_private_decrypt(clen, ctext_ex, ptext, key, in test_rsa_oaep()
302 if (num <= 0 || !TEST_mem_eq(ptext, num, ptext_ex, plen)) in test_rsa_oaep()
308 num = RSA_private_decrypt(clen, ctext_ex, ptext, key, in test_rsa_oaep()
310 if (!TEST_int_le(num, 0)) in test_rsa_oaep()
316 for (n = -1; n < clen; ++n) { in test_rsa_oaep()
317 num = RSA_private_decrypt(n, ctext_ex, ptext, key, in test_rsa_oaep()
319 if (!TEST_int_le(num, 0)) in test_rsa_oaep()
333 /* NIST SP 800-56B rev 2 (draft) Appendix D Table 5 */
339 /* NIST FIPS 140-2 IG 7.5 */
367 unsigned char num[2000]; in test_rsa_security_bit() local
369 if (!TEST_ptr(key) || !TEST_int_le(bytes, (int)sizeof(num))) in test_rsa_security_bit()
378 memset(num, vals[bits % 8], bytes); in test_rsa_security_bit()
385 if (TEST_true(RSA_set0_key(key, BN_bin2bn(num, bytes, NULL), in test_rsa_security_bit()
386 BN_bin2bn(num, bytes, NULL), NULL)) in test_rsa_security_bit()