Home
last modified time | relevance | path

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

12

/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_poly1305_hw.c145 ctx->len.text = plen; in chacha20_poly1305_tls_cipher()
147 if (plen) { in chacha20_poly1305_tls_cipher()
153 in += plen; in chacha20_poly1305_tls_cipher()
154 out += plen; in chacha20_poly1305_tls_cipher()
170 ctx->len.text = plen; in chacha20_poly1305_tls_cipher()
214 in += plen; in chacha20_poly1305_tls_cipher()
215 out += plen; in chacha20_poly1305_tls_cipher()
320 plen = inl; in chacha20_poly1305_aead_cipher()
327 in += plen; in chacha20_poly1305_aead_cipher()
333 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 …]
H A Dciphercommon_gcm.c512 size_t plen = 0; in gcm_tls_cipher() local
558 plen = len + EVP_GCM_TLS_EXPLICIT_IV_LEN + EVP_GCM_TLS_TAG_LEN; in gcm_tls_cipher()
560 plen = len; in gcm_tls_cipher()
566 *padlen = plen; in gcm_tls_cipher()
/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,
105 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument
131 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix()
136 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_prefix_free() argument
153 *plen = 0; in ndef_prefix_free()
157 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_suffix_free() argument
161 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()
974 long plen; in asn1_find_end() local
1042 long plen; in asn1_collect() local
1083 } else if (plen && !collect_data(buf, &p, plen)) in asn1_collect()
1106 *p += plen; in collect_data()
1140 long plen; in asn1_check_tlen() local
1151 plen = ctx->plen; in asn1_check_tlen()
1159 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.c156 const unsigned char *p, int plen, in ossl_ecx_key_op() argument
181 if (p == NULL || id == EVP_PKEY_NONE || plen != KEYLENID(id)) { in ossl_ecx_key_op()
195 memcpy(pubkey, p, plen); in ossl_ecx_key_op()
235 int plen; in ossl_ecx_key_from_pkcs8() local
239 if (!PKCS8_pkey_get0(NULL, &p, &plen, &palg, p8inf)) in ossl_ecx_key_from_pkcs8()
242 oct = d2i_ASN1_OCTET_STRING(NULL, &p, plen); in ossl_ecx_key_from_pkcs8()
245 plen = 0; in ossl_ecx_key_from_pkcs8()
248 plen = ASN1_STRING_length(oct); in ossl_ecx_key_from_pkcs8()
255 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.c81 int plen; in ecdh_cms_set_peerkey() local
108 plen = ASN1_STRING_length(pubkey); in ecdh_cms_set_peerkey()
110 if (p == NULL || plen == 0) in ecdh_cms_set_peerkey()
113 if (!EVP_PKEY_set1_encoded_public_key(pkpeer, p, plen)) in ecdh_cms_set_peerkey()
165 int plen, keylen; in ecdh_cms_set_shared_info() local
182 plen = alg->parameter->value.sequence->length; in ecdh_cms_set_shared_info()
183 kekalg = d2i_X509_ALGOR(NULL, &p, plen); in ecdh_cms_set_shared_info()
202 plen = CMS_SharedInfo_encode(&der, kekalg, ukm, keylen); in ecdh_cms_set_shared_info()
204 if (plen <= 0) in ecdh_cms_set_shared_info()
207 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
102 if (!EVP_Digest((void *)param, plen, db, NULL, md, NULL)) in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex()
143 const unsigned char *param, int plen, in RSA_padding_add_PKCS1_OAEP_mgf1() argument
147 param, plen, md, mgf1md); in RSA_padding_add_PKCS1_OAEP_mgf1()
152 const unsigned char *param, int plen) in RSA_padding_check_PKCS1_OAEP() argument
155 param, plen, NULL, NULL); in RSA_padding_check_PKCS1_OAEP()
161 int plen, const EVP_MD *md, in RSA_padding_check_PKCS1_OAEP_mgf1() argument
250 if (!EVP_Digest((void *)param, plen, phash, NULL, md, NULL)) in RSA_padding_check_PKCS1_OAEP_mgf1()
/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/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/providers/implementations/encode_decode/
H A Ddecode_epki2pki.c91 size_t plen = 0; in epki2pki_decode() local
95 if (!pw_cb(pbuf, sizeof(pbuf), &plen, NULL, pw_cbarg)) { in epki2pki_decode()
104 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.c235 static int pem_bytes_read_bio_flags(unsigned char **pdata, long *plen, in pem_bytes_read_bio_flags() argument
262 *plen = len; in pem_bytes_read_bio_flags()
278 int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, in PEM_bytes_read_bio() argument
281 return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u, in PEM_bytes_read_bio()
285 int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm, in PEM_bytes_read_bio_secmem() argument
288 return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u, in PEM_bytes_read_bio_secmem()
414 int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, in PEM_do_header() argument
419 long len = *plen; in PEM_do_header()
461 *plen = ilen; in PEM_do_header()
465 *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 93 milliseconds

12