Home
last modified time | relevance | path

Searched refs:slen (Results 1 – 15 of 15) sorted by relevance

/mbedtls-3.4.0/library/
Dbase64.c40 const unsigned char *src, size_t slen ) in mbedtls_base64_encode() argument
46 if( slen == 0 ) in mbedtls_base64_encode()
52 n = slen / 3 + ( slen % 3 != 0 ); in mbedtls_base64_encode()
68 n = ( slen / 3 ) * 3; in mbedtls_base64_encode()
84 if( i < slen ) in mbedtls_base64_encode()
87 C2 = ( ( i + 1 ) < slen ) ? *src++ : 0; in mbedtls_base64_encode()
93 if( ( i + 1 ) < slen ) in mbedtls_base64_encode()
110 const unsigned char *src, size_t slen ) in mbedtls_base64_decode() argument
121 for( i = n = 0; i < slen; i++ ) in mbedtls_base64_decode()
125 while( i < slen && src[i] == ' ' ) in mbedtls_base64_decode()
[all …]
Dpkcs5.c209 size_t plen, const unsigned char *salt, size_t slen, in pkcs5_pbkdf2_hmac() argument
237 if( ( ret = mbedtls_md_hmac_update( ctx, salt, slen ) ) != 0 ) in pkcs5_pbkdf2_hmac()
292 size_t plen, const unsigned char *salt, size_t slen, in mbedtls_pkcs5_pbkdf2_hmac() argument
296 return( pkcs5_pbkdf2_hmac( ctx, password, plen, salt, slen, iteration_count, in mbedtls_pkcs5_pbkdf2_hmac()
304 size_t plen, const unsigned char *salt, size_t slen, in mbedtls_pkcs5_pbkdf2_hmac_ext() argument
321 ret = pkcs5_pbkdf2_hmac( &md_ctx, password, plen, salt, slen, in mbedtls_pkcs5_pbkdf2_hmac_ext()
372 if( ( status = psa_mac_update( &operation, salt, slen ) ) != PSA_SUCCESS ) in mbedtls_pkcs5_pbkdf2_hmac_ext()
Decdsa.c620 size_t *slen ) in ecdsa_signature_to_asn1() argument
638 *slen = len; in ecdsa_signature_to_asn1()
649 unsigned char *sig, size_t sig_size, size_t *slen, in mbedtls_ecdsa_write_signature_restartable() argument
682 MBEDTLS_MPI_CHK( ecdsa_signature_to_asn1( &r, &s, sig, sig_size, slen ) ); in mbedtls_ecdsa_write_signature_restartable()
697 unsigned char *sig, size_t sig_size, size_t *slen, in mbedtls_ecdsa_write_signature() argument
702 ctx, md_alg, hash, hlen, sig, sig_size, slen, in mbedtls_ecdsa_write_signature()
711 const unsigned char *sig, size_t slen ) in mbedtls_ecdsa_read_signature() argument
714 ctx, hash, hlen, sig, slen, NULL ) ); in mbedtls_ecdsa_read_signature()
722 const unsigned char *sig, size_t slen, in mbedtls_ecdsa_read_signature_restartable() argument
727 const unsigned char *end = sig + slen; in mbedtls_ecdsa_read_signature_restartable()
Dbignum.c382 size_t i, j, slen, n; in mbedtls_mpi_read_string() local
406 slen = strlen( s ); in mbedtls_mpi_read_string()
410 if( slen > MPI_SIZE_T_MAX >> 2 ) in mbedtls_mpi_read_string()
413 n = BITS_TO_LIMBS( slen << 2 ); in mbedtls_mpi_read_string()
418 for( i = slen, j = 0; i > 0; i--, j++ ) in mbedtls_mpi_read_string()
428 for( i = 0; i < slen; i++ ) in mbedtls_mpi_read_string()
579 size_t slen; in mbedtls_mpi_read_file() local
597 slen = strlen( s ); in mbedtls_mpi_read_file()
598 if( slen == sizeof( s ) - 2 ) in mbedtls_mpi_read_file()
601 if( slen > 0 && s[slen - 1] == '\n' ) { slen--; s[slen] = '\0'; } in mbedtls_mpi_read_file()
[all …]
Drsa.c1070 size_t slen, mbedtls_md_type_t md_alg ) in mgf_mask() argument
1116 if( ( ret = mbedtls_md_update( &md_ctx, src, slen ) ) != 0 ) in mgf_mask()
1125 if( ( status = psa_hash_update( &op, src, slen ) ) != PSA_SUCCESS ) in mgf_mask()
1166 const unsigned char *salt, size_t slen, in hash_mprime() argument
1188 if( ( ret = mbedtls_md_update( &md_ctx, salt, slen ) ) != 0 ) in hash_mprime()
1210 if( ( status = psa_hash_update( &op, salt, slen ) ) != PSA_SUCCESS ) in hash_mprime()
1608 size_t slen, min_slen, hlen, offset = 0; in rsa_rsassa_pss_sign() local
1651 slen = hlen; in rsa_rsassa_pss_sign()
1653 slen = olen - hlen - 2; in rsa_rsassa_pss_sign()
1661 slen = (size_t) saltlen; in rsa_rsassa_pss_sign()
[all …]
Dpsa_crypto_rsa.c499 int slen = rsa_pss_expected_salt_len( alg, rsa, hash_length ); in mbedtls_psa_rsa_verify_hash() local
505 slen, in mbedtls_psa_rsa_verify_hash()
Dssl_tls.c403 typedef int (*tls_prf_fn)( const unsigned char *secret, size_t slen,
432 static int tls_prf_sha256( const unsigned char *secret, size_t slen,
443 static int tls_prf_sha384( const unsigned char *secret, size_t slen,
473 const unsigned char *secret, size_t slen, in mbedtls_ssl_tls_prf() argument
498 return( tls_prf( secret, slen, label, random, rlen, dstbuf, dlen ) ); in mbedtls_ssl_tls_prf()
5847 const unsigned char *secret, size_t slen, in tls_prf_generic() argument
5870 if( slen != 0 ) in tls_prf_generic()
5877 status = psa_import_key( &key_attributes, secret, slen, &master_key ); in tls_prf_generic()
5927 const unsigned char *secret, size_t slen, in tls_prf_generic() argument
5967 ret = mbedtls_md_hmac_starts( &md_ctx, secret, slen ); in tls_prf_generic()
[all …]
Dssl_misc.h576 typedef int mbedtls_ssl_tls_prf_cb( const unsigned char *secret, size_t slen,
/mbedtls-3.4.0/include/mbedtls/
Decdsa.h308 unsigned char *sig, size_t sig_size, size_t *slen,
355 unsigned char *sig, size_t sig_size, size_t *slen,
389 const unsigned char *sig, size_t slen );
424 const unsigned char *sig, size_t slen,
Dbase64.h58 const unsigned char *src, size_t slen );
78 const unsigned char *src, size_t slen );
Dpkcs5.h89 size_t plen, const unsigned char *salt, size_t slen,
113 size_t plen, const unsigned char *salt, size_t slen,
Dssl.h5290 const unsigned char *secret, size_t slen,
/mbedtls-3.4.0/tests/suites/
Dtest_suite_ecdsa.function428 size_t slen;
439 slen = sizeof( sig );
443 md_alg, hash->x, hash->len, sig, sizeof( sig ), &slen,
448 TEST_ASSERT( slen == sig_check->len );
449 TEST_ASSERT( memcmp( sig, sig_check->x, slen ) == 0 );
459 md_alg, hash->x, hash->len, sig, sizeof( sig ), &slen,
Dtest_suite_pk.function676 size_t slen;
695 slen = sizeof( sig );
699 sig, sizeof( sig ), &slen,
705 TEST_ASSERT( slen == sig_check->len );
706 TEST_ASSERT( memcmp( sig, sig_check->x, slen ) == 0 );
714 hash->x, hash->len, sig, slen, &rs_ctx );
724 hash->x, hash->len, sig, slen, &rs_ctx );
734 hash->x, hash->len, sig, slen, &rs_ctx );
738 slen = sizeof( sig );
740 sig, sizeof sig, &slen,
Dtest_suite_psa_crypto.data4284 PSA verify hash: RSA-1024 PSS SHA-256, slen=0 (bad)
4288 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=0
4292 PSA verify hash: RSA-1024 PSS SHA-256, slen=31 (bad)
4296 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=31
4300 PSA verify hash: RSA-1024 PSS SHA-256, slen=32
4304 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=32
4308 PSA verify hash: RSA-1024 PSS SHA-256, slen=94 (bad)
4312 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=94
4316 PSA verify hash: RSA-1024 PSS SHA-512, slen=61 (bad)
4320 PSA verify hash: RSA-1024 PSS-any-salt SHA-512, slen=61
[all …]