Home
last modified time | relevance | path

Searched refs:msg_len (Results 1 – 25 of 32) sorted by relevance

12

/optee_os/core/drivers/crypto/crypto_api/acipher/
H A Drsa.c110 size_t *msg_len) in crypto_acipher_rsanopad_decrypt() argument
116 if (!key || !msg || !cipher || !msg_len) { in crypto_acipher_rsanopad_decrypt()
120 key, msg, msg_len ? *msg_len : 0, in crypto_acipher_rsanopad_decrypt()
133 rsa_data.message.length = *msg_len; in crypto_acipher_rsanopad_decrypt()
139 *msg_len = rsa_data.message.length; in crypto_acipher_rsanopad_decrypt()
148 const uint8_t *msg, size_t msg_len, in crypto_acipher_rsanopad_encrypt() argument
159 key, msg, msg_len, in crypto_acipher_rsanopad_encrypt()
185 rsa_data.message.length = msg_len; in crypto_acipher_rsanopad_encrypt()
205 size_t *msg_len) in crypto_acipher_rsaes_decrypt() argument
211 if (!key || !msg || !cipher || !msg_len || (!label && label_len)) { in crypto_acipher_rsaes_decrypt()
[all …]
H A Ddsa.c122 const uint8_t *msg, size_t msg_len, in crypto_acipher_dsa_sign() argument
163 sdata.message.length = msg_len; in crypto_acipher_dsa_sign()
182 const uint8_t *msg, size_t msg_len, in crypto_acipher_dsa_verify() argument
217 sdata.message.length = msg_len; in crypto_acipher_dsa_verify()
H A Decc.c162 const uint8_t *msg, size_t msg_len, uint8_t *sig, in ecc_sign() argument
205 sdata.message.length = msg_len; in ecc_sign()
234 const uint8_t *msg, size_t msg_len, in ecc_verify() argument
268 sdata.message.length = msg_len; in ecc_verify()
/optee_os/core/lib/libtomcrypt/
H A Ded25519.c79 const uint8_t *msg, size_t msg_len, in crypto_acipher_ed25519_sign() argument
102 err = ed25519_sign(msg, msg_len, sig, &siglen, &private_key); in crypto_acipher_ed25519_sign()
113 const uint8_t *msg, size_t msg_len, in crypto_acipher_ed25519ctx_sign() argument
139 err = ed25519ph_sign(msg, msg_len, sig, &siglen, in crypto_acipher_ed25519ctx_sign()
142 err = ed25519ctx_sign(msg, msg_len, sig, &siglen, in crypto_acipher_ed25519ctx_sign()
155 const uint8_t *msg, size_t msg_len, in crypto_acipher_ed25519_verify() argument
169 if (ed25519_verify(msg, msg_len, sig, sig_len, &stat, in crypto_acipher_ed25519_verify()
180 const uint8_t *msg, size_t msg_len, in crypto_acipher_ed25519ctx_verify() argument
197 if (ed25519ph_verify(msg, msg_len, sig, sig_len, ctx, ctxlen, in crypto_acipher_ed25519ctx_verify()
201 if (ed25519ctx_verify(msg, msg_len, sig, sig_len, ctx, ctxlen, in crypto_acipher_ed25519ctx_verify()
H A Dacipher_helpers.h56 const uint8_t *msg, size_t msg_len, uint8_t *sig,
60 const uint8_t *msg, size_t msg_len,
65 const uint8_t *msg __unused, size_t msg_len __unused, in sm2_ltc_dsa_sign()
73 const uint8_t *msg __unused, size_t msg_len __unused, in sm2_ltc_dsa_verify()
H A Ddsa.c96 const uint8_t *msg, size_t msg_len, in crypto_acipher_dsa_sign() argument
126 if (msg_len != hash_size) { in crypto_acipher_dsa_sign()
143 ltc_res = dsa_sign_hash_raw(msg, msg_len, r, s, NULL, in crypto_acipher_dsa_sign()
165 const uint8_t *msg, size_t msg_len, in crypto_acipher_dsa_verify() argument
194 ltc_res = dsa_verify_hash_raw(r, s, msg, msg_len, &ltc_stat, &ltc_key); in crypto_acipher_dsa_verify()
H A Dsm2-dsa.c22 const uint8_t *msg, size_t msg_len, uint8_t *sig, in sm2_ltc_dsa_sign() argument
80 mp_read_unsigned_bin(e, (unsigned char *)msg, msg_len); in sm2_ltc_dsa_sign()
140 const uint8_t *msg, size_t msg_len, in sm2_ltc_dsa_verify() argument
235 mp_read_unsigned_bin(eprime, (unsigned char *)msg, msg_len); in sm2_ltc_dsa_verify()
H A Drsa.c525 size_t msg_len, uint8_t *sig,
531 size_t msg_len, uint8_t *sig, in sw_crypto_acipher_rsassa_sign() argument
589 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_sign()
605 ltc_res = rsa_sign_hash_ex(msg, msg_len, sig, &ltc_sig_len, in sw_crypto_acipher_rsassa_sign()
624 size_t msg_len, const uint8_t *sig,
631 size_t msg_len, const uint8_t *sig, in sw_crypto_acipher_rsassa_verify() argument
657 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_verify()
702 ltc_res = rsa_verify_hash_ex(sig, sig_len, msg, msg_len, ltc_rsa_algo, in sw_crypto_acipher_rsassa_verify()
H A Decc.c246 const uint8_t *msg, size_t msg_len, in _ltc_ecc_sign() argument
270 ltc_res = ecc_sign_hash_rfc7518(msg, msg_len, sig, &ltc_sig_len, in _ltc_ecc_sign()
285 const uint8_t *msg, size_t msg_len, in _ltc_ecc_verify() argument
307 ltc_res = ecc_verify_hash_rfc7518(sig, sig_len, msg, msg_len, &ltc_stat, in _ltc_ecc_verify()
/optee_os/core/drivers/crypto/se050/core/
H A Decc.c172 size_t *msg_len, uint8_t **msg_padded) in ecc_prepare_msg() argument
194 if (*msg_len >= map[i].len) { in ecc_prepare_msg()
196 *msg_len = map[i].len; in ecc_prepare_msg()
205 memcpy(*msg_padded, msg, *msg_len); in ecc_prepare_msg()
206 *msg_len = map[i].len; in ecc_prepare_msg()
400 const uint8_t *msg, size_t msg_len, in verify_fallback() argument
407 return pub_ops->verify(algo, key, msg, msg_len, sig, sig_len); in verify_fallback()
411 const uint8_t *msg, size_t msg_len, in sign_fallback() argument
421 return pair_ops->sign(algo, key, msg, msg_len, sig, sig_len); in sign_fallback()
490 const uint8_t *msg, size_t msg_len, in sign() argument
[all …]
/optee_os/lib/libmbedtls/core/
H A Dsm2-dsa.h14 const uint8_t *msg, size_t msg_len,
18 const uint8_t *msg, size_t msg_len,
H A Dsm2-dsa.c26 const uint8_t *msg, size_t msg_len, in sm2_mbedtls_dsa_sign() argument
82 mbedtls_mpi_read_binary(&e, (unsigned char *)msg, msg_len); in sm2_mbedtls_dsa_sign()
151 const uint8_t *msg, size_t msg_len, in sm2_mbedtls_dsa_verify() argument
243 mres = mbedtls_mpi_read_binary(&eprime, msg, msg_len); in sm2_mbedtls_dsa_verify()
H A Drsa.c654 const uint8_t *msg, size_t msg_len,
660 const uint8_t *msg, size_t msg_len, in sw_crypto_acipher_rsassa_sign() argument
718 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_sign()
740 lmd_res = pk_info->sign_func(&ctx, md_algo, msg, msg_len, sig, in sw_crypto_acipher_rsassa_sign()
757 size_t msg_len, const uint8_t *sig,
765 size_t msg_len, const uint8_t *sig, in sw_crypto_acipher_rsassa_verify() argument
809 if (msg_len != hash_size) { in sw_crypto_acipher_rsassa_verify()
855 lmd_res = pk_info->verify_func(&ctx, md_algo, msg, msg_len, in sw_crypto_acipher_rsassa_verify()
H A Decc.c165 const uint8_t *msg, size_t msg_len, uint8_t *sig, in ecc_sign() argument
218 msg_len, mbd_rand, NULL); in ecc_sign()
244 const uint8_t *msg, size_t msg_len, in ecc_verify() argument
296 lmd_res = mbedtls_ecdsa_verify(&ecdsa.grp, msg, msg_len, &ecdsa.Q, in ecc_verify()
/optee_os/core/pta/veraison_attestation/
H A Dsign.c63 static TEE_Result hash_sha256(const uint8_t *msg, size_t msg_len, uint8_t *hash) in hash_sha256() argument
74 res = crypto_hash_update(ctx, msg, msg_len); in hash_sha256()
165 TEE_Result sign_ecdsa_sha256(const uint8_t *msg, size_t msg_len, uint8_t *sig, in sign_ecdsa_sha256() argument
177 res = hash_sha256(msg, msg_len, hash_msg); in sign_ecdsa_sha256()
H A Dsign.h34 TEE_Result sign_ecdsa_sha256(const uint8_t *msg, size_t msg_len, uint8_t *sig,
/optee_os/core/include/crypto/
H A Dcrypto.h236 const uint8_t *msg, size_t msg_len,
239 const uint8_t *msg, size_t msg_len,
244 const uint8_t *msg, size_t msg_len,
247 const uint8_t *msg, size_t msg_len,
276 size_t msg_len, uint8_t *sig,
281 size_t msg_len, const uint8_t *sig,
284 const uint8_t *msg, size_t msg_len,
287 const uint8_t *msg, size_t msg_len,
290 const uint8_t *msg, size_t msg_len,
293 const uint8_t *msg, size_t msg_len,
H A Dcrypto_impl.h415 const uint8_t *msg, size_t msg_len,
434 const uint8_t *msg, size_t msg_len, uint8_t *sig,
552 size_t msg_len, uint8_t *sig,
558 size_t msg_len, const uint8_t *sig,
/optee_os/core/drivers/crypto/versal/
H A Decc.c126 size_t msg_len, struct versal_mbox_mem *p) in ecc_prepare_msg() argument
131 if (msg_len > TEE_SHA512_HASH_SIZE + 2) in ecc_prepare_msg()
142 memcpy_swp(swp, msg, msg_len); in ecc_prepare_msg()
147 const uint8_t *msg, size_t msg_len, in verify() argument
170 return pub_ops->verify(algo, key, msg, msg_len, sig, sig_len); in verify()
173 ret = ecc_prepare_msg(algo, msg, msg_len, &p); in verify()
227 const uint8_t *msg, size_t msg_len, in sign() argument
249 return pair_ops->sign(algo, key, msg, msg_len, sig, sig_len); in sign()
253 ret = ecc_prepare_msg(algo, msg, msg_len, &p); in sign()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dssl_client.c919 size_t buf_len, msg_len, binders_len; in mbedtls_ssl_write_client_hello() local
931 &msg_len, in mbedtls_ssl_write_client_hello()
936 ssl->out_msglen = msg_len + 4; in mbedtls_ssl_write_client_hello()
965 msg_len); in mbedtls_ssl_write_client_hello()
970 ret = ssl->handshake->update_checksum(ssl, buf, msg_len - binders_len); in mbedtls_ssl_write_client_hello()
979 ssl, buf + msg_len - binders_len, buf + msg_len)); in mbedtls_ssl_write_client_hello()
980 ret = ssl->handshake->update_checksum(ssl, buf + msg_len - binders_len, in mbedtls_ssl_write_client_hello()
991 msg_len)); in mbedtls_ssl_write_client_hello()
H A Dssl_tls13_generic.c828 size_t buf_len, msg_len; in mbedtls_ssl_tls13_write_certificate() local
838 &msg_len)); in mbedtls_ssl_tls13_write_certificate()
841 ssl, MBEDTLS_SSL_HS_CERTIFICATE, buf, msg_len)); in mbedtls_ssl_tls13_write_certificate()
844 ssl, buf_len, msg_len)); in mbedtls_ssl_tls13_write_certificate()
1029 size_t buf_len, msg_len; in mbedtls_ssl_tls13_write_certificate_verify() local
1038 ssl, buf, buf + buf_len, &msg_len)); in mbedtls_ssl_tls13_write_certificate_verify()
1042 buf, msg_len)); in mbedtls_ssl_tls13_write_certificate_verify()
1045 ssl, buf_len, msg_len)); in mbedtls_ssl_tls13_write_certificate_verify()
1207 size_t buf_len, msg_len; in mbedtls_ssl_tls13_write_finished_message() local
1217 ssl, buf, buf + buf_len, &msg_len)); in mbedtls_ssl_tls13_write_finished_message()
[all …]
H A Dssl_tls13_server.c2422 size_t buf_len, msg_len; in ssl_tls13_write_server_hello() local
2433 &msg_len, in ssl_tls13_write_server_hello()
2437 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, buf, msg_len)); in ssl_tls13_write_server_hello()
2440 ssl, buf_len, msg_len)); in ssl_tls13_write_server_hello()
2495 size_t buf_len, msg_len; in ssl_tls13_write_hello_retry_request() local
2507 &msg_len, in ssl_tls13_write_hello_retry_request()
2510 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, buf, msg_len)); in ssl_tls13_write_hello_retry_request()
2514 msg_len)); in ssl_tls13_write_hello_retry_request()
2614 size_t buf_len, msg_len; in ssl_tls13_write_encrypted_extensions() local
2628 ssl, buf, buf + buf_len, &msg_len)); in ssl_tls13_write_encrypted_extensions()
[all …]
/optee_os/core/drivers/crypto/se050/glue/
H A Duser.c45 sss_status_t glue_mac_one_go(void *mac, const uint8_t *msg, size_t msg_len, in glue_mac_one_go() argument
48 if (crypto_mac_update(mac, msg, msg_len)) in glue_mac_one_go()
/optee_os/core/crypto/
H A Dcrypto.c626 size_t msg_len __unused, in crypto_acipher_rsassa_sign()
637 size_t msg_len __unused, in crypto_acipher_rsassa_verify()
668 size_t msg_len __unused, in crypto_acipher_dsa_sign()
678 size_t msg_len __unused, in crypto_acipher_dsa_verify()
762 const uint8_t *msg, size_t msg_len, in crypto_acipher_ecc_sign() argument
770 return key->ops->sign(algo, key, msg, msg_len, sig, sig_len); in crypto_acipher_ecc_sign()
774 const uint8_t *msg, size_t msg_len, in crypto_acipher_ecc_verify() argument
782 return key->ops->verify(algo, key, msg, msg_len, sig, sig_len); in crypto_acipher_ecc_verify()
911 size_t msg_len __unused, in crypto_acipher_ed25519_sign()
921 size_t msg_len __unused, in crypto_acipher_ed25519_verify()
[all …]
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_rsa.c322 size_t msg_len = rsa_data->message.length; in rsaes_pkcs_v1_5_encode() local
330 if ((msg_len + PKCS_V1_5_MSG_MIN_LEN) > n_bytes || out_len < n_bytes) { in rsaes_pkcs_v1_5_encode()
335 ps_len = n_bytes - PKCS_V1_5_FIXED_LEN - msg_len; in rsaes_pkcs_v1_5_encode()
344 msg_len); in rsaes_pkcs_v1_5_encode()
883 size_t msg_len = 0; in rsa_oaep_get_msg() local
910 msg_len = db_len - lp_len - 1; in rsa_oaep_get_msg()
911 if (msg_len > rsa_data->message.length) { in rsa_oaep_get_msg()
913 *out_len = msg_len; in rsa_oaep_get_msg()
917 *out_len = msg_len; in rsa_oaep_get_msg()
918 memcpy(out, db + lp_len + 1, msg_len); in rsa_oaep_get_msg()

12