/openssl/crypto/rsa/ |
H A D | rsa_pk1.c | 49 j = tlen - 3 - flen; in RSA_padding_add_PKCS1_type_1() 53 memcpy(p, from, (unsigned int)flen); in RSA_padding_add_PKCS1_type_1() 77 if (num == flen) { in RSA_padding_check_PKCS1_type_1() 82 flen--; in RSA_padding_check_PKCS1_type_1() 135 } else if (flen < 0) { in ossl_rsa_padding_add_PKCS1_type_2_ex() 146 j = tlen - 3 - flen; in ossl_rsa_padding_add_PKCS1_type_2_ex() 181 if (tlen <= 0 || flen <= 0) in RSA_padding_check_PKCS1_type_2() 205 flen -= 1 & mask; in RSA_padding_check_PKCS1_type_2() 420 if (num != flen || tlen <= 0 || flen <= 0) { in ossl_rsa_padding_check_PKCS1_type_2() 432 if (ossl_rsa_prf(ctx, synthetic, flen, "message", 7, kdk, flen * 8) < 0) in ossl_rsa_padding_check_PKCS1_type_2() [all …]
|
H A D | rsa_none.c | 21 const unsigned char *from, int flen) in RSA_padding_add_none() argument 23 if (flen > tlen) { in RSA_padding_add_none() 28 if (flen < tlen) { in RSA_padding_add_none() 33 memcpy(to, from, (unsigned int)flen); in RSA_padding_add_none() 38 const unsigned char *from, int flen, int num) in RSA_padding_check_none() argument 41 if (flen > tlen) { in RSA_padding_check_none() 46 memset(to, 0, tlen - flen); in RSA_padding_check_none() 47 memcpy(to + tlen - flen, from, flen); in RSA_padding_check_none()
|
H A D | rsa_x931.c | 44 const unsigned char *from, int flen) in RSA_padding_add_X931() argument 53 j = tlen - flen - 2; in RSA_padding_add_X931() 73 memcpy(p, from, (unsigned int)flen); in RSA_padding_add_X931() 74 p += flen; in RSA_padding_add_X931() 80 const unsigned char *from, int flen, int num) in RSA_padding_check_X931() argument 86 if ((num != flen) || ((*p != 0x6A) && (*p != 0x6B))) { in RSA_padding_check_X931() 92 j = flen - 3; in RSA_padding_check_X931() 111 j = flen - 2; in RSA_padding_check_X931()
|
H A D | rsa_oaep.c | 40 const unsigned char *from, int flen, in RSA_padding_add_PKCS1_OAEP() argument 98 if (flen > emlen - 2 * mdlen - 1) { in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 117 memset(db + mdlen, 0, emlen - flen - 2 * mdlen - 1); in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 119 db[emlen - flen - mdlen - 1] = 0x01; in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 120 memcpy(db + emlen - flen - mdlen, from, (unsigned int)flen); in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 164 return RSA_padding_check_PKCS1_OAEP_mgf1(to, tlen, from, flen, num, in RSA_padding_check_PKCS1_OAEP() 211 if (tlen <= 0 || flen <= 0 || mdlen <= 0) in RSA_padding_check_PKCS1_OAEP_mgf1() 221 if (num < flen || num < 2 * mdlen + 2) { in RSA_padding_check_PKCS1_OAEP_mgf1() 241 for (from += flen, em += num, i = 0; i < num; i++) { in RSA_padding_check_PKCS1_OAEP_mgf1() 242 mask = ~constant_time_is_zero(flen); in RSA_padding_check_PKCS1_OAEP_mgf1() [all …]
|
H A D | rsa_crpt.c | 33 int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, in RSA_public_encrypt() argument 36 return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding); in RSA_public_encrypt() 39 int RSA_private_encrypt(int flen, const unsigned char *from, in RSA_private_encrypt() argument 42 return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding); in RSA_private_encrypt() 45 int RSA_private_decrypt(int flen, const unsigned char *from, in RSA_private_decrypt() argument 48 return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding); in RSA_private_decrypt() 51 int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, in RSA_public_decrypt() argument 54 return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding); in RSA_public_decrypt()
|
H A D | rsa_meth.c | 103 (int flen, const unsigned char *from, in RSA_meth_get_pub_enc() 110 int (*pub_enc) (int flen, const unsigned char *from, in RSA_meth_set_pub_enc() 119 (int flen, const unsigned char *from, in RSA_meth_get_pub_dec() 126 int (*pub_dec) (int flen, const unsigned char *from, in RSA_meth_set_pub_dec() 135 (int flen, const unsigned char *from, in RSA_meth_get_priv_enc() 142 int (*priv_enc) (int flen, const unsigned char *from, in RSA_meth_set_priv_enc() 151 (int flen, const unsigned char *from, in RSA_meth_get_priv_dec() 158 int (*priv_dec) (int flen, const unsigned char *from, in RSA_meth_set_priv_dec()
|
H A D | rsa_ossl.c | 146 i = RSA_padding_add_none(buf, num, from, flen); in rsa_ossl_public_encrypt() 335 i = RSA_padding_add_X931(buf, num, from, flen); in rsa_ossl_private_encrypt() 494 if (flen < num) { in derive_kdk() 495 memset(buf, 0, num - flen); in derive_kdk() 496 if (HMAC_Update(hmac, buf, num - flen) <= 0) { in derive_kdk() 501 if (HMAC_Update(hmac, from, flen) <= 0) { in derive_kdk() 560 if (flen > num) { in rsa_ossl_private_decrypt() 565 if (flen < 1) { in rsa_ossl_private_decrypt() 571 if (BN_bin2bn(from, (int)flen, f) == NULL) in rsa_ossl_private_decrypt() 750 if (flen > num) { in rsa_ossl_public_decrypt() [all …]
|
H A D | rsa_local.h | 105 int (*rsa_pub_enc) (int flen, const unsigned char *from, 107 int (*rsa_pub_dec) (int flen, const unsigned char *from, 109 int (*rsa_priv_enc) (int flen, const unsigned char *from, 111 int (*rsa_priv_dec) (int flen, const unsigned char *from, 198 int flen);
|
/openssl/include/openssl/ |
H A D | rsa.h | 293 int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, 296 int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, 299 int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, 413 const unsigned char *from, int flen, 418 const unsigned char *from, int flen, 496 int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) (int flen, 502 int (*pub_enc) (int flen, const unsigned char *from, 506 int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) (int flen, 512 int (*pub_dec) (int flen, const unsigned char *from, 516 int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) (int flen, [all …]
|
/openssl/doc/man3/ |
H A D | RSA_private_encrypt.pod | 15 int RSA_private_encrypt(int flen, unsigned char *from, 18 int RSA_public_decrypt(int flen, unsigned char *from, 30 RSA_private_encrypt() signs the B<flen> bytes at B<from> (usually a 54 RSA_public_decrypt() recovers the message digest from the B<flen>
|
H A D | RSA_public_encrypt.pod | 15 int RSA_public_encrypt(int flen, const unsigned char *from, 18 int RSA_private_decrypt(int flen, const unsigned char *from, 28 RSA_public_encrypt() encrypts the B<flen> bytes at B<from> (usually a 55 When encrypting B<flen> must not be more than RSA_size(B<rsa>) - 11 for the 66 RSA_private_decrypt() decrypts the B<flen> bytes at B<from> using the 67 private key B<rsa> and stores the plaintext in B<to>. B<flen> should
|
H A D | RSA_meth_new.pod | 41 int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from, 44 int (*pub_enc)(int flen, const unsigned char *from, 49 (int flen, const unsigned char *from, 52 int (*pub_dec)(int flen, const unsigned char *from, 56 int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from, 60 int (*priv_enc)(int flen, const unsigned char *from, 63 int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, const unsigned char *from, 67 int (*priv_dec)(int flen, const unsigned char *from,
|
H A D | RSA_set_method.pod | 94 int (*rsa_pub_enc)(int flen, unsigned char *from, 98 int (*rsa_pub_dec)(int flen, unsigned char *from, 102 int (*rsa_priv_enc)(int flen, unsigned char *from, 106 int (*rsa_priv_dec)(int flen, unsigned char *from,
|
/openssl/include/crypto/ |
H A D | rsa.h | 94 const unsigned char *from, int flen, 99 size_t flen, int client_version, 103 const unsigned char *from, int flen,
|
/openssl/engines/ |
H A D | e_capi.c | 842 int capi_rsa_priv_enc(int flen, const unsigned char *from, in capi_rsa_priv_enc() argument 944 int capi_rsa_priv_dec(int flen, const unsigned char *from, in capi_rsa_priv_dec() argument 954 if (flen <= 0) in capi_rsa_priv_dec() 955 return flen; in capi_rsa_priv_dec() 987 if ((tmpbuf = OPENSSL_malloc(flen)) == NULL) in capi_rsa_priv_dec() 989 for (i = 0; i < flen; i++) in capi_rsa_priv_dec() 990 tmpbuf[flen - i - 1] = from[i]; in capi_rsa_priv_dec() 993 dlen = flen; in capi_rsa_priv_dec() 1001 memcpy(to, tmpbuf, (flen = (int)dlen)); in capi_rsa_priv_dec() 1003 OPENSSL_cleanse(tmpbuf, flen); in capi_rsa_priv_dec() [all …]
|
/openssl/providers/implementations/ciphers/ |
H A D | cipher_chacha20_poly1305.h | 40 size_t flen);
|
H A D | ciphercommon_ccm.c | 53 size_t flen) in ccm_tls_iv_set_fixed() argument 55 if (flen != EVP_CCM_TLS_FIXED_IV_LEN) in ccm_tls_iv_set_fixed() 59 memcpy(ctx->iv, fixed, flen); in ccm_tls_iv_set_fixed()
|
H A D | cipher_chacha20_poly1305_hw.c | 46 unsigned char *fixed, size_t flen) in chacha_poly1305_tls_iv_set_fixed() argument 50 if (flen != CHACHA20_POLY1305_IVLEN) in chacha_poly1305_tls_iv_set_fixed()
|
/openssl/apps/lib/ |
H A D | apps.c | 2743 size_t i, flen = strlen(from) + 1, tlen = strlen(to) + 1; in WIN32_rename() local 2745 tfrom = malloc(sizeof(*tfrom) * (flen + tlen)); in WIN32_rename() 2748 tto = tfrom + flen; in WIN32_rename() 2750 if (!MultiByteToWideChar(CP_ACP, 0, from, flen, (WCHAR *)tfrom, flen)) in WIN32_rename() 2752 for (i = 0; i < flen; i++) in WIN32_rename()
|
/openssl/test/ |
H A D | quic_multistream_test.c | 3205 uint64_t type = OSSL_QUIC_FRAME_TYPE_STREAM_OFF_LEN, offset, flen, i; in script_32_inject_plain() local 3217 flen = 0; in script_32_inject_plain() 3221 flen = 5; in script_32_inject_plain() 3225 flen = 5; in script_32_inject_plain() 3229 flen = 1; in script_32_inject_plain() 3241 || !TEST_true(WPACKET_quic_write_vlint(&wpkt, flen))) in script_32_inject_plain() 3244 for (i = 0; i < flen; ++i) in script_32_inject_plain()
|