Home
last modified time | relevance | path

Searched refs:out_len (Results 1 – 25 of 84) sorted by relevance

1234

/openbsd-src/regress/lib/libcrypto/bf/
H A Dbf_test.c33 const int out_len; member
55 .out_len = 8,
70 .out_len = 8,
85 .out_len = 8,
100 .out_len = 8,
115 .out_len = 8,
130 .out_len = 8,
145 .out_len = 8,
160 .out_len = 8,
175 .out_len = 8,
[all …]
/openbsd-src/regress/lib/libcrypto/rc2/
H A Drc2_test.c34 const int out_len; member
54 .out_len = 8,
70 .out_len = 8,
86 .out_len = 8,
102 .out_len = 8,
118 .out_len = 8,
135 .out_len = 8,
152 .out_len = 8,
172 .out_len = 8,
191 .out_len = 8,
[all …]
/openbsd-src/regress/lib/libcrypto/aes/
H A Daes_test.c32 const int out_len; member
53 .out_len = 16,
71 .out_len = 16,
90 .out_len = 16,
114 .out_len = 16,
140 .out_len = 32,
170 .out_len = 48,
204 .out_len = 64,
240 .out_len = 64,
275 .out_len = 64,
[all …]
/openbsd-src/lib/libcrypto/ecdh/
H A Decdh.c146 ecdh_compute_key(unsigned char **out, size_t *out_len, const EC_POINT *pub_key, in ecdh_compute_key() argument
159 *out_len = 0; in ecdh_compute_key()
209 *out_len = buf_len; in ecdh_compute_key()
225 ECDH_compute_key(void *out, size_t out_len, const EC_POINT *pub_key, in ECDH_compute_key() argument
227 void *(*KDF)(const void *in, size_t inlen, void *out, size_t *out_len)) in ECDH_compute_key() argument
238 if (out_len > INT_MAX) { in ECDH_compute_key()
246 memset(out, 0, out_len); in ECDH_compute_key()
248 if (KDF(secret, secret_len, out, &out_len) == NULL) { in ECDH_compute_key()
253 if (out_len < secret_len) { in ECDH_compute_key()
258 out_len = secret_len; in ECDH_compute_key()
[all …]
/openbsd-src/sys/arch/armv7/exynos/
H A Dcrosec.c104 const uint8_t *out, int out_len, uint8_t **in, int in_len) in cros_ec_i2c_command() argument
114 out_bytes = out_len + 1; in cros_ec_i2c_command()
121 *ptr++ = out_len; in cros_ec_i2c_command()
122 out_bytes = out_len + 4; in cros_ec_i2c_command()
126 memcpy(ptr, out, out_len); in cros_ec_i2c_command()
127 ptr += out_len; in cros_ec_i2c_command()
131 cros_ec_calc_checksum(sc->out, out_len + 3); in cros_ec_i2c_command()
180 const void *out, int out_len, uint8_t **in, int in_len) in cros_ec_send_command() argument
183 (const uint8_t *)out, out_len, in, in_len); in cros_ec_send_command()
188 int cmd_version, const void *out, int out_len, in cros_ec_command() argument
[all …]
/openbsd-src/regress/lib/libcrypto/aead/
H A Daeadtest.c128 size_t out_len, out_len2; in run_aead_test() local
143 if (!EVP_AEAD_CTX_seal(ctx, out, &out_len, sizeof(out), bufs[NONCE], in run_aead_test()
149 if (out_len != lengths[CT] + lengths[TAG]) { in run_aead_test()
151 line_no, out_len, (unsigned)(lengths[CT] + lengths[TAG])); in run_aead_test()
166 lengths[NONCE], out, out_len, bufs[AD], lengths[AD])) { in run_aead_test()
184 lengths[NONCE], out, out_len, bufs[AD], lengths[AD])) { in run_aead_test()
204 size_t out_len; in run_cipher_aead_encrypt_test() local
253 out_len = len; in run_cipher_aead_encrypt_test()
254 if (!EVP_EncryptFinal_ex(ctx, out + out_len, &len)) { in run_cipher_aead_encrypt_test()
258 out_len += len; in run_cipher_aead_encrypt_test()
[all …]
/openbsd-src/lib/libcrypto/evp/
H A Devp_cipher.c249 EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, in EVP_CipherUpdate() argument
253 return EVP_EncryptUpdate(ctx, out, out_len, in, in_len); in EVP_CipherUpdate()
255 return EVP_DecryptUpdate(ctx, out, out_len, in, in_len); in EVP_CipherUpdate()
260 EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) in EVP_CipherFinal() argument
263 return EVP_EncryptFinal_ex(ctx, out, out_len); in EVP_CipherFinal()
265 return EVP_DecryptFinal_ex(ctx, out, out_len); in EVP_CipherFinal()
270 EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) in EVP_CipherFinal_ex() argument
273 return EVP_EncryptFinal_ex(ctx, out, out_len); in EVP_CipherFinal_ex()
275 return EVP_DecryptFinal_ex(ctx, out, out_len); in EVP_CipherFinal_ex()
316 evp_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, in evp_cipher() argument
[all …]
H A Devp_aead.c114 EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len, in EVP_AEAD_CTX_seal() argument
132 if (ctx->aead->seal(ctx, out, out_len, max_out_len, nonce, nonce_len, in EVP_AEAD_CTX_seal()
141 *out_len = 0; in EVP_AEAD_CTX_seal()
147 EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len, in EVP_AEAD_CTX_open() argument
157 if (ctx->aead->open(ctx, out, out_len, max_out_len, nonce, nonce_len, in EVP_AEAD_CTX_open()
167 *out_len = 0; in EVP_AEAD_CTX_open()
H A De_chacha20poly1305.c127 size_t *out_len, size_t max_out_len, const unsigned char *nonce, in aead_chacha20_poly1305_seal() argument
166 *out_len = in_len + c20_ctx->tag_len; in aead_chacha20_poly1305_seal()
171 *out_len = in_len + POLY1305_TAG_LEN; in aead_chacha20_poly1305_seal()
177 size_t *out_len, size_t max_out_len, const unsigned char *nonce, in aead_chacha20_poly1305_open() argument
228 *out_len = plaintext_len; in aead_chacha20_poly1305_open()
234 size_t *out_len, size_t max_out_len, const unsigned char *nonce, in aead_xchacha20_poly1305_seal() argument
271 *out_len = in_len + c20_ctx->tag_len; in aead_xchacha20_poly1305_seal()
276 *out_len = in_len + POLY1305_TAG_LEN; in aead_xchacha20_poly1305_seal()
282 size_t *out_len, size_t max_out_len, const unsigned char *nonce, in aead_xchacha20_poly1305_open() argument
330 *out_len in aead_xchacha20_poly1305_open()
[all...]
/openbsd-src/lib/libcrypto/bio/
H A Dbss_mem.c93 static int mem_read(BIO *bio, char *out, int out_len);
95 static int mem_gets(BIO *bio, char *out, int out_len);
197 mem_read(BIO *bio, char *out, int out_len) in mem_read() argument
203 if (out == NULL || out_len <= 0) in mem_read()
206 if ((size_t)out_len > bio_mem_pending(bm)) in mem_read()
207 out_len = bio_mem_pending(bm); in mem_read()
209 if (out_len == 0) { in mem_read()
215 memcpy(out, bio_mem_read_ptr(bm), out_len); in mem_read()
216 bm->read_offset += out_len; in mem_read()
218 return out_len; in mem_read()
[all …]
/openbsd-src/regress/lib/libcrypto/gcm128/
H A Dgcm128test.c862 size_t out_len; in do_gcm128_test() local
865 out_len = tv->P_len; in do_gcm128_test()
866 if (out_len != 0) { in do_gcm128_test()
867 out = malloc(out_len); in do_gcm128_test()
874 if (out_len != 0) in do_gcm128_test()
875 memset(out, 0, out_len); in do_gcm128_test()
881 CRYPTO_gcm128_encrypt(&ctx, tv->P, out, out_len); in do_gcm128_test()
887 if (tv->C_len > 0 && memcmp(out, tv->C, out_len)) { in do_gcm128_test()
892 if (out_len != 0) in do_gcm128_test()
893 memset(out, 0, out_len); in do_gcm128_test()
[all …]
/openbsd-src/lib/libcrypto/kdf/
H A Dtls1_prf.c181 const unsigned char *seed, size_t seed_len, unsigned char *out, size_t out_len) in tls1_prf_P_hash() argument
221 if (out_len > (size_t)chunk && !EVP_MD_CTX_copy_ex(ctx_tmp, ctx)) in tls1_prf_P_hash()
226 if (out_len > (size_t)chunk) { in tls1_prf_P_hash()
231 out_len -= mac_len; in tls1_prf_P_hash()
237 memcpy(out, A1, out_len); in tls1_prf_P_hash()
256 const unsigned char *seed, size_t seed_len, unsigned char *out, size_t out_len) in tls1_prf_alg() argument
265 out, out_len); in tls1_prf_alg()
269 out, out_len)) in tls1_prf_alg()
272 if ((tmp = calloc(1, out_len)) == NULL) { in tls1_prf_alg()
278 tmp, out_len)) in tls1_prf_alg()
[all …]
/openbsd-src/regress/lib/libcrypto/rc4/
H A Drc4_test.c326 int in_len, out_len, total_len; in rc4_test() local
384 if (!EVP_EncryptUpdate(ctx, out + total_len, &out_len, in rc4_test()
392 total_len += out_len; in rc4_test()
395 if (!EVP_EncryptFinal_ex(ctx, out + total_len, &out_len)) { in rc4_test()
399 total_len += out_len; in rc4_test()
430 if (!EVP_DecryptUpdate(ctx, out + total_len, &out_len, in rc4_test()
438 total_len += out_len; in rc4_test()
441 if (!EVP_DecryptFinal_ex(ctx, out + total_len, &out_len)) { in rc4_test()
445 total_len += out_len; in rc4_test()
/openbsd-src/lib/libcrypto/hkdf/
H A Dhkdf.c31 HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest, in HKDF() argument
41 if (!HKDF_expand(out_key, out_len, digest, prk, prk_len, info, in HKDF()
51 HKDF_extract(uint8_t *out_key, size_t *out_len, in HKDF_extract() argument
66 *out_len = len; in HKDF_extract()
73 HKDF_expand(uint8_t *out_key, size_t out_len, in HKDF_expand() argument
85 if (!CBB_init_fixed(&cbb, out_key, out_len)) in HKDF_expand()
93 remaining = out_len; in HKDF_expand()
H A Dhkdf.h36 int HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest,
46 int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest,
56 int HKDF_expand(uint8_t *out_key, size_t out_len,
/openbsd-src/regress/lib/libcrypto/base64/
H A Dbase64test.c32 const ssize_t out_len; member
319 for (i = 0; i < bt->out_len; i++) { in base64_encoding_test()
321 (test_nl && (i % 64 != 0 || i == bt->out_len - 1))) && in base64_encoding_test()
349 for (i = 0; i < bt->out_len; i++) in base64_encoding_test()
377 memcpy(input, bt->out, bt->out_len); in base64_decoding_test()
378 inlen = bt->out_len; in base64_decoding_test()
380 memcpy(&input[bt->out_len], "\r\n", 2); in base64_decoding_test()
455 if (bt->out_len != -1) in main()
459 if (bt->out_len != -1) in main()
470 if (bt->out_len != -1) in main()
[all …]
/openbsd-src/lib/libssl/
H A Dtls12_lib.c23 size_t *out_len) in tls12_finished_verify_data() argument
28 *out_len = 0; in tls12_finished_verify_data()
46 *out_len = TLS1_FINISH_MAC_LENGTH; in tls12_finished_verify_data()
53 size_t verify_data_len, size_t *out_len) in tls12_client_finished_verify_data() argument
57 out_len); in tls12_client_finished_verify_data()
62 size_t verify_data_len, size_t *out_len) in tls12_server_finished_verify_data() argument
66 out_len); in tls12_server_finished_verify_data()
H A Dt1_enc.c163 const void *seed5, size_t seed5_len, unsigned char *out, size_t out_len) in tls1_P_hash() argument
215 if (hmac_len > out_len) in tls1_P_hash()
216 hmac_len = out_len; in tls1_P_hash()
222 out_len -= hmac_len; in tls1_P_hash()
224 if (out_len == 0) in tls1_P_hash()
250 const void *seed5, size_t seed5_len, unsigned char *out, size_t out_len) in tls1_PRF() argument
255 memset(out, 0, out_len); in tls1_PRF()
268 seed5, seed5_len, out, out_len)) in tls1_PRF()
274 seed5, seed5_len, out, out_len)) in tls1_PRF()
282 seed5, seed5_len, out, out_len)) in tls1_PRF()
[all...]
/openbsd-src/regress/lib/libcrypto/md/
H A Dmd_test.c179 md_hash_func *out_func, const EVP_MD **out_md, size_t *out_len) in md_hash_from_algorithm() argument
186 *out_len = MD4_DIGEST_LENGTH; in md_hash_from_algorithm()
192 *out_len = MD5_DIGEST_LENGTH; in md_hash_from_algorithm()
222 size_t in_len, out_len; in md_test()
235 &md, &out_len)) in md_test()
241 if (memcmp(st->out, out, out_len) != 0) { in md_test()
254 if (memcmp(st->out, out, out_len) != 0) { in md_test()
291 if (memcmp(st->out, out, out_len) != 0) { in md_test()
310 unsigned int out_len;
324 out_len
211 size_t in_len, out_len; md_test() local
[all...]
/openbsd-src/regress/lib/libcrypto/sha/
H A Dsha_test.c681 sha_hash_func *out_func, const EVP_MD **out_md, size_t *out_len) in sha_hash_from_algorithm() argument
755 if (out_len != NULL) in sha_hash_from_algorithm()
756 *out_len = len; in sha_hash_from_algorithm()
769 size_t in_len, out_len; in sha_test() local
782 &md, &out_len)) in sha_test()
789 if (memcmp(st->out, out, out_len) != 0) { in sha_test()
804 if (memcmp(st->out, out, out_len) != 0) { in sha_test()
843 if (memcmp(st->out, out, out_len) != 0) { in sha_test()
865 size_t out_len, part_len; in sha_repetition_test() local
878 &out_len)) in sha_repetition_test()
[all …]
/openbsd-src/regress/lib/libcrypto/hkdf/
H A Dhkdf_test.c36 const size_t out_len; member
270 if (!HKDF_expand(buf, test->out_len, test->md_func(), prk, prk_len, in main()
276 if (memcmp(buf, test->out, test->out_len) != 0) { in main()
283 if (!HKDF(buf, test->out_len, test->md_func(), test->ikm, in main()
290 if (memcmp(buf, test->out, test->out_len) != 0) { in main()
/openbsd-src/gnu/usr.bin/perl/ext/XS-APItest/t/
H A Dgrok.t239 my ($ok, $out_uv, $out_len);
242 ($ok, $out_uv, $out_len) = grok_atoUV($input, $endsv);
253 is($out_len, $grok->[3], "'$input' $endsv - length sanity 2");
255 if ($out_len) {
256 is($endsv, substr($input, $out_len),
265 ($ok, $out_uv, $out_len) = grok_atoUV($input, undef);
/openbsd-src/lib/libcrypto/bn/
H A Dbn_convert.c80 bn_bn2binpad_internal(const BIGNUM *bn, uint8_t *out, int out_len,
90 if (out_len == -1) in bn2binpad()
91 out_len = n; in bn2binpad()
92 if (out_len < n) in bn2binpad()
96 explicit_bzero(out, out_len); in bn2binpad()
97 return out_len; in bn2binpad()
104 for (i = out_len - 1; i >= 0; i--) { in bn2binpad()
115 for (i = 0, j = out_len - 1; i < out_len / 2; i++, j--) { in bn2binpad()
122 return out_len; in bn2binpad()
493 bn_bn2hex_internal(const BIGNUM * bn,int include_sign,int nibbles_only,char ** out,size_t * out_len) bn_bn2hex_internal() argument
559 bn_bn2hex_nosign(const BIGNUM * bn,char ** out,size_t * out_len) bn_bn2hex_nosign() argument
565 bn_bn2hex_nibbles(const BIGNUM * bn,char ** out,size_t * out_len) bn_bn2hex_nibbles() argument
696 size_t out_len, out_bin_len; BN_bn2mpi() local
[all...]
/openbsd-src/gnu/llvm/llvm/lib/Support/BLAKE3/
H A Dblake3.c97 size_t out_len) { in output_root_bytes() argument
101 while (out_len > 0) { in output_root_bytes()
106 if (out_len > available_bytes) { in output_root_bytes()
109 memcpy_len = out_len; in output_root_bytes()
113 out_len -= memcpy_len; in output_root_bytes()
572 size_t out_len) { in llvm_blake3_hasher_finalize() argument
573 llvm_blake3_hasher_finalize_seek(self, 0, out, out_len); in llvm_blake3_hasher_finalize()
576 __msan_unpoison(out, out_len); in llvm_blake3_hasher_finalize()
581 uint8_t *out, size_t out_len) { in llvm_blake3_hasher_finalize_seek() argument
586 if (out_len == 0) { in llvm_blake3_hasher_finalize_seek()
[all …]
/openbsd-src/regress/lib/libcrypto/ecdh/
H A Decc_cdh.c2173 int out_len;
2230 out_len = ECDH_size(key);
2231 if ((out = calloc(1, out_len)) == NULL)
2234 if (ECDH_compute_key(out, out_len, peer_pub, key, NULL) != out_len)
2240 if ((want = calloc(1, out_len)) == NULL)
2243 if (BN_bn2binpad(shared, want, out_len) != out_len)
2246 if (memcmp(out, want, out_len) != 0) {
2249 hexdump(want, out_len);
2399 int out_len; run_ecc_cdh_test() local
[all...]

1234