| /NetX-Duo-v6.2.1/crypto_libraries/src/ |
| D | nx_crypto_ecjpake.c | 72 NX_CRYPTO_EC *curve, in _nx_crypto_ecjpake_init() argument 79 UINT buffer_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in _nx_crypto_ecjpake_init() 81 ecjpake -> nx_crypto_ecjpake_curve = curve; in _nx_crypto_ecjpake_init() 170 NX_CRYPTO_EC *curve = ecjpake -> nx_crypto_ecjpake_curve; in _nx_crypto_ecjpake_hello_generate() local 171 UINT curve_size = (curve -> nx_crypto_ec_bits + 7) >> 3; in _nx_crypto_ecjpake_hello_generate() 172 UINT buffer_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in _nx_crypto_ecjpake_hello_generate() 183 status = _nx_crypto_ec_key_pair_generation_extra(curve, &curve -> nx_crypto_ec_g, &private_key, in _nx_crypto_ecjpake_hello_generate() 193 curve, in _nx_crypto_ecjpake_hello_generate() 194 &curve -> nx_crypto_ec_g, in _nx_crypto_ecjpake_hello_generate() 207 _nx_crypto_ec_point_extract_uncompressed(curve, in _nx_crypto_ecjpake_hello_generate() [all …]
|
| D | nx_crypto_ec.c | 940 NX_CRYPTO_KEEP VOID _nx_crypto_ec_point_extract_uncompressed(NX_CRYPTO_EC *curve, NX_CRYPTO_EC_POIN… in _nx_crypto_ec_point_extract_uncompressed() argument 947 clen = (curve -> nx_crypto_ec_bits + 7) >> 3; in _nx_crypto_ec_point_extract_uncompressed() 1084 NX_CRYPTO_KEEP VOID _nx_crypto_ec_point_fp_projective_to_affine(NX_CRYPTO_EC *curve, in _nx_crypto_ec_point_fp_projective_to_affine() argument 1092 p = &curve -> nx_crypto_ec_field.fp; in _nx_crypto_ec_point_fp_projective_to_affine() 1111 NX_CRYPTO_EC_SQUARE_REDUCE(curve, &zi, &temp1, scratch); in _nx_crypto_ec_point_fp_projective_to_affine() 1112 NX_CRYPTO_EC_MULTIPLE_REDUCE(curve, &point -> nx_crypto_ec_point_x, in _nx_crypto_ec_point_fp_projective_to_affine() 1117 NX_CRYPTO_EC_MULTIPLE_REDUCE(curve, &zi, &temp1, &temp2, scratch); in _nx_crypto_ec_point_fp_projective_to_affine() 1118 NX_CRYPTO_EC_MULTIPLE_REDUCE(curve, &point -> nx_crypto_ec_point_y, in _nx_crypto_ec_point_fp_projective_to_affine() 1183 NX_CRYPTO_KEEP VOID _nx_crypto_ec_secp192r1_reduce(NX_CRYPTO_EC *curve, in _nx_crypto_ec_secp192r1_reduce() argument 1193 compare_value = _nx_crypto_huge_number_compare(value, &curve -> nx_crypto_ec_field.fp); in _nx_crypto_ec_secp192r1_reduce() [all …]
|
| D | nx_crypto_ecdh.c | 76 NX_CRYPTO_EC *curve, in _nx_crypto_ecdh_key_pair_import() argument 92 public_key_len = 1 + (((curve -> nx_crypto_ec_bits + 7) >> 3) << 1); in _nx_crypto_ecdh_key_pair_import() 99 ecdh_ptr -> nx_crypto_ecdh_key_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in _nx_crypto_ecdh_key_pair_import() 164 NX_CRYPTO_EC *curve; in _nx_crypto_ecdh_private_key_export() local 174 curve = ecdh_ptr -> nx_crypto_ecdh_curve; in _nx_crypto_ecdh_private_key_export() 180 clen = (curve -> nx_crypto_ec_bits + 7) >> 3; in _nx_crypto_ecdh_private_key_export() 257 NX_CRYPTO_EC *curve, in _nx_crypto_ecdh_setup() argument 265 public_key_len = 1 + (((curve -> nx_crypto_ec_bits + 7) >> 3) << 1); in _nx_crypto_ecdh_setup() 271 ecdh_ptr -> nx_crypto_ecdh_curve = curve; in _nx_crypto_ecdh_setup() 274 ecdh_ptr -> nx_crypto_ecdh_key_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in _nx_crypto_ecdh_setup() [all …]
|
| D | nx_crypto_ecdsa.c | 76 NX_CRYPTO_KEEP UINT _nx_crypto_ecdsa_sign(NX_CRYPTO_EC *curve, UCHAR *hash, UINT hash_length, in _nx_crypto_ecdsa_sign() argument 88 UINT buffer_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in _nx_crypto_ecdsa_sign() 103 curve_size = curve -> nx_crypto_ec_bits >> 3; in _nx_crypto_ecdsa_sign() 104 if (curve -> nx_crypto_ec_bits & 7) in _nx_crypto_ecdsa_sign() 148 if (curve -> nx_crypto_ec_bits < hash_length << 3) in _nx_crypto_ecdsa_sign() 150 _nx_crypto_huge_number_shift_right(&z, (hash_length << 3) - curve -> nx_crypto_ec_bits); in _nx_crypto_ecdsa_sign() 158 _nx_crypto_ec_key_pair_generation_extra(curve, &curve -> nx_crypto_ec_g, &k, &pt, in _nx_crypto_ecdsa_sign() 162 _nx_crypto_huge_number_modulus(&pt.nx_crypto_ec_point_x, &curve -> nx_crypto_ec_n); in _nx_crypto_ecdsa_sign() 167 _nx_crypto_huge_number_inverse_modulus(&k, &curve -> nx_crypto_ec_n, &ik, scratch); in _nx_crypto_ecdsa_sign() 170 _nx_crypto_huge_number_modulus(&temp, &curve -> nx_crypto_ec_n); in _nx_crypto_ecdsa_sign() [all …]
|
| D | nx_crypto_method_self_test_ecdsa.c | 109 NX_CRYPTO_EC *curve = NX_CRYPTO_NULL; in _nx_crypto_method_self_test_ecdsa() local 201 (UCHAR *)&curve, in _nx_crypto_method_self_test_ecdsa() 213 buffer_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in _nx_crypto_method_self_test_ecdsa() 214 curve_size = curve -> nx_crypto_ec_bits >> 3; in _nx_crypto_method_self_test_ecdsa() 215 if (curve -> nx_crypto_ec_bits & 7) in _nx_crypto_method_self_test_ecdsa() 227 status = _nx_crypto_ec_key_pair_generation_extra(curve, &curve -> nx_crypto_ec_g, &private_key, in _nx_crypto_method_self_test_ecdsa() 243 …_nx_crypto_ec_point_extract_uncompressed(curve, &public_key, pubkey, 4 + 2 * buffer_size, &pubkey_… in _nx_crypto_method_self_test_ecdsa()
|
| /NetX-Duo-v6.2.1/test/regression/nx_secure_test/ |
| D | nx_secure_ecdsa_test.c | 102 NX_CRYPTO_EC *curve; in thread_0_entry() local 114 curve = (NX_CRYPTO_EC *)&_nx_crypto_ec_secp256r1; in thread_0_entry() 117 status = _nx_crypto_ecdsa_verify(curve, hash, sizeof(hash), in thread_0_entry() 123 status = _nx_crypto_ecdsa_verify(curve, hash, sizeof(hash), in thread_0_entry() 146 curve = (NX_CRYPTO_EC *)&_nx_crypto_ec_secp521r1; in thread_0_entry() 147 buffer_size = curve->nx_crypto_ec_n.nx_crypto_huge_buffer_size; in thread_0_entry() 157 _nx_crypto_ec_key_pair_generation_extra(curve, &curve -> nx_crypto_ec_g, &private_key, in thread_0_entry() 165 …_nx_crypto_ec_point_extract_uncompressed(curve, &public_key, pubkey, 4 + 2 * buffer_size, &pubkey_… in thread_0_entry() 171 …_nx_crypto_ecdsa_sign(curve, hash_data, sizeof(hash_data), privkey, buffer_size, signature, signat… in thread_0_entry() 174 …EXPECT_EQ(NX_CRYPTO_SUCCESS, _nx_crypto_ecdsa_verify(curve, hash_data, sizeof(hash_data), pubkey, … in thread_0_entry() [all …]
|
| D | nx_secure_ecdh_test.c | 68 if (!strcmp(ecdh_data[i].curve, "secp192r1")) in thread_0_entry() 72 else if (!strcmp(ecdh_data[i].curve, "secp224r1")) in thread_0_entry() 76 else if (!strcmp(ecdh_data[i].curve, "secp256r1")) in thread_0_entry() 80 else if (!strcmp(ecdh_data[i].curve, "secp384r1")) in thread_0_entry() 84 else if (!strcmp(ecdh_data[i].curve, "secp521r1")) in thread_0_entry() 89 else if (!strcmp(ecdh_data[i].curve, "x25519")) in thread_0_entry() 93 else if (!strcmp(ecdh_data[i].curve, "x448")) in thread_0_entry()
|
| D | nx_secure_ec_test.c | 71 …_nx_crypto_ec_fp_projective_multiple((NX_CRYPTO_EC*)ec_data[i].curve, &point, &m, &output, scratch… in thread_0_entry() 73 …_nx_crypto_ec_point_extract_uncompressed((NX_CRYPTO_EC*)ec_data[i].curve, &output, output_data, si… in thread_0_entry() 97 …ec_data_x25519_448[i].curve -> nx_crypto_ec_multiple((NX_CRYPTO_EC *)ec_data_x25519_448[i].curve, … in thread_0_entry()
|
| D | nx_secure_crypto_method_cleanup_test.c | 587 NX_CRYPTO_EC *curve; in crypto_method_cleanup_ecdsa_test() local 625 (UCHAR *)&curve, in crypto_method_cleanup_ecdsa_test() 635 buffer_size = curve -> nx_crypto_ec_n.nx_crypto_huge_buffer_size; in crypto_method_cleanup_ecdsa_test() 636 curve_size = curve -> nx_crypto_ec_bits >> 3; in crypto_method_cleanup_ecdsa_test() 637 if (curve -> nx_crypto_ec_bits & 7) in crypto_method_cleanup_ecdsa_test() 647 _nx_crypto_ec_key_pair_generation_extra(curve, &curve -> nx_crypto_ec_g, &private_key, in crypto_method_cleanup_ecdsa_test()
|
| D | nx_secure_ecdsa_error_checking_test.c | 79 NX_CRYPTO_EC *curve; in thread_0_entry() local
|
| D | nx_secure_ecdsa_test_data.c | 9 const CHAR *curve; member
|
| D | nx_secure_ec_test_data.c | 9 const NX_CRYPTO_EC *curve; member
|
| D | nx_secure_ecdh_test_data.c | 9 const CHAR *curve; member
|
| /NetX-Duo-v6.2.1/crypto_libraries/inc/ |
| D | nx_crypto_ec.h | 139 VOID (*nx_crypto_ec_add)(struct NX_CRYPTO_EC_STRUCT *curve, 143 VOID (*nx_crypto_ec_subtract)(struct NX_CRYPTO_EC_STRUCT *curve, 147 VOID (*nx_crypto_ec_multiple)(struct NX_CRYPTO_EC_STRUCT *curve, 152 VOID (*nx_crypto_ec_reduce)(struct NX_CRYPTO_EC_STRUCT *curve, 176 #define NX_CRYPTO_EC_MULTIPLE_DIGIT_REDUCE(curve, value, digit, result, scratch) \ argument 178 curve -> nx_crypto_ec_reduce(curve, result, scratch); 180 #define NX_CRYPTO_EC_MULTIPLE_REDUCE(curve, left, right, result, scratch) \ argument 182 curve -> nx_crypto_ec_reduce(curve, result, scratch); 184 #define NX_CRYPTO_EC_SQUARE_REDUCE(curve, value, result, scratch) \ argument 186 curve -> nx_crypto_ec_reduce(curve, result, scratch); [all …]
|
| D | nx_crypto_ecjpake.h | 104 NX_CRYPTO_EC *curve, 139 NX_CRYPTO_EC *curve, 150 NX_CRYPTO_EC *curve, 162 NX_CRYPTO_EC *curve, 171 VOID _nx_crypto_ecjpake_public_key_generate(NX_CRYPTO_EC *curve, 184 NX_CRYPTO_EC *curve,
|
| D | nx_crypto_ecdh.h | 93 NX_CRYPTO_EC *curve, 108 NX_CRYPTO_EC *curve, 140 NX_CRYPTO_EC *curve, 153 NX_CRYPTO_EC *curve,
|
| D | nx_crypto_ecdsa.h | 85 UINT _nx_crypto_ecdsa_sign(NX_CRYPTO_EC *curve, 95 UINT _nx_crypto_ecdsa_verify(NX_CRYPTO_EC *curve,
|
| /NetX-Duo-v6.2.1/docs/ |
| D | revision_history.txt | 3298 Files are modified to support elliptic curve cryptography: 4051 Files are modified to add operation method for elliptic curve cryptography:
|