/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ed25519/ |
A D | ed25519_verify.c | 13 const unsigned char *sig, unsigned long siglen, in s_ed25519_verify() argument 29 if (siglen != 64uL) return CRYPT_INVALID_ARG; in s_ed25519_verify() 32 mlen = msglen + siglen; in s_ed25519_verify() 33 if ((mlen < msglen) || (mlen < siglen)) return CRYPT_OVERFLOW; in s_ed25519_verify() 38 XMEMCPY(m, sig, siglen); in s_ed25519_verify() 39 XMEMCPY(m + siglen, msg, msglen); in s_ed25519_verify() 48 zeromem(m, msglen + siglen); in s_ed25519_verify() 68 const unsigned char *sig, unsigned long siglen, in ed25519ctx_verify() argument 97 const unsigned char *sig, unsigned long siglen, in ed25519ph_verify() argument 127 const unsigned char *sig, unsigned long siglen, in ed25519_verify() argument [all …]
|
A D | ed25519_sign.c | 13 unsigned char *sig, unsigned long *siglen, in s_ed25519_sign() argument 23 LTC_ARGCHK(siglen != NULL); in s_ed25519_sign() 29 if (*siglen < 64uL) { in s_ed25519_sign() 30 *siglen = 64uL; in s_ed25519_sign() 44 *siglen = 64uL; in s_ed25519_sign() 65 unsigned char *sig, unsigned long *siglen, in ed25519ctx_sign() argument 78 return s_ed25519_sign(msg, msglen, sig, siglen, ctx_prefix, ctx_prefix_size, private_key); in ed25519ctx_sign() 92 unsigned char *sig, unsigned long *siglen, in ed25519ph_sign() argument 107 …return s_ed25519_sign(msg_hash, sizeof(msg_hash), sig, siglen, ctx_prefix, ctx_prefix_size, privat… in ed25519ph_sign() 120 unsigned char *sig, unsigned long *siglen, in ed25519_sign() argument [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | ed25519.c | 66 unsigned long siglen = 0; in crypto_acipher_ed25519_sign() local 75 siglen = *sig_len; in crypto_acipher_ed25519_sign() 80 err = ed25519_sign(msg, msg_len, sig, &siglen, &private_key); in crypto_acipher_ed25519_sign() 86 *sig_len = siglen; in crypto_acipher_ed25519_sign() 97 unsigned long siglen = 0; in crypto_acipher_ed25519ctx_sign() local 106 siglen = *sig_len; in crypto_acipher_ed25519ctx_sign() 112 err = ed25519ph_sign(msg, msg_len, sig, &siglen, in crypto_acipher_ed25519ctx_sign() 115 err = ed25519ctx_sign(msg, msg_len, sig, &siglen, in crypto_acipher_ed25519ctx_sign() 123 *sig_len = siglen; in crypto_acipher_ed25519ctx_sign()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/rsa/ |
A D | rsa_verify_hash.c | 26 int rsa_verify_hash_ex(const unsigned char *sig, unsigned long siglen, in rsa_verify_hash_ex() argument 67 if (modulus_bytelen != siglen) { in rsa_verify_hash_ex() 72 tmpbuf = XMALLOC(siglen); in rsa_verify_hash_ex() 78 x = siglen; in rsa_verify_hash_ex() 79 if ((err = ltc_mp.rsa_me(sig, siglen, tmpbuf, &x, PK_PUBLIC, key)) != CRYPT_OK) { in rsa_verify_hash_ex() 85 if (x != siglen) { in rsa_verify_hash_ex() 147 … LTC_SET_ASN1(siginfo, 1, LTC_ASN1_OCTET_STRING, tmpbuf, siglen); in rsa_verify_hash_ex() 191 zeromem(tmpbuf, siglen); in rsa_verify_hash_ex()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_verify_hash.c | 89 int dsa_verify_hash(const unsigned char *sig, unsigned long siglen, in dsa_verify_hash() argument 108 err = der_decode_sequence_strict(sig, siglen, sig_seq, 2); in dsa_verify_hash() 114 if (err != CRYPT_OK || reallen != siglen) { in dsa_verify_hash()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_verify_hash.c | 24 int ecc_verify_hash_ex(const unsigned char *sig, unsigned long siglen, in ecc_verify_hash_ex() argument 66 … if ((err = der_decode_sequence_multi_ex(sig, siglen, LTC_DER_SEQ_SEQUENCE | LTC_DER_SEQ_STRICT, in ecc_verify_hash_ex() 74 if (siglen != (2 * i)) { in ecc_verify_hash_ex() 87 if (siglen != 65) { /* Only secp256k1 curves use this format, so must be 65 bytes long */ in ecc_verify_hash_ex() 101 if ((err = ssh_decode_sequence_multi(sig, &siglen, in ecc_verify_hash_ex()
|
A D | ecc_recover_key.c | 26 int ecc_recover_key(const unsigned char *sig, unsigned long siglen, in ecc_recover_key() argument 72 … if ((err = der_decode_sequence_multi_ex(sig, siglen, LTC_DER_SEQ_SEQUENCE | LTC_DER_SEQ_STRICT, in ecc_recover_key() 80 if (siglen != (2*i)) { in ecc_recover_key() 93 if (siglen != 65) { /* Only secp256k1 curves use this format, so must be 65 bytes long */ in ecc_recover_key() 115 if ((err = ssh_decode_sequence_multi(sig, &siglen, in ecc_recover_key()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_pk.h | 68 #define rsa_verify_hash(sig, siglen, hash, hashlen, hash_idx, saltlen, stat, key) \ argument 95 int rsa_verify_hash_ex(const unsigned char *sig, unsigned long siglen, 313 int ecc_verify_hash_ex(const unsigned char *sig, unsigned long siglen, 317 int ecc_recover_key(const unsigned char *sig, unsigned long siglen, 359 unsigned char *sig, unsigned long *siglen, 362 unsigned char *sig, unsigned long *siglen, 366 unsigned char *sig, unsigned long *siglen, 370 const unsigned char *sig, unsigned long siglen, 374 const unsigned char *sig, unsigned long siglen, 379 const unsigned char *sig, unsigned long siglen, [all …]
|
A D | tomcrypt_pkcs.h | 68 const unsigned char *sig, unsigned long siglen,
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_pss_decode.c | 26 const unsigned char *sig, unsigned long siglen, in pkcs_1_pss_decode() argument 78 if (sig[siglen-1] != 0xBC) { in pkcs_1_pss_decode()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | rsa.c | 2023 size_t siglen; in mbedtls_rsa_rsassa_pss_verify_ext() local 2045 siglen = ctx->len; in mbedtls_rsa_rsassa_pss_verify_ext() 2047 if( siglen < 16 || siglen > sizeof( buf ) ) in mbedtls_rsa_rsassa_pss_verify_ext() 2059 if( buf[siglen - 1] != 0xBC ) in mbedtls_rsa_rsassa_pss_verify_ext() 2085 if( buf[0] >> ( 8 - siglen * 8 + msb ) ) in mbedtls_rsa_rsassa_pss_verify_ext() 2092 siglen -= 1; in mbedtls_rsa_rsassa_pss_verify_ext() 2095 if( siglen < hlen + 2 ) in mbedtls_rsa_rsassa_pss_verify_ext() 2097 hash_start = p + siglen - hlen - 1; in mbedtls_rsa_rsassa_pss_verify_ext() 2103 ret = mgf_mask( p, siglen - hlen - 1, hash_start, hlen, &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext() 2107 buf[0] &= 0xFF >> ( siglen * 8 - msb ); in mbedtls_rsa_rsassa_pss_verify_ext()
|