/mbedtls-development/library/ |
A D | bignum.c | 103 mbedtls_mpi_zeroize( X->p, X->n ); in mbedtls_mpi_free() 130 memcpy( p, X->p, X->n * ciL ); in mbedtls_mpi_grow() 131 mbedtls_mpi_zeroize( X->p, X->n ); in mbedtls_mpi_grow() 174 mbedtls_mpi_zeroize( X->p, X->n ); in mbedtls_mpi_shrink() 229 memset( X->p, 0, X->n * ciL ); in mbedtls_mpi_copy() 247 memset( X->p + i, 0, ( X->n - i ) * ciL ); in mbedtls_mpi_copy() 436 memset( X->p, 0, X->n * ciL ); in mbedtls_mpi_lset() 1113 X->p[i - 1] = X->p[i - v0 - 1]; in mbedtls_mpi_shift_l() 1159 X->p[i] = X->p[i + v0]; in mbedtls_mpi_shift_r() 2462 mpi_montmul( X, X, N, mm, &T ); in mbedtls_mpi_exp_mod() [all …]
|
A D | des.c | 241 (X) = (((X) << 1) | ((X) >> 31)) & 0xFFFFFFFF; \ 250 (X) = (((X) << 31) | ((X) >> 1)) & 0xFFFFFFFF; \ 271 T = *SK++ ^ (((X) << 28) | ((X) >> 4)); \ 410 T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4); in mbedtls_des_setkey() 411 T = ((Y ) ^ X) & 0x10101010; X ^= T; Y ^= (T ); in mbedtls_des_setkey() 413 X = (LHs[ (X ) & 0xF] << 3) | (LHs[ (X >> 8) & 0xF ] << 2) in mbedtls_des_setkey() 433 X = ((X << 1) | (X >> 27)) & 0x0FFFFFFF; in mbedtls_des_setkey() 438 X = ((X << 2) | (X >> 26)) & 0x0FFFFFFF; in mbedtls_des_setkey() 617 DES_IP( X, Y ); in mbedtls_des_crypt_ecb() 625 DES_FP( Y, X ); in mbedtls_des_crypt_ecb() [all …]
|
A D | camellia.c | 499 X[0] ^= *RK++; in mbedtls_camellia_crypt_ecb() 500 X[1] ^= *RK++; in mbedtls_camellia_crypt_ecb() 501 X[2] ^= *RK++; in mbedtls_camellia_crypt_ecb() 506 camellia_feistel( X, RK, X + 2 ); in mbedtls_camellia_crypt_ecb() 508 camellia_feistel( X + 2, RK, X ); in mbedtls_camellia_crypt_ecb() 510 camellia_feistel( X, RK, X + 2 ); in mbedtls_camellia_crypt_ecb() 512 camellia_feistel( X + 2, RK, X ); in mbedtls_camellia_crypt_ecb() 514 camellia_feistel( X, RK, X + 2 ); in mbedtls_camellia_crypt_ecb() 516 camellia_feistel( X + 2, RK, X ); in mbedtls_camellia_crypt_ecb() 520 FL(X[0], X[1], RK[0], RK[1]); in mbedtls_camellia_crypt_ecb() [all …]
|
A D | ecp.c | 635 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) ); in mbedtls_ecp_copy() 689 if( mbedtls_mpi_cmp_mpi( &P->X, &Q->X ) == 0 && in mbedtls_ecp_point_cmp() 1087 MOD_MUL( *X ); in mbedtls_mpi_mul_mod() 1114 MOD_SUB( *X ); in mbedtls_mpi_sub_mod() 1136 MOD_ADD( *X ); in mbedtls_mpi_add_mod() 1151 MOD_ADD( *X ); in mbedtls_mpi_shift_l_mod() 1523 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->X, &X ) ); in ecp_add_mixed() 2131 mbedtls_mpi_cmp_mpi( &P->X, &grp->G.X ) == 0 ); in ecp_mul_comb() 2353 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mod( grp, &S->X, &S->X, &S->X ) ); in ecp_double_add_mxz() 3196 mbedtls_mpi_cmp_mpi( &pub->Q.X, &prv->Q.X ) || in mbedtls_ecp_check_pub_priv() [all …]
|
A D | md5.c | 87 uint32_t X[16], A, B, C, D; in mbedtls_internal_md5_process() member 90 local.X[ 0] = MBEDTLS_GET_UINT32_LE( data, 0 ); in mbedtls_internal_md5_process() 91 local.X[ 1] = MBEDTLS_GET_UINT32_LE( data, 4 ); in mbedtls_internal_md5_process() 92 local.X[ 2] = MBEDTLS_GET_UINT32_LE( data, 8 ); in mbedtls_internal_md5_process() 93 local.X[ 3] = MBEDTLS_GET_UINT32_LE( data, 12 ); in mbedtls_internal_md5_process() 94 local.X[ 4] = MBEDTLS_GET_UINT32_LE( data, 16 ); in mbedtls_internal_md5_process() 95 local.X[ 5] = MBEDTLS_GET_UINT32_LE( data, 20 ); in mbedtls_internal_md5_process() 96 local.X[ 6] = MBEDTLS_GET_UINT32_LE( data, 24 ); in mbedtls_internal_md5_process() 97 local.X[ 7] = MBEDTLS_GET_UINT32_LE( data, 28 ); in mbedtls_internal_md5_process() 98 local.X[ 8] = MBEDTLS_GET_UINT32_LE( data, 32 ); in mbedtls_internal_md5_process() [all …]
|
A D | aes.c | 853 t.X[0] = MBEDTLS_GET_UINT32_LE( input, 0 ); t.X[0] ^= *RK++; in mbedtls_internal_aes_encrypt() 854 t.X[1] = MBEDTLS_GET_UINT32_LE( input, 4 ); t.X[1] ^= *RK++; in mbedtls_internal_aes_encrypt() 855 t.X[2] = MBEDTLS_GET_UINT32_LE( input, 8 ); t.X[2] ^= *RK++; in mbedtls_internal_aes_encrypt() 856 t.X[3] = MBEDTLS_GET_UINT32_LE( input, 12 ); t.X[3] ^= *RK++; in mbedtls_internal_aes_encrypt() 860 AES_FROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_encrypt() 861 AES_FROUND( t.X[0], t.X[1], t.X[2], t.X[3], t.Y[0], t.Y[1], t.Y[2], t.Y[3] ); in mbedtls_internal_aes_encrypt() 864 AES_FROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_encrypt() 917 t.X[0] = MBEDTLS_GET_UINT32_LE( input, 0 ); t.X[0] ^= *RK++; in mbedtls_internal_aes_decrypt() 924 AES_RROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_decrypt() 925 AES_RROUND( t.X[0], t.X[1], t.X[2], t.X[3], t.Y[0], t.Y[1], t.Y[2], t.Y[3] ); in mbedtls_internal_aes_decrypt() [all …]
|
A D | dhm.c | 66 static int dhm_read_bignum( mbedtls_mpi *X, in dhm_read_bignum() argument 81 if( ( ret = mbedtls_mpi_read_binary( X, *p, n ) ) != 0 ) in dhm_read_bignum() 151 src = &ctx->X; in mbedtls_dhm_get_value() 224 ret = dhm_random_below( &ctx->X, &ctx->P, f_rng, p_rng ); in dhm_make_common() 234 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, in dhm_make_common() 268 #define DHM_MPI_EXPORT( X, n ) \ in mbedtls_dhm_make_params() argument 270 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( ( X ), \ in mbedtls_dhm_make_params() 384 if( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->pX ) != 0 ) in dhm_update_blinding() 386 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &ctx->pX, &ctx->X ) ); in dhm_update_blinding() 464 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->K, &GYb, &ctx->X, in mbedtls_dhm_calc_secret() [all …]
|
A D | ecjpake.c | 204 const mbedtls_ecp_point *X, in ecjpake_hash() argument 218 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); in ecjpake_hash() 251 const mbedtls_ecp_point *X, in ecjpake_zkp_read() argument 299 &VV, &h, X, &r, G ) ); in ecjpake_zkp_read() 324 const mbedtls_ecp_point *X, in ecjpake_zkp_write() argument 384 mbedtls_ecp_point *X, in ecjpake_kkp_read() argument 401 if( mbedtls_ecp_is_zero( X ) ) in ecjpake_kkp_read() 422 mbedtls_ecp_point *X, in ecjpake_kkp_write() argument 438 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, X, in ecjpake_kkp_write() 640 const mbedtls_mpi *X, in ecjpake_mul_secret() argument [all …]
|
A D | ripemd160.c | 95 local.X[ 0] = MBEDTLS_GET_UINT32_LE( data, 0 ); in mbedtls_internal_ripemd160_process() 96 local.X[ 1] = MBEDTLS_GET_UINT32_LE( data, 4 ); in mbedtls_internal_ripemd160_process() 97 local.X[ 2] = MBEDTLS_GET_UINT32_LE( data, 8 ); in mbedtls_internal_ripemd160_process() 98 local.X[ 3] = MBEDTLS_GET_UINT32_LE( data, 12 ); in mbedtls_internal_ripemd160_process() 99 local.X[ 4] = MBEDTLS_GET_UINT32_LE( data, 16 ); in mbedtls_internal_ripemd160_process() 100 local.X[ 5] = MBEDTLS_GET_UINT32_LE( data, 20 ); in mbedtls_internal_ripemd160_process() 101 local.X[ 6] = MBEDTLS_GET_UINT32_LE( data, 24 ); in mbedtls_internal_ripemd160_process() 102 local.X[ 7] = MBEDTLS_GET_UINT32_LE( data, 28 ); in mbedtls_internal_ripemd160_process() 103 local.X[ 8] = MBEDTLS_GET_UINT32_LE( data, 32 ); in mbedtls_internal_ripemd160_process() 104 local.X[ 9] = MBEDTLS_GET_UINT32_LE( data, 36 ); in mbedtls_internal_ripemd160_process() [all …]
|
A D | debug.c | 197 const char *text, const mbedtls_ecp_point *X ) in mbedtls_debug_print_ecp() argument 210 mbedtls_debug_print_mpi( ssl, level, file, line, str, &X->X ); in mbedtls_debug_print_ecp() 213 mbedtls_debug_print_mpi( ssl, level, file, line, str, &X->Y ); in mbedtls_debug_print_ecp() 220 const char *text, const mbedtls_mpi *X ) in mbedtls_debug_print_mpi() argument 229 NULL == X || in mbedtls_debug_print_mpi() 235 bitlen = mbedtls_mpi_bitlen( X ); in mbedtls_debug_print_mpi() 254 ( X->p[limb_offset] >> ( offset_in_limb * 8 ) ) & 0xff; in mbedtls_debug_print_mpi()
|
A D | asn1write.c | 127 int mbedtls_asn1_write_mpi( unsigned char **p, const unsigned char *start, const mbedtls_mpi *X ) in mbedtls_asn1_write_mpi() argument 134 len = mbedtls_mpi_size( X ); in mbedtls_asn1_write_mpi() 140 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, *p, len ) ); in mbedtls_asn1_write_mpi() 145 if( X->s ==1 && **p & 0x80 ) in mbedtls_asn1_write_mpi()
|
/mbedtls-development/tests/suites/ |
A D | test_suite_mpi.function | 14 if( X->s != 1 && X->s != -1 ) 16 if( mbedtls_mpi_bitlen( X ) == 0 && X->s != 1 ) 549 TEST_ASSERT( mbedtls_mpi_copy( &X, &X ) == 0 ); 617 mbedtls_mpi_swap( &X, &X ); 662 TEST_ASSERT( mbedtls_mpi_add_mpi( &X, &X, &Y ) == 0 ); 687 TEST_ASSERT( mbedtls_mpi_sub_abs( &X, &X, &X ) == 0 ); 692 TEST_ASSERT( mbedtls_mpi_add_abs( &X, &X, &X ) == 0 ); 697 TEST_ASSERT( mbedtls_mpi_add_mpi( &X, &X, &X ) == 0 ); 722 TEST_ASSERT( mbedtls_mpi_add_abs( &X, &X, &Y ) == 0 ); 954 res = mbedtls_mpi_mod_mpi( &X, &X, &Y ); [all …]
|
A D | test_suite_ecp.function | 157 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xA ) == 0 ); 173 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xZ ) == 0 ); 244 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xR ) == 0 ); 299 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xA ) == 0 ); 304 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xZ ) == 0 ); 417 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &nP.X, &R.X ) == 0 ); 574 mbedtls_mpi X, Y, Z; 590 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.X, &X ) == 0 ); 617 mbedtls_mpi X, Y, Z; 634 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.X, &X ) == 0 ); [all …]
|
A D | test_suite_dhm.function | 61 /* Check that ctx->X and ctx->GX are within range. */ 62 TEST_ASSERT( mbedtls_mpi_cmp_int( &ctx->X, 1 ) > 0 ); 63 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->P ) < 0 ); 64 TEST_ASSERT( mbedtls_mpi_size( &ctx->X ) <= x_size ); 68 /* Check ske: it must contain P, G and G^X, each prefixed with a 163 TEST_ASSERT( check_get_value( &ctx_cli, MBEDTLS_DHM_PARAM_X, &ctx_cli.X ) ); 164 TEST_ASSERT( check_get_value( &ctx_srv, MBEDTLS_DHM_PARAM_X, &ctx_srv.X ) );
|
/mbedtls-development/include/mbedtls/ |
A D | bignum.h | 205 void mbedtls_mpi_init( mbedtls_mpi *X ); 214 void mbedtls_mpi_free( mbedtls_mpi *X ); 229 int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ); 246 int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ); 269 void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); 375 size_t mbedtls_mpi_lsb( const mbedtls_mpi *X ); 389 size_t mbedtls_mpi_bitlen( const mbedtls_mpi *X ); 404 size_t mbedtls_mpi_size( const mbedtls_mpi *X ); 513 int mbedtls_mpi_read_binary_le( mbedtls_mpi *X, 549 int mbedtls_mpi_write_binary_le( const mbedtls_mpi *X, [all …]
|
A D | debug.h | 48 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) \ argument 49 mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X ) 53 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) \ argument 54 mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X ) 76 #define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) do { } while( 0 ) argument 77 #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 ) argument 231 const char *text, const mbedtls_mpi *X ); 253 const char *text, const mbedtls_ecp_point *X );
|
/mbedtls-development/3rdparty/everest/include/everest/kremlin/internal/ |
A D | debug.h | 24 #define KRML_FORMAT(X) _Generic((X), \ argument 35 #define KRML_FORMAT_ARG(X) _Generic((X), \ argument 36 uint8_t : X, \ 37 uint16_t: X, \ 38 uint32_t: X, \ 39 uint64_t: X, \ 40 int8_t : X, \ 41 int16_t : X, \ 42 int32_t : X, \ 43 int64_t : X, \ [all …]
|
A D | wasmsupport.h | 5 #define WasmSupport_check_buffer_size(X) argument
|
/mbedtls-development/programs/pkey/ |
A D | mpi_demo.c | 52 mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; in main() local 55 mbedtls_mpi_init( &H ); mbedtls_mpi_init( &D ); mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); in main() 82 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &X, 10, "55555" ) ); in main() 83 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &Y, &X, &E, &N, NULL ) ); in main() 87 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " X (plaintext) = ", &X, 10, NULL ) ); in main() 96 mbedtls_mpi_free( &H ); mbedtls_mpi_free( &D ); mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); in main()
|
A D | ecdh_curve25519.c | 105 … ret = mbedtls_mpi_write_binary( &ctx_cli.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X), cli_to_srv, 32 ); in main() 135 … ret = mbedtls_mpi_write_binary( &ctx_srv.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X), srv_to_cli, 32 ); in main() 157 … ret = mbedtls_mpi_read_binary( &ctx_srv.MBEDTLS_PRIVATE(Qp).MBEDTLS_PRIVATE(X), cli_to_srv, 32 ); in main() 188 … ret = mbedtls_mpi_read_binary( &ctx_cli.MBEDTLS_PRIVATE(Qp).MBEDTLS_PRIVATE(X), srv_to_cli, 32 ); in main()
|
/mbedtls-development/docs/ |
A D | use-psa-crypto.md | 29 below these are indicated by "Use in (X.509 and) TLS: opt-in", meaning that 30 this requires changes to the application code for the (X.509 and) TLS layers 33 Some of these APIs are mostly meant for internal use by the TLS (and X.509) 34 layers; they are indicated below by "Use in (X.509 and) TLS: automatic", 36 X.509) layers to pick up the improvements. 53 Use in X.509 and TLS: opt-in. The application needs to construct the PK context 63 In the TLS and X.509 API, there are two other functions which accept a key or 125 Use in TLS and X.509: in all places where an ECDSA signature is verified. 146 ### X.509: some hashes computed with PSA 197 X.509
|
/mbedtls-development/tests/src/ |
A D | helpers.c | 289 int mbedtls_test_read_mpi( mbedtls_mpi *X, int radix, const char *s ) in mbedtls_test_read_mpi() argument 295 mbedtls_mpi_free( X ); in mbedtls_test_read_mpi() 299 return( mbedtls_mpi_read_string( X, radix, s ) ); in mbedtls_test_read_mpi()
|
/mbedtls-development/scripts/ |
A D | bump_version.sh | 127 VERSION_NR="$( printf "0x%02X%02X%02X00" $MAJOR $MINOR $PATCH )"
|
/mbedtls-development/tests/data_files/ |
A D | crl-rsa-pss-sha224.pem | 10 i9sQOzMvvOTksN48+X+kk/wkLMKRGI222lqU6y6tP1LX3OE/+KN8gPXR+lCC+e0v
|
/mbedtls-development/tests/data_files/dir4/ |
A D | cert14.crt | 13 VUnlX//h3T5Ajc85WNkyTuirhSZtIr6+X/AxH4kR/QG5NiaDxP9H0FzMs5FcMni8
|