Home
last modified time | relevance | path

Searched refs:sig_len (Results 1 – 25 of 46) sorted by relevance

12

/optee_os/lib/libmbedtls/mbedtls/library/
A Dpk_wrap.c90 if( sig_len < rsa_len ) in rsa_verify_wrap()
103 if( sig_len > rsa_len ) in rsa_verify_wrap()
111 unsigned char *sig, size_t *sig_len, in rsa_sign_wrap() argument
121 *sig_len = mbedtls_rsa_get_len( rsa ); in rsa_sign_wrap()
610 if( p != sig + sig_len ) in ecdsa_verify_wrap()
659 hash, hash_len, sig, sig_len, in ecdsa_verify_rs_wrap()
770 if( *sig_len > MBEDTLS_PK_SIGNATURE_MAX_SIZE ) in rsa_alt_sign_wrap()
799 size_t sig_len = 0; in rsa_alt_check_pair() local
977 const size_t rs_len = *sig_len / 2; in pk_ecdsa_sig_asn1_from_psa()
988 *sig_len = len; in pk_ecdsa_sig_asn1_from_psa()
[all …]
A Dpkcs11.c172 size_t sig_len = 0, asn_len = 0, oid_size = 0; in mbedtls_pkcs11_sign() local
195 sig_len = ctx->len; in mbedtls_pkcs11_sign()
196 if( hashlen > sig_len || asn_len > sig_len || in mbedtls_pkcs11_sign()
197 hashlen + asn_len > sig_len ) in mbedtls_pkcs11_sign()
230 asn_len + hashlen, sig, &sig_len ) != CKR_OK ) in mbedtls_pkcs11_sign()
A Dpk.c281 const unsigned char *sig, size_t sig_len, in mbedtls_pk_verify_restartable() argument
305 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx ); in mbedtls_pk_verify_restartable()
320 sig, sig_len ) ); in mbedtls_pk_verify_restartable()
328 const unsigned char *sig, size_t sig_len ) in mbedtls_pk_verify() argument
331 sig, sig_len, NULL ) ); in mbedtls_pk_verify()
340 const unsigned char *sig, size_t sig_len ) in mbedtls_pk_verify_ext() argument
369 if( sig_len < mbedtls_pk_get_len( ctx ) ) in mbedtls_pk_verify_ext()
381 if( sig_len > mbedtls_pk_get_len( ctx ) ) in mbedtls_pk_verify_ext()
403 unsigned char *sig, size_t *sig_len, in mbedtls_pk_sign_restartable() argument
443 sig, sig_len, f_rng, p_rng ) ); in mbedtls_pk_sign_restartable()
[all …]
/optee_os/core/drivers/crypto/crypto_api/acipher/
A Ddsa.c123 uint8_t *sig, size_t *sig_len) in crypto_acipher_dsa_sign() argument
131 if (!key || !msg || !sig_len) { in crypto_acipher_dsa_sign()
145 if (*sig_len < 2 * n_bytes) { in crypto_acipher_dsa_sign()
147 *sig_len, 2 * n_bytes); in crypto_acipher_dsa_sign()
148 *sig_len = 2 * n_bytes; in crypto_acipher_dsa_sign()
165 sdata.signature.length = *sig_len; in crypto_acipher_dsa_sign()
170 *sig_len = sdata.signature.length; in crypto_acipher_dsa_sign()
183 const uint8_t *sig, size_t sig_len) in crypto_acipher_dsa_verify() argument
205 if (sig_len != 2 * n_bytes) { in crypto_acipher_dsa_verify()
207 sig_len, 2 * n_bytes); in crypto_acipher_dsa_verify()
[all …]
A Decc.c133 size_t *sig_len) in ecc_sign() argument
141 if (!key || !msg || !sig_len) { in ecc_sign()
154 if (*sig_len < 2 * size_bytes) { in ecc_sign()
156 *sig_len, 2 * size_bytes); in ecc_sign()
157 *sig_len = 2 * size_bytes; in ecc_sign()
177 sdata.signature.length = *sig_len; in ecc_sign()
182 *sig_len = sdata.signature.length; in ecc_sign()
205 const uint8_t *sig, size_t sig_len) in ecc_verify() argument
226 if (sig_len != 2 * size_bytes) { in ecc_verify()
228 sig_len, 2 * size_bytes); in ecc_verify()
[all …]
A Drsa.c346 size_t *sig_len) in crypto_acipher_rsassa_sign() argument
352 if (!key || !msg || !sig_len) { in crypto_acipher_rsassa_sign()
382 if (rsa_ssa.key.n_size > *sig_len) { in crypto_acipher_rsassa_sign()
384 *sig_len, rsa_ssa.key.n_size); in crypto_acipher_rsassa_sign()
385 *sig_len = rsa_ssa.key.n_size; in crypto_acipher_rsassa_sign()
413 *sig_len = rsa_ssa.signature.length; in crypto_acipher_rsassa_sign()
428 size_t sig_len) in crypto_acipher_rsassa_verify() argument
464 if (rsa_ssa.key.n_size > sig_len) { in crypto_acipher_rsassa_verify()
477 rsa_ssa.signature.length = sig_len; in crypto_acipher_rsassa_verify()
/optee_os/core/lib/libtomcrypt/
A Ddsa.c97 uint8_t *sig, size_t *sig_len) in crypto_acipher_dsa_sign() argument
131 if (*sig_len < 2 * mp_unsigned_bin_size(ltc_key.q)) { in crypto_acipher_dsa_sign()
132 *sig_len = 2 * mp_unsigned_bin_size(ltc_key.q); in crypto_acipher_dsa_sign()
147 *sig_len = 2 * mp_unsigned_bin_size(ltc_key.q); in crypto_acipher_dsa_sign()
148 memset(sig, 0, *sig_len); in crypto_acipher_dsa_sign()
149 mp_to_unsigned_bin(r, (uint8_t *)sig + *sig_len/2 - in crypto_acipher_dsa_sign()
151 mp_to_unsigned_bin(s, (uint8_t *)sig + *sig_len - in crypto_acipher_dsa_sign()
166 const uint8_t *sig, size_t sig_len) in crypto_acipher_dsa_verify() argument
192 mp_read_unsigned_bin(r, (uint8_t *)sig, sig_len/2); in crypto_acipher_dsa_verify()
193 mp_read_unsigned_bin(s, (uint8_t *)sig + sig_len/2, sig_len/2); in crypto_acipher_dsa_verify()
A Dsm2-dsa.c23 size_t *sig_len) in sm2_ltc_dsa_sign() argument
35 if (*sig_len < 2 * SM2_INT_SIZE_BYTES) { in sm2_ltc_dsa_sign()
36 *sig_len = 64; in sm2_ltc_dsa_sign()
125 *sig_len = 2 * SM2_INT_SIZE_BYTES; in sm2_ltc_dsa_sign()
126 memset(sig, 0, *sig_len); in sm2_ltc_dsa_sign()
141 const uint8_t *sig, size_t sig_len) in sm2_ltc_dsa_verify() argument
156 if (sig_len != 64) in sm2_ltc_dsa_verify()
A Dacipher_helpers.h57 size_t *sig_len);
61 const uint8_t *sig, size_t sig_len);
66 uint8_t *sig __unused, size_t *sig_len __unused) in sm2_ltc_dsa_sign()
74 const uint8_t *sig __unused, size_t sig_len __unused) in sm2_ltc_dsa_verify()
A Decc.c247 uint8_t *sig, size_t *sig_len) in _ltc_ecc_sign() argument
263 if (*sig_len < 2 * key_size_bytes) { in _ltc_ecc_sign()
264 *sig_len = 2 * key_size_bytes; in _ltc_ecc_sign()
269 ltc_sig_len = *sig_len; in _ltc_ecc_sign()
277 *sig_len = ltc_sig_len; in _ltc_ecc_sign()
286 const uint8_t *sig, size_t sig_len) in _ltc_ecc_verify() argument
302 if ((key_size_bytes * 2) != sig_len) { in _ltc_ecc_verify()
307 ltc_res = ecc_verify_hash_rfc7518(sig, sig_len, msg, msg_len, &ltc_stat, in _ltc_ecc_verify()
/optee_os/lib/libmbedtls/core/
A Dsm2-dsa.c27 uint8_t *sig, size_t *sig_len) in sm2_mbedtls_dsa_sign() argument
39 if (*sig_len < 2 * SM2_INT_SIZE_BYTES) { in sm2_mbedtls_dsa_sign()
40 *sig_len = 64; in sm2_mbedtls_dsa_sign()
124 *sig_len = 2 * SM2_INT_SIZE_BYTES; in sm2_mbedtls_dsa_sign()
125 memset(sig, 0, *sig_len); in sm2_mbedtls_dsa_sign()
152 const uint8_t *sig, size_t sig_len) in sm2_mbedtls_dsa_verify() argument
165 if (sig_len != 64) in sm2_mbedtls_dsa_verify()
A Decc.c176 size_t *sig_len) in ecc_sign() argument
220 *sig_len = 2 * key_size_bytes; in ecc_sign()
221 memset(sig, 0, *sig_len); in ecc_sign()
222 mbedtls_mpi_write_binary(&r, sig + *sig_len / 2 - in ecc_sign()
226 mbedtls_mpi_write_binary(&s, sig + *sig_len - in ecc_sign()
245 const uint8_t *sig, size_t sig_len) in ecc_verify() argument
285 if ((key_size_bytes * 2) != sig_len) { in ecc_verify()
290 mbedtls_mpi_read_binary(&r, sig, sig_len / 2); in ecc_verify()
291 mbedtls_mpi_read_binary(&s, sig + sig_len / 2, sig_len / 2); in ecc_verify()
A Dsm2-dsa.h15 uint8_t *sig, size_t *sig_len);
19 const uint8_t *sig, size_t sig_len);
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/
A Dpk_internal.h51 const unsigned char *sig, size_t sig_len );
56 unsigned char *sig, size_t *sig_len,
64 const unsigned char *sig, size_t sig_len,
70 unsigned char *sig, size_t *sig_len,
A Dpk.h426 const unsigned char *sig, size_t sig_len );
451 const unsigned char *sig, size_t sig_len,
486 const unsigned char *sig, size_t sig_len );
520 unsigned char *sig, size_t *sig_len,
554 unsigned char *sig, size_t *sig_len,
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/
A Dpk_internal.h51 const unsigned char *sig, size_t sig_len );
56 unsigned char *sig, size_t *sig_len,
64 const unsigned char *sig, size_t sig_len,
70 unsigned char *sig, size_t *sig_len,
A Dpk.h426 const unsigned char *sig, size_t sig_len );
451 const unsigned char *sig, size_t sig_len,
486 const unsigned char *sig, size_t sig_len );
520 unsigned char *sig, size_t *sig_len,
554 unsigned char *sig, size_t *sig_len,
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
A Dpk_internal.h51 const unsigned char *sig, size_t sig_len );
56 unsigned char *sig, size_t *sig_len,
64 const unsigned char *sig, size_t sig_len,
70 unsigned char *sig, size_t *sig_len,
A Dpk.h426 const unsigned char *sig, size_t sig_len );
451 const unsigned char *sig, size_t sig_len,
486 const unsigned char *sig, size_t sig_len );
520 unsigned char *sig, size_t *sig_len,
554 unsigned char *sig, size_t *sig_len,
/optee_os/out/arm/export-ta_arm64/include/mbedtls/
A Dpk_internal.h51 const unsigned char *sig, size_t sig_len );
56 unsigned char *sig, size_t *sig_len,
64 const unsigned char *sig, size_t sig_len,
70 unsigned char *sig, size_t *sig_len,
A Dpk.h426 const unsigned char *sig, size_t sig_len );
451 const unsigned char *sig, size_t sig_len,
486 const unsigned char *sig, size_t sig_len );
520 unsigned char *sig, size_t *sig_len,
554 unsigned char *sig, size_t *sig_len,
/optee_os/out/arm/export-ta_arm32/include/mbedtls/
A Dpk_internal.h51 const unsigned char *sig, size_t sig_len );
56 unsigned char *sig, size_t *sig_len,
64 const unsigned char *sig, size_t sig_len,
70 unsigned char *sig, size_t *sig_len,
A Dpk.h426 const unsigned char *sig, size_t sig_len );
451 const unsigned char *sig, size_t sig_len,
486 const unsigned char *sig, size_t sig_len );
520 unsigned char *sig, size_t *sig_len,
554 unsigned char *sig, size_t *sig_len,
/optee_os/scripts/
A Dsign_encrypt.py211 sig_len = math.ceil(key.key_size / 8)
225 digest_len, sig_len)
291 if len(sig) != sig_len:
294 format(len(sig), sig_len))
348 sig_len] = struct.unpack('<IIIIHH', img[:SHDR_SIZE])
354 start, end = end, SHDR_SIZE + digest_len + sig_len
/optee_os/out/arm/export-ta_arm32/scripts/
A Dsign_encrypt.py211 sig_len = math.ceil(key.key_size / 8)
225 digest_len, sig_len)
291 if len(sig) != sig_len:
294 format(len(sig), sig_len))
348 sig_len] = struct.unpack('<IIIIHH', img[:SHDR_SIZE])
354 start, end = end, SHDR_SIZE + digest_len + sig_len

Completed in 39 milliseconds

12