Home
last modified time | relevance | path

Searched refs:plen (Results 1 – 25 of 45) sorted by relevance

12

/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_poly1305_hw.c143 ctx->len.text = plen; in chacha20_poly1305_tls_cipher()
145 if (plen) { in chacha20_poly1305_tls_cipher()
151 in += plen; in chacha20_poly1305_tls_cipher()
152 out += plen; in chacha20_poly1305_tls_cipher()
168 ctx->len.text = plen; in chacha20_poly1305_tls_cipher()
212 in += plen; in chacha20_poly1305_tls_cipher()
213 out += plen; in chacha20_poly1305_tls_cipher()
318 plen = inl; in chacha20_poly1305_aead_cipher()
325 in += plen; in chacha20_poly1305_aead_cipher()
331 in += plen; in chacha20_poly1305_aead_cipher()
[all …]
H A Dcipher_rc4_hmac_md5_hw.c61 size_t plen = ctx->payload_length; in cipher_hw_rc4_hmac_md5_cipher() local
63 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in cipher_hw_rc4_hmac_md5_cipher()
67 if (plen == NO_PAYLOAD_LENGTH) in cipher_hw_rc4_hmac_md5_cipher()
68 plen = len; in cipher_hw_rc4_hmac_md5_cipher()
74 if (plen > md5_off in cipher_hw_rc4_hmac_md5_cipher()
75 && (blocks = (plen - md5_off) / MD5_CBLOCK) in cipher_hw_rc4_hmac_md5_cipher()
94 MD5_Update(&ctx->md, in + md5_off, plen - md5_off); in cipher_hw_rc4_hmac_md5_cipher()
96 if (plen != len) { /* "TLS" mode of operation */ in cipher_hw_rc4_hmac_md5_cipher()
101 MD5_Final(out + plen, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher()
104 MD5_Final(out + plen, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher()
[all …]
H A Dcipher_aes_cbc_hmac_sha1_hw.c379 size_t plen = ctx->payload_length; in aesni_cbc_hmac_sha1_cipher() local
390 if (plen == NO_PAYLOAD_LENGTH) in aesni_cbc_hmac_sha1_cipher()
391 plen = len; in aesni_cbc_hmac_sha1_cipher()
393 ((plen + SHA_DIGEST_LENGTH + in aesni_cbc_hmac_sha1_cipher()
399 if (plen > (sha_off + iv) in aesni_cbc_hmac_sha1_cipher()
423 SHA1_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha1_cipher()
426 SHA1_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha1_cipher()
429 plen += SHA_DIGEST_LENGTH; in aesni_cbc_hmac_sha1_cipher()
430 for (l = len - plen - 1; plen < len; plen++) in aesni_cbc_hmac_sha1_cipher()
431 out[plen] = l; in aesni_cbc_hmac_sha1_cipher()
[all …]
H A Dcipher_aes_cbc_hmac_sha256_hw.c402 size_t plen = ctx->payload_length; in aesni_cbc_hmac_sha256_cipher() local
413 if (plen == NO_PAYLOAD_LENGTH) in aesni_cbc_hmac_sha256_cipher()
414 plen = len; in aesni_cbc_hmac_sha256_cipher()
416 ((plen + SHA256_DIGEST_LENGTH + in aesni_cbc_hmac_sha256_cipher()
436 plen > (sha_off + iv) && in aesni_cbc_hmac_sha256_cipher()
461 SHA256_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha256_cipher()
464 SHA256_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha256_cipher()
467 plen += SHA256_DIGEST_LENGTH; in aesni_cbc_hmac_sha256_cipher()
468 for (l = len - plen - 1; plen < len; plen++) in aesni_cbc_hmac_sha256_cipher()
469 out[plen] = l; in aesni_cbc_hmac_sha256_cipher()
[all …]
/openssl/crypto/evp/
H A De_chacha20_poly1305.c241 if (plen) { in chacha20_poly1305_tls_cipher()
247 in += plen; in chacha20_poly1305_tls_cipher()
248 out += plen; in chacha20_poly1305_tls_cipher()
308 in += plen; in chacha20_poly1305_tls_cipher()
309 out += plen; in chacha20_poly1305_tls_cipher()
407 plen = len; in chacha20_poly1305_cipher()
414 in += plen; in chacha20_poly1305_cipher()
415 out += plen; in chacha20_poly1305_cipher()
420 in += plen; in chacha20_poly1305_cipher()
421 out += plen; in chacha20_poly1305_cipher()
[all …]
H A De_rc4_hmac_md5.c86 size_t plen = key->payload_length; in rc4_hmac_md5_cipher() local
88 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in rc4_hmac_md5_cipher()
92 if (plen == NO_PAYLOAD_LENGTH) in rc4_hmac_md5_cipher()
93 plen = len; in rc4_hmac_md5_cipher()
99 if (plen > md5_off && (blocks = (plen - md5_off) / MD5_CBLOCK) && in rc4_hmac_md5_cipher()
118 MD5_Update(&key->md, in + md5_off, plen - md5_off); in rc4_hmac_md5_cipher()
120 if (plen != len) { /* "TLS" mode of operation */ in rc4_hmac_md5_cipher()
125 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher()
127 MD5_Update(&key->md, out + plen, MD5_DIGEST_LENGTH); in rc4_hmac_md5_cipher()
128 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher()
[all …]
H A De_aes_cbc_hmac_sha1.c429 if (plen == NO_PAYLOAD_LENGTH) in aesni_cbc_hmac_sha1_cipher()
430 plen = len; in aesni_cbc_hmac_sha1_cipher()
432 ((plen + SHA_DIGEST_LENGTH + in aesni_cbc_hmac_sha1_cipher()
439 if (plen > (sha_off + iv) in aesni_cbc_hmac_sha1_cipher()
464 SHA1_Final(out + plen, &key->md); in aesni_cbc_hmac_sha1_cipher()
467 SHA1_Final(out + plen, &key->md); in aesni_cbc_hmac_sha1_cipher()
470 plen += SHA_DIGEST_LENGTH; in aesni_cbc_hmac_sha1_cipher()
471 for (l = len - plen - 1; plen < len; plen++) in aesni_cbc_hmac_sha1_cipher()
472 out[plen] = l; in aesni_cbc_hmac_sha1_cipher()
508 if ((key->aux.tls_aad[plen - 4] << 8 | key->aux.tls_aad[plen - 3]) in aesni_cbc_hmac_sha1_cipher()
[all …]
H A De_aes_cbc_hmac_sha256.c443 if (plen == NO_PAYLOAD_LENGTH) in aesni_cbc_hmac_sha256_cipher()
444 plen = len; in aesni_cbc_hmac_sha256_cipher()
446 ((plen + SHA256_DIGEST_LENGTH + in aesni_cbc_hmac_sha256_cipher()
467 plen > (sha_off + iv) && in aesni_cbc_hmac_sha256_cipher()
492 SHA256_Final(out + plen, &key->md); in aesni_cbc_hmac_sha256_cipher()
495 SHA256_Final(out + plen, &key->md); in aesni_cbc_hmac_sha256_cipher()
498 plen += SHA256_DIGEST_LENGTH; in aesni_cbc_hmac_sha256_cipher()
499 for (l = len - plen - 1; plen < len; plen++) in aesni_cbc_hmac_sha256_cipher()
500 out[plen] = l; in aesni_cbc_hmac_sha256_cipher()
530 if ((key->aux.tls_aad[plen - 4] << 8 | key->aux.tls_aad[plen - 3]) in aesni_cbc_hmac_sha256_cipher()
[all …]
H A Dec_ctrl.c176 int EVP_PKEY_CTX_get_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int *plen) in EVP_PKEY_CTX_get_ecdh_kdf_outlen() argument
198 *plen = (int)len; in EVP_PKEY_CTX_get_ecdh_kdf_outlen()
/openssl/crypto/asn1/
H A Dbio_ndef.c45 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg);
46 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen,
48 static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg);
49 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen,
129 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument
153 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix()
158 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_prefix_free() argument
175 *plen = 0; in ndef_prefix_free()
179 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_suffix_free() argument
183 if (!ndef_prefix_free(b, pbuf, plen, parg)) in ndef_suffix_free()
[all …]
H A Dtasn_dec.c704 long plen; in asn1_d2i_ex_primitive() local
812 len = plen; in asn1_d2i_ex_primitive()
813 p += plen; in asn1_d2i_ex_primitive()
982 long plen; in asn1_find_end() local
1050 long plen; in asn1_collect() local
1091 } else if (plen && !collect_data(buf, &p, plen)) in asn1_collect()
1114 *p += plen; in collect_data()
1148 long plen; in asn1_check_tlen() local
1159 plen = ctx->plen; in asn1_check_tlen()
1167 ctx->plen = plen; in asn1_check_tlen()
[all …]
H A Da_int.c155 const unsigned char *p, size_t plen) in c2i_ibuf() argument
159 if (plen == 0) { in c2i_ibuf()
167 if (plen == 1) { in c2i_ibuf()
187 for (pad = 0, i = 1; i < plen; i++) in c2i_ibuf()
199 plen -= pad; in c2i_ibuf()
202 twos_complement(b, p, plen, neg ? 0xffU : 0); in c2i_ibuf()
204 return plen; in c2i_ibuf()
/openssl/crypto/ec/
H A Decx_backend.c155 const unsigned char *p, int plen, in ossl_ecx_key_op() argument
180 if (p == NULL || id == EVP_PKEY_NONE || plen != KEYLENID(id)) { in ossl_ecx_key_op()
194 memcpy(pubkey, p, plen); in ossl_ecx_key_op()
234 int plen; in ossl_ecx_key_from_pkcs8() local
238 if (!PKCS8_pkey_get0(NULL, &p, &plen, &palg, p8inf)) in ossl_ecx_key_from_pkcs8()
241 oct = d2i_ASN1_OCTET_STRING(NULL, &p, plen); in ossl_ecx_key_from_pkcs8()
244 plen = 0; in ossl_ecx_key_from_pkcs8()
247 plen = ASN1_STRING_length(oct); in ossl_ecx_key_from_pkcs8()
254 ecx = ossl_ecx_key_op(palg, p, plen, EVP_PKEY_NONE, KEY_OP_PRIVATE, in ossl_ecx_key_from_pkcs8()
/openssl/crypto/cms/
H A Dcms_dh.c32 int plen; in dh_cms_set_peerkey() local
46 plen = ASN1_STRING_length(pubkey); in dh_cms_set_peerkey()
48 if (p == NULL || plen == 0) in dh_cms_set_peerkey()
51 if ((public_key = d2i_ASN1_INTEGER(NULL, &p, plen)) == NULL) in dh_cms_set_peerkey()
57 plen = EVP_PKEY_get_size(pk); in dh_cms_set_peerkey()
60 if ((buf = OPENSSL_malloc(plen)) == NULL) in dh_cms_set_peerkey()
62 if (BN_bn2binpad(bnpub, buf, plen) < 0) in dh_cms_set_peerkey()
68 || !EVP_PKEY_set1_encoded_public_key(pkpeer, buf, plen)) in dh_cms_set_peerkey()
89 int keylen, plen; in dh_cms_set_shared_info() local
114 plen = alg->parameter->value.sequence->length; in dh_cms_set_shared_info()
[all …]
H A Dcms_ec.c82 int plen; in ecdh_cms_set_peerkey() local
109 plen = ASN1_STRING_length(pubkey); in ecdh_cms_set_peerkey()
111 if (p == NULL || plen == 0) in ecdh_cms_set_peerkey()
114 if (!EVP_PKEY_set1_encoded_public_key(pkpeer, p, plen)) in ecdh_cms_set_peerkey()
166 int plen, keylen; in ecdh_cms_set_shared_info() local
183 plen = alg->parameter->value.sequence->length; in ecdh_cms_set_shared_info()
184 kekalg = d2i_X509_ALGOR(NULL, &p, plen); in ecdh_cms_set_shared_info()
203 plen = CMS_SharedInfo_encode(&der, kekalg, ukm, keylen); in ecdh_cms_set_shared_info()
205 if (plen <= 0) in ecdh_cms_set_shared_info()
208 if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, der, plen) <= 0) in ecdh_cms_set_shared_info()
/openssl/crypto/rsa/
H A Drsa_oaep.c41 const unsigned char *param, int plen) in RSA_padding_add_PKCS1_OAEP() argument
44 param, plen, NULL, NULL); in RSA_padding_add_PKCS1_OAEP()
58 int plen, const EVP_MD *md, in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() argument
114 if (!EVP_Digest((void *)param, plen, db, NULL, md, NULL)) in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex()
153 const unsigned char *param, int plen, in RSA_padding_add_PKCS1_OAEP_mgf1() argument
157 param, plen, md, mgf1md); in RSA_padding_add_PKCS1_OAEP_mgf1()
162 const unsigned char *param, int plen) in RSA_padding_check_PKCS1_OAEP() argument
165 param, plen, NULL, NULL); in RSA_padding_check_PKCS1_OAEP()
171 int plen, const EVP_MD *md, in RSA_padding_check_PKCS1_OAEP_mgf1() argument
268 if (!EVP_Digest((void *)param, plen, phash, NULL, md, NULL)) in RSA_padding_check_PKCS1_OAEP_mgf1()
/openssl/engines/
H A De_ossltest.c797 size_t plen = key->payload_length; in ossltest_aes128_cbc_hmac_sha1_cipher() local
805 if (plen == NO_PAYLOAD_LENGTH) in ossltest_aes128_cbc_hmac_sha1_cipher()
806 plen = len; in ossltest_aes128_cbc_hmac_sha1_cipher()
808 ((plen + SHA_DIGEST_LENGTH + in ossltest_aes128_cbc_hmac_sha1_cipher()
812 memmove(out, in, plen); in ossltest_aes128_cbc_hmac_sha1_cipher()
816 fill_known_data(out + plen, SHA_DIGEST_LENGTH); in ossltest_aes128_cbc_hmac_sha1_cipher()
819 plen += SHA_DIGEST_LENGTH; in ossltest_aes128_cbc_hmac_sha1_cipher()
820 for (l = len - plen - 1; plen < len; plen++) in ossltest_aes128_cbc_hmac_sha1_cipher()
821 out[plen] = l; in ossltest_aes128_cbc_hmac_sha1_cipher()
846 for (plen = len - pad - 1; plen < len; plen++) in ossltest_aes128_cbc_hmac_sha1_cipher()
[all …]
/openssl/test/
H A Drsa_test.c243 int plen; in test_rsa_simple() local
247 plen = sizeof(ptext_ex) - 1; in test_rsa_simple()
252 num = RSA_public_encrypt(plen, ptext_ex, ctext, key, en_pad_type); in test_rsa_simple()
258 if (!TEST_int_gt(num, 0) || !TEST_mem_eq(ptext, num, ptext_ex, plen)) in test_rsa_simple()
288 int plen; in test_rsa_oaep() local
297 plen = sizeof(ptext_ex) - 1; in test_rsa_oaep()
302 if (num <= 0 || !TEST_mem_eq(ptext, num, ptext_ex, plen)) in test_rsa_oaep()
H A Drsa_mp_test.c257 int plen; in test_rsa_mp() local
265 plen = sizeof(ptext_ex) - 1; in test_rsa_mp()
277 num = RSA_public_encrypt(plen, ptext_ex, ctext, key, in test_rsa_mp()
283 if (!TEST_mem_eq(ptext, num, ptext_ex, plen)) in test_rsa_mp()
/openssl/crypto/bn/
H A Dbn_s390x.c75 size_t size, plen, qlen; in s390x_crt() local
86 plen = BN_num_bytes(p); in s390x_crt()
88 size = (plen > qlen ? plen : qlen); in s390x_crt()
/openssl/providers/implementations/encode_decode/
H A Ddecode_epki2pki.c116 size_t plen = 0; in epki2pki_decode() local
120 if (!pw_cb(pbuf, sizeof(pbuf), &plen, NULL, pw_cbarg)) { in epki2pki_decode()
129 if (!PKCS12_pbe_crypt_ex(alg, pbuf, plen, in epki2pki_decode()
H A Ddecode_pem2der.c82 size_t plen; in pem2der_pass_helper() local
86 || !pass_data->cb(buf, num, &plen, NULL, pass_data->cbarg)) in pem2der_pass_helper()
88 return (int)plen; in pem2der_pass_helper()
/openssl/crypto/pem/
H A Dpem_lib.c242 static int pem_bytes_read_bio_flags(unsigned char **pdata, long *plen, in pem_bytes_read_bio_flags() argument
269 *plen = len; in pem_bytes_read_bio_flags()
285 int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, in PEM_bytes_read_bio() argument
288 return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u, in PEM_bytes_read_bio()
292 int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm, in PEM_bytes_read_bio_secmem() argument
295 return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u, in PEM_bytes_read_bio_secmem()
419 int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, in PEM_do_header() argument
424 long len = *plen; in PEM_do_header()
466 *plen = ilen; in PEM_do_header()
470 *plen += ilen; in PEM_do_header()
/openssl/test/helpers/
H A Dpredefined_dhparams.c49 unsigned char *pdata, size_t plen, in get_dh_from_pg() argument
56 p = BN_bin2bn(pdata, plen, NULL); in get_dh_from_pg()
/openssl/doc/man3/
H A DPEM_bytes_read_bio.pod11 int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
14 int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm,
39 I<*pdata> with length I<*plen>. The caller must free the storage pointed

Completed in 148 milliseconds

12