Home
last modified time | relevance | path

Searched refs:outlen (Results 1 – 25 of 152) sorted by relevance

1234567

/openssl/demos/cipher/
H A Daeskeywrap.c61 int outlen, tmplen; in aes_wrap_encrypt() local
90 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_encrypt()
92 outlen += tmplen; in aes_wrap_encrypt()
95 printf("Ciphertext (outlen:%d):\n", outlen); in aes_wrap_encrypt()
96 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_encrypt()
98 if (sizeof(wrap_ct) == outlen && !CRYPTO_memcmp(outbuf, wrap_ct, outlen)) in aes_wrap_encrypt()
119 int outlen, tmplen; in aes_wrap_decrypt() local
149 outlen += tmplen; in aes_wrap_decrypt()
152 printf("Plaintext (outlen:%d):\n", outlen); in aes_wrap_decrypt()
153 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_decrypt()
[all …]
H A Dariacbc.c60 int outlen, tmplen; in aria_cbc_encrypt() local
87 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_encrypt()
89 outlen += tmplen; in aria_cbc_encrypt()
92 printf("Ciphertext (outlen:%d):\n", outlen); in aria_cbc_encrypt()
93 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_encrypt()
95 if (sizeof(cbc_ct) == outlen && !CRYPTO_memcmp(outbuf, cbc_ct, outlen)) in aria_cbc_encrypt()
116 int outlen, tmplen; in aria_cbc_decrypt() local
144 outlen += tmplen; in aria_cbc_decrypt()
147 printf("Plaintext (outlen:%d):\n", outlen); in aria_cbc_decrypt()
148 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_decrypt()
[all …]
H A Daesgcm.c75 int outlen, tmplen; in aes_gcm_encrypt() local
110 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, gcm_aad, sizeof(gcm_aad))) in aes_gcm_encrypt()
114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt()
119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt()
152 int outlen, rv; in aes_gcm_decrypt() local
182 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad, sizeof(gcm_aad))) in aes_gcm_decrypt()
186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt()
191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt()
201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
H A Daesccm.c76 int outlen, tmplen; in aes_ccm_encrypt() local
116 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_pt))) in aes_ccm_encrypt()
120 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_encrypt()
124 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt))) in aes_ccm_encrypt()
129 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt()
163 int outlen, rv; in aes_ccm_decrypt() local
200 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_ct))) in aes_ccm_decrypt()
204 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_decrypt()
208 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt()
213 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()
/openssl/crypto/asn1/
H A Da_strex.c150 outlen = 0; in do_buf()
230 return outlen; in do_buf()
291 if (outlen < 0) in do_dump()
332 int outlen, len; in do_print_ex() local
342 outlen = 0; in do_print_ex()
352 outlen++; in do_print_ex()
396 outlen += len; in do_print_ex()
398 outlen += 2; in do_print_ex()
407 return outlen; in do_print_ex()
434 int outlen, len; in do_name_ex() local
[all …]
H A Da_mbstr.c49 int outform, outlen = 0; in ASN1_mbstring_ncopy() local
169 outlen = nchar; in ASN1_mbstring_ncopy()
174 outlen = nchar << 1; in ASN1_mbstring_ncopy()
179 outlen = nchar << 2; in ASN1_mbstring_ncopy()
184 outlen = 0; in ASN1_mbstring_ncopy()
189 if ((p = OPENSSL_malloc(outlen + 1)) == NULL) { in ASN1_mbstring_ncopy()
196 dest->length = outlen; in ASN1_mbstring_ncopy()
198 p[outlen] = 0; in ASN1_mbstring_ncopy()
263 int *outlen, len; in out_utf8() local
268 outlen = arg; in out_utf8()
[all …]
/openssl/providers/implementations/digests/
H A Dsha3_prov.c123 if (outlen > 0) in keccak_final()
140 if (outlen > 0) in shake_squeeze()
143 *outl = outlen; in shake_squeeze()
271 if (outlen < len) in s390x_shake_squeeze()
272 len = outlen; in s390x_shake_squeeze()
275 outlen -= len; in s390x_shake_squeeze()
280 if (outlen == 0) in s390x_shake_squeeze()
305 if (outlen == 0) in s390x_keccakc_final()
360 if (outlen < len) in s390x_keccakc_squeeze()
364 outlen -= len; in s390x_keccakc_squeeze()
[all …]
/openssl/providers/implementations/kem/
H A Drsa_kem.c267 && (BN_bn2binpad(z, out, outlen) == outlen)); in rsasve_gen_rand_bytes()
292 if (outlen == NULL && secretlen == NULL) in rsasve_generate()
294 if (outlen != NULL) in rsasve_generate()
295 *outlen = nlen; in rsasve_generate()
306 if (outlen != NULL && *outlen < nlen) { in rsasve_generate()
322 if (outlen != NULL) in rsasve_generate()
323 *outlen = nlen; in rsasve_generate()
368 *outlen = nlen; in rsasve_recover()
386 if (outlen != NULL && *outlen < nlen) { in rsasve_recover()
393 if (ret > 0 && outlen != NULL) in rsasve_recover()
[all …]
H A Dtemplate_kem.c133 static int template_encapsulate(void *vctx, unsigned char *out, size_t *outlen, in template_encapsulate() argument
140 if (outlen != NULL) in template_encapsulate()
141 *outlen = 0; /* replace with real encapsulated data length */ in template_encapsulate()
146 debug_print("encaps outlens set to %d and %d\n", *outlen, *secretlen); in template_encapsulate()
156 static int template_decapsulate(void *vctx, unsigned char *out, size_t *outlen, in template_decapsulate() argument
163 if (outlen != NULL) in template_decapsulate()
164 *outlen = 0; /* replace with shared secret length */ in template_decapsulate()
167 debug_print("decaps outlen set to %d \n", *outlen); in template_decapsulate()
/openssl/crypto/sha/
H A Dsha3.c108 if (outlen == 0) in ossl_sha3_final()
147 if (outlen == 0) in ossl_sha3_squeeze()
178 if (outlen > ctx->bufsz) in ossl_sha3_squeeze()
181 len = outlen; in ossl_sha3_squeeze()
184 outlen -= len; in ossl_sha3_squeeze()
187 if (outlen == 0) in ossl_sha3_squeeze()
191 if (outlen >= bsz) { in ossl_sha3_squeeze()
192 len = bsz * (outlen / bsz); in ossl_sha3_squeeze()
196 outlen -= len; in ossl_sha3_squeeze()
198 if (outlen > 0) { in ossl_sha3_squeeze()
[all …]
/openssl/crypto/pkcs12/
H A Dp12_decr.c26 int outlen, i; in PKCS12_pbe_crypt_ex() local
88 outlen = i; in PKCS12_pbe_crypt_ex()
97 outlen += i; in PKCS12_pbe_crypt_ex()
102 (int)mac_len, out+outlen) < 0) { in PKCS12_pbe_crypt_ex()
108 outlen += mac_len; in PKCS12_pbe_crypt_ex()
112 *datalen = outlen; in PKCS12_pbe_crypt_ex()
144 int outlen = 0; in PKCS12_item_decrypt_d2i_ex() local
147 &out, &outlen, 0, libctx, propq)) in PKCS12_item_decrypt_d2i_ex()
152 BIO_dump(trc_out, out, outlen); in PKCS12_item_decrypt_d2i_ex()
155 ret = ASN1_item_d2i(NULL, &p, outlen, it); in PKCS12_item_decrypt_d2i_ex()
[all …]
/openssl/crypto/ct/
H A Dct_b64.c27 int outlen, i; in ct_base64_decode() local
35 outlen = (inlen / 4) * 3; in ct_base64_decode()
36 outbuf = OPENSSL_malloc(outlen); in ct_base64_decode()
40 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode()
41 if (outlen < 0) { in ct_base64_decode()
49 --outlen; in ct_base64_decode()
55 return outlen; in ct_base64_decode()
/openssl/test/
H A Dpkey_meth_kdf_test.c24 size_t outlen = sizeof(out); in test_kdf_tls1_prf() local
61 if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { in test_kdf_tls1_prf()
86 size_t outlen = sizeof(out); in test_kdf_hkdf() local
128 if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { in test_kdf_hkdf()
153 size_t outlen = sizeof(out); in test_kdf_scrypt() local
187 if (EVP_PKEY_derive(pctx, out, &outlen) > 0) { in test_kdf_scrypt()
195 if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { in test_kdf_scrypt()
H A Dpbetest.c65 int i, outlen; in test_pkcs5_pbe() local
83 outlen = i; in test_pkcs5_pbe()
87 outlen += i; in test_pkcs5_pbe()
89 if (!TEST_mem_eq(out, outlen, exp, exp_len)) in test_pkcs5_pbe()
99 outlen = i; in test_pkcs5_pbe()
103 if (!TEST_mem_eq(out, outlen, pbe_plaintext, sizeof(pbe_plaintext))) in test_pkcs5_pbe()
H A Daesgcmtest.c43 int outlen; in do_encrypt() local
52 && TEST_true(EVP_EncryptUpdate(ctx, NULL, &outlen, gcm_aad, in do_encrypt()
56 && TEST_true(EVP_EncryptFinal_ex(ctx, outbuf, &outlen) > 0) in do_encrypt()
71 int outlen, ptlen; in do_decrypt() local
80 && TEST_true(EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad, in do_decrypt()
86 && TEST_true(EVP_DecryptFinal_ex(ctx, outbuf, &outlen) > 0) in do_decrypt()
H A Drecordlentest.c46 size_t outlen; in write_record() local
49 outlen = sizeof(buf); in write_record()
51 outlen = len; in write_record()
53 if (!BIO_write_ex(b, buf, outlen, &written) in write_record()
54 || written != outlen) in write_record()
57 len -= outlen; in write_record()
/openssl/test/testutil/
H A Dfake_random.c70 static int fake_rand_generate(void *vrng, unsigned char *out, size_t outlen, in fake_rand_generate() argument
79 return (*frng->cb)(out, outlen, frng->name, frng->ctx); in fake_rand_generate()
80 while (outlen > 0) { in fake_rand_generate()
82 l = outlen < sizeof(r) ? outlen : sizeof(r); in fake_rand_generate()
86 outlen -= l; in fake_rand_generate()
215 int (*cb)(unsigned char *out, size_t outlen, in fake_rand_set_callback() argument
224 size_t outlen, in fake_rand_set_public_private_callbacks() argument
/openssl/providers/implementations/rands/
H A Ddrbg_ctr.c105 int i, outlen = AES_BLOCK_SIZE; in ctr_BCC_block() local
111 || outlen != len) in ctr_BCC_block()
206 int outlen = AES_BLOCK_SIZE; in ctr_df() local
241 || outlen != AES_BLOCK_SIZE) in ctr_df()
267 int outlen = AES_BLOCK_SIZE; in ctr_update() local
283 || outlen != len) in ctr_update()
412 if (outlen == 0) { in drbg_ctr_generate()
420 memset(out, 0, outlen); in drbg_ctr_generate()
434 buflen = outlen > (1U << 30) ? (1U << 30) : outlen; in drbg_ctr_generate()
454 outlen -= buflen; in drbg_ctr_generate()
[all …]
H A Ddrbg_hash.c81 size_t outlen = drbg->seedlen; in hash_df() local
82 size_t num_bits_returned = outlen * 8; in hash_df()
112 if (outlen < hash->blocklen) { in hash_df()
115 memcpy(out, vtmp, outlen); in hash_df()
122 outlen -= hash->blocklen; in hash_df()
123 if (outlen == 0) in hash_df()
214 if (outlen == 0) in hash_gen()
223 if (outlen < hash->blocklen) { in hash_gen()
231 outlen -= hash->blocklen; in hash_gen()
232 if (outlen == 0) in hash_gen()
[all …]
/openssl/crypto/ec/
H A Decdh_kdf.c24 int ossl_ecdh_kdf_X9_63(unsigned char *out, size_t outlen, in ossl_ecdh_kdf_X9_63() argument
45 ret = EVP_KDF_derive(kctx, out, outlen, params) > 0; in ossl_ecdh_kdf_X9_63()
57 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, in ECDH_KDF_X9_62() argument
62 return ossl_ecdh_kdf_X9_63(out, outlen, Z, Zlen, sinfo, sinfolen, md, NULL, in ECDH_KDF_X9_62()
/openssl/doc/man3/
H A DEVP_PKEY_encrypt.pod15 unsigned char *out, size_t *outlen,
30 buffer is written to the B<outlen> parameter. If B<out> is not B<NULL> then
31 before the call the B<outlen> parameter should contain the length of the
33 B<out> and the amount of data written to B<outlen>.
65 size_t outlen, inlen;
81 if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0)
84 out = OPENSSL_malloc(outlen);
89 if (EVP_PKEY_encrypt(ctx, out, &outlen, in, inlen) <= 0)
92 /* Encrypted data is outlen bytes written to buffer out */
H A DEVP_PKEY_decrypt.pod15 unsigned char *out, size_t *outlen,
30 the output buffer is written to the I<*outlen> parameter.
32 If I<out> is not NULL then before the call the I<*outlen> parameter must
35 written to I<*outlen>, otherwise an error is returned.
57 both the return value from the EVP_PKEY_decrypt() and the B<outlen> provided
85 size_t outlen, inlen;
101 if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0)
104 out = OPENSSL_malloc(outlen);
109 if (EVP_PKEY_decrypt(ctx, out, &outlen, in, inlen) <= 0)
112 /* Decrypted data is outlen bytes written to buffer out */
/openssl/include/internal/
H A Dsha3.h26 typedef int (sha3_final_fn)(void *vctx, unsigned char *out, size_t outlen);
27 typedef int (sha3_squeeze_fn)(void *vctx, unsigned char *out, size_t outlen);
56 int ossl_sha3_final(KECCAK1600_CTX *ctx, unsigned char *out, size_t outlen);
57 int ossl_sha3_squeeze(KECCAK1600_CTX *ctx, unsigned char *out, size_t outlen);
/openssl/crypto/pem/
H A Dpvkfmt.c585 outlen = 16 in do_i2b()
618 return outlen; in do_i2b()
624 int outlen, wrlen; in do_i2b_bio() local
627 if (outlen < 0) in do_i2b_bio()
632 return outlen; in do_i2b_bio()
1029 outlen += pklen; in i2b_PVK()
1031 return outlen; in i2b_PVK()
1100 ret = outlen; in i2b_PVK()
1117 int outlen, wrlen; in i2b_PVK_bio_ex() local
1120 if (outlen < 0) in i2b_PVK_bio_ex()
[all …]
/openssl/crypto/dh/
H A Ddh_kdf.c27 int ossl_dh_kdf_X9_42_asn1(unsigned char *out, size_t outlen, in ossl_dh_kdf_X9_42_asn1() argument
57 ret = EVP_KDF_derive(kctx, out, outlen, params) > 0; in ossl_dh_kdf_X9_42_asn1()
65 int DH_KDF_X9_42(unsigned char *out, size_t outlen, in DH_KDF_X9_42() argument
77 return ossl_dh_kdf_X9_42_asn1(out, outlen, Z, Zlen, key_alg, in DH_KDF_X9_42()

Completed in 32 milliseconds

1234567