Home
last modified time | relevance | path

Searched refs:inlen (Results 1 – 25 of 88) sorted by relevance

1234

/openssl/crypto/modes/
H A Dwrap128.c55 if ((inlen & 0x7) || (inlen < 16) || (inlen > CRYPTO128_WRAP_MAX)) in CRYPTO_128_wrap()
80 return inlen + 8; in CRYPTO_128_wrap()
106 inlen -= 8; in crypto_128_unwrap_raw()
107 if ((inlen & 0x7) || (inlen < 16) || (inlen > CRYPTO128_WRAP_MAX)) in crypto_128_unwrap_raw()
110 t = 6 * (inlen >> 3); in crypto_128_unwrap_raw()
114 R = out + inlen - 8; in crypto_128_unwrap_raw()
128 return inlen; in crypto_128_unwrap_raw()
202 if (inlen == 0 || inlen >= CRYPTO128_WRAP_MAX) in CRYPTO_128_wrap_pad()
214 aiv[7] = inlen & 0xFF; in CRYPTO_128_wrap_pad()
267 if ((inlen & 0x7) != 0 || inlen < 16 || inlen >= CRYPTO128_WRAP_MAX) in CRYPTO_128_unwrap_pad()
[all …]
/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c41 const unsigned char **in, size_t *inlen) in ossl_cipher_fillblock() argument
49 if (*inlen < bufremain) in ossl_cipher_fillblock()
50 bufremain = *inlen; in ossl_cipher_fillblock()
53 *inlen -= bufremain; in ossl_cipher_fillblock()
56 return *inlen & blockmask; in ossl_cipher_fillblock()
64 const unsigned char **in, size_t *inlen) in ossl_cipher_trailingdata() argument
66 if (*inlen == 0) in ossl_cipher_trailingdata()
69 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
74 memcpy(buf + *buflen, *in, *inlen); in ossl_cipher_trailingdata()
75 *buflen += *inlen; in ossl_cipher_trailingdata()
[all …]
H A Dcipher_aes_wrp.c30 size_t inlen, block128_f block);
166 const unsigned char *in, size_t inlen) in aes_wrap_cipher_internal() argument
178 if (inlen == 0) { in aes_wrap_cipher_internal()
184 if (!ctx->enc && (inlen < 16 || inlen & 0x7)) { in aes_wrap_cipher_internal()
190 if (!pad && inlen & 0x7) { in aes_wrap_cipher_internal()
199 inlen = (inlen + 7) / 8 * 8; in aes_wrap_cipher_internal()
201 return inlen + 8; in aes_wrap_cipher_internal()
208 return inlen - 8; in aes_wrap_cipher_internal()
213 inlen, ctx->block); in aes_wrap_cipher_internal()
/openssl/test/
H A Dpoly1305_internal_test.c1511 size_t inlen = test.input.size; in test_poly1305() local
1521 Poly1305_Update(&poly1305, in, inlen); in test_poly1305()
1529 if (inlen > 16) { in test_poly1305()
1532 Poly1305_Update(&poly1305, in+1, inlen-1); in test_poly1305()
1541 if (inlen > 32) { in test_poly1305()
1542 size_t half = inlen / 2; in test_poly1305()
1546 Poly1305_Update(&poly1305, in+half, inlen-half); in test_poly1305()
1554 for (half = 16; half < inlen; half += 16) { in test_poly1305()
1557 Poly1305_Update(&poly1305, in+half, inlen-half); in test_poly1305()
1562 idx, half, inlen-half); in test_poly1305()
H A Dsiphash_internal_test.c175 size_t inlen = test.idx; in test_siphash() local
188 if (!TEST_int_le(inlen, sizeof(in))) in test_siphash()
195 for (i = 0; i < inlen; i++) in test_siphash()
201 SipHash_Update(&siphash, in, inlen); in test_siphash()
206 if (inlen > 16) { in test_siphash()
211 SipHash_Update(&siphash, in+1, inlen-1); in test_siphash()
221 if (inlen > 32) { in test_siphash()
222 size_t half = inlen / 2; in test_siphash()
228 SipHash_Update(&siphash, in+half, inlen-half); in test_siphash()
237 for (half = 16; half < inlen; half += 16) { in test_siphash()
[all …]
H A Drsa_test.c586 unsigned int inlen = sizeof(in) - RSA_PKCS1_PADDING_SIZE - 3; in test_rsa_saos() local
667 if (!TEST_true(RSA_sign_ASN1_OCTET_STRING(0, in, inlen, sig, &siglen, in test_rsa_saos()
670 if (!TEST_true(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, sig, siglen, rsa_pub))) in test_rsa_saos()
674 if (!TEST_false(RSA_sign_ASN1_OCTET_STRING(0, in, inlen + 1, sig, &siglen, in test_rsa_saos()
679 if (!TEST_false(RSA_sign_ASN1_OCTET_STRING(0, in, inlen, sig, &siglen, in test_rsa_saos()
684 if (!TEST_false(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, sig, siglen - 1, rsa_pub))) in test_rsa_saos()
688 if (!TEST_false(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, (unsigned char *)no_octet_sig, in test_rsa_saos()
694 if (!TEST_false(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, (unsigned char *)sig_mismatch, in test_rsa_saos()
701 if (!TEST_false(RSA_verify_ASN1_OCTET_STRING(0, in, inlen, sig, siglen, rsa_pub))) in test_rsa_saos()
/openssl/crypto/cms/
H A Dcms_pwri.c211 if (inlen < 2 * blocklen) { in kek_unwrap_key()
215 if (inlen % blocklen) { in kek_unwrap_key()
219 if ((tmp = OPENSSL_malloc(inlen)) == NULL) in kek_unwrap_key()
244 if (inlen < (size_t)(tmp[0] - 4)) { in kek_unwrap_key()
252 OPENSSL_clear_free(tmp, inlen); in kek_unwrap_key()
272 olen = (inlen + 4 + blocklen - 1) / blocklen; in kek_wrap_key()
278 if (inlen > 0xFF) { in kek_wrap_key()
284 out[0] = (unsigned char)inlen; in kek_wrap_key()
288 memcpy(out + 4, in, inlen); in kek_wrap_key()
290 if (olen > inlen + 4 in kek_wrap_key()
[all …]
/openssl/crypto/pkcs12/
H A Dp12_decr.c21 const unsigned char *in, int inlen, in PKCS12_pbe_crypt_ex() argument
54 max_out_len = inlen + block_size; in PKCS12_pbe_crypt_ex()
65 if (inlen < mac_len) { in PKCS12_pbe_crypt_ex()
69 inlen -= mac_len; in PKCS12_pbe_crypt_ex()
81 if (!EVP_CipherUpdate(ctx, out, &i, in, inlen)) { in PKCS12_pbe_crypt_ex()
123 const unsigned char *in, int inlen, in PKCS12_pbe_crypt() argument
126 return PKCS12_pbe_crypt_ex(algor, pass, passlen, in, inlen, data, datalen, in PKCS12_pbe_crypt()
186 int inlen; in PKCS12_item_i2d_encrypt_ex() local
192 inlen = ASN1_item_i2d(obj, &in, it); in PKCS12_item_i2d_encrypt_ex()
197 if (!PKCS12_pbe_crypt_ex(algor, pass, passlen, in, inlen, &oct->data, in PKCS12_item_i2d_encrypt_ex()
[all …]
/openssl/crypto/aes/
H A Daes_wrap.c22 const unsigned char *in, unsigned int inlen) in AES_wrap_key() argument
24 return CRYPTO_128_wrap(key, iv, out, in, inlen, (block128_f) AES_encrypt); in AES_wrap_key()
29 const unsigned char *in, unsigned int inlen) in AES_unwrap_key() argument
31 return CRYPTO_128_unwrap(key, iv, out, in, inlen, in AES_unwrap_key()
/openssl/crypto/
H A Ddeterministic_nonce.c29 const unsigned char *in, size_t inlen) in bits2int() argument
31 int blen_bits = inlen * 8; in bits2int()
34 if (BN_bin2bn(in, (int)inlen, out) == NULL) in bits2int()
56 const unsigned char *in, size_t inlen) in bits2int_consttime() argument
58 int blen_bits = (inlen - sizeof(BN_ULONG)) * 8; in bits2int_consttime()
61 if (BN_bin2bn(in, (int)inlen, out) == NULL) in bits2int_consttime()
100 int rlen, const unsigned char *in, size_t inlen) in bits2octets() argument
106 || !bits2int(z, qlen_bits, in, inlen)) in bits2octets()
/openssl/providers/implementations/rands/
H A Ddrbg_ctr.c77 if (in == NULL || inlen == 0) in ctr_XOR()
84 n = inlen < ctr->keylen ? inlen : ctr->keylen; in ctr_XOR()
87 if (inlen <= ctr->keylen) in ctr_XOR()
90 n = inlen - ctr->keylen; in ctr_XOR()
164 if (inlen >= left) { in ctr_BCC_update()
169 inlen -= left; in ctr_BCC_update()
175 for (; inlen >= 16; in += 16, inlen -= 16) { in ctr_BCC_update()
181 if (inlen > 0) { in ctr_BCC_update()
204 size_t inlen; in ctr_df() local
220 *p++ = (inlen >> 8) & 0xff; in ctr_df()
[all …]
H A Ddrbg_hash.c71 const unsigned char *in, size_t inlen, in hash_df() argument
107 && EVP_DigestUpdate(ctx, in, inlen) in hash_df()
147 unsigned char *in, size_t inlen) in add_bytes() argument
154 assert(drbg->seedlen >= 1 && inlen >= 1 && inlen <= drbg->seedlen); in add_bytes()
157 add = &in[inlen - 1]; in add_bytes()
159 for (i = inlen; i > 0; i--, d--, add--) { in add_bytes()
167 for (i = drbg->seedlen - inlen; i > 0; --i, d--) { in add_bytes()
/openssl/crypto/siphash/
H A Dsiphash.c139 void SipHash_Update(SIPHASH *ctx, const unsigned char *in, size_t inlen) in SipHash_Update() argument
150 ctx->total_inlen += inlen; in SipHash_Update()
157 if (inlen < available) { in SipHash_Update()
158 memcpy(&ctx->leavings[ctx->len], in, inlen); in SipHash_Update()
159 ctx->len += inlen; in SipHash_Update()
165 inlen -= available; in SipHash_Update()
175 left = inlen & (SIPHASH_BLOCK_SIZE-1); /* gets put into leavings */ in SipHash_Update()
176 end = in + inlen - left; in SipHash_Update()
/openssl/crypto/ct/
H A Dct_b64.c26 size_t inlen = strlen(in); in ct_base64_decode() local
30 if (inlen == 0) { in ct_base64_decode()
35 outlen = (inlen / 4) * 3; in ct_base64_decode()
40 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode()
48 while (in[--inlen] == '=') { in ct_base64_decode()
/openssl/providers/implementations/asymciphers/
H A Dsm2_enc.c84 size_t inlen) in sm2_asym_encrypt() argument
93 if (!ossl_sm2_ciphertext_size(psm2ctx->key, md, inlen, outlen)) { in sm2_asym_encrypt()
100 return ossl_sm2_encrypt(psm2ctx->key, md, in, inlen, out, outlen); in sm2_asym_encrypt()
105 size_t inlen) in sm2_asym_decrypt() argument
114 if (!ossl_sm2_plaintext_size(in, inlen, outlen)) in sm2_asym_decrypt()
119 return ossl_sm2_decrypt(psm2ctx->key, md, in, inlen, out, outlen); in sm2_asym_decrypt()
/openssl/doc/man3/
H A DEVP_PKEY_verify.pod248 /* inlen is the length of the input in this example. */
249 size_t inlen, siglen;
257 * inlen must be the size of the data in bytes.
268 ret = EVP_PKEY_verify(ctx, sig, siglen, in, inlen);
286 /* inlen is the length of the input in this example. */
287 size_t inlen, siglen;
295 * inlen must be the size of the data in bytes.
309 while (inlen > 0) {
312 if (inlen > 256) {
313 inlen -= 256;
[all …]
H A DEVP_PKEY_sign.pod248 /* inlen is the length of the input in this example. */
249 size_t inlen, siglen;
257 * inlen must be the size of the data in bytes.
268 if (EVP_PKEY_sign(ctx, NULL, &siglen, in, inlen) <= 0)
276 if (EVP_PKEY_sign(ctx, sig, &siglen, in, inlen) <= 0)
294 size_t inlen, siglen;
302 * inlen must be the size of the data in bytes.
312 while (inlen > 0) {
315 if (inlen > 256) {
316 inlen -= 256;
[all …]
H A DEVP_PKEY_encrypt.pod16 const unsigned char *in, size_t inlen);
29 B<inlen> parameters. If B<out> is B<NULL> then the maximum size of the output
65 size_t outlen, inlen;
69 * NB: assumes eng, key, in, inlen are already set up,
81 if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0)
89 if (EVP_PKEY_encrypt(ctx, out, &outlen, in, inlen) <= 0)
H A DEVP_PKEY_decrypt.pod16 const unsigned char *in, size_t inlen);
29 I<inlen> parameters. If I<out> is NULL then the minimum required size of
85 size_t outlen, inlen;
89 * NB: assumes key, eng, in, inlen are already set up
101 if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0)
109 if (EVP_PKEY_decrypt(ctx, out, &outlen, in, inlen) <= 0)
/openssl/crypto/evp/
H A Dasymcipher.c229 const unsigned char *in, size_t inlen) in EVP_PKEY_encrypt() argument
247 (out == NULL ? 0 : *outlen), in, inlen); in EVP_PKEY_encrypt()
256 return ctx->pmeth->encrypt(ctx, out, outlen, in, inlen); in EVP_PKEY_encrypt()
271 const unsigned char *in, size_t inlen) in EVP_PKEY_decrypt() argument
289 (out == NULL ? 0 : *outlen), in, inlen); in EVP_PKEY_decrypt()
298 return ctx->pmeth->decrypt(ctx, out, outlen, in, inlen); in EVP_PKEY_decrypt()
304 const unsigned char *in, size_t inlen) in evp_pkey_decrypt_alloc() argument
306 if (EVP_PKEY_decrypt(ctx, NULL, outlenp, in, inlen) <= 0 in evp_pkey_decrypt_alloc()
309 if (EVP_PKEY_decrypt(ctx, *outp, outlenp, in, inlen) <= 0 in evp_pkey_decrypt_alloc()
/openssl/crypto/asn1/
H A Dtasn_utl.c164 int ossl_asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, in ossl_asn1_enc_save() argument
173 if (inlen <= 0) in ossl_asn1_enc_save()
175 if ((enc->enc = OPENSSL_malloc(inlen)) == NULL) in ossl_asn1_enc_save()
177 memcpy(enc->enc, in, inlen); in ossl_asn1_enc_save()
178 enc->len = inlen; in ossl_asn1_enc_save()
H A Da_strnid.c80 const unsigned char *in, int inlen, in ASN1_STRING_set_by_NID() argument
95 ret = ASN1_mbstring_ncopy(out, in, inlen, inform, mask, in ASN1_STRING_set_by_NID()
98 ret = ASN1_mbstring_copy(out, in, inlen, inform, in ASN1_STRING_set_by_NID()
/openssl/providers/implementations/kem/
H A Drsa_kem.c355 const unsigned char *in, size_t inlen) in rsasve_recover() argument
376 if (inlen != nlen) { in rsasve_recover()
392 ret = RSA_private_decrypt(inlen, in, out, prsactx->rsa, RSA_NO_PADDING); in rsasve_recover()
415 const unsigned char *in, size_t inlen) in rsakem_recover() argument
424 return rsasve_recover(prsactx, out, outlen, in, inlen); in rsakem_recover()
/openssl/crypto/pem/
H A Dpvkfmt.c861 int enctmplen, inlen; in do_PVK_body_key() local
865 inlen = cb(psbuf, PEM_BUFSIZE, 0, u); in do_PVK_body_key()
867 inlen = PEM_def_callback(psbuf, PEM_BUFSIZE, 0, u); in do_PVK_body_key()
868 if (inlen < 0) { in do_PVK_body_key()
886 inlen = keylen - 8; in do_PVK_body_key()
892 if (!EVP_DecryptUpdate(cctx, q, &enctmplen, p, inlen)) in do_PVK_body_key()
902 if (!EVP_DecryptUpdate(cctx, q, &enctmplen, p, inlen)) in do_PVK_body_key()
1068 int enctmplen, inlen; in i2b_PVK() local
1070 inlen = cb(psbuf, PEM_BUFSIZE, 1, u); in i2b_PVK()
1072 inlen = PEM_def_callback(psbuf, PEM_BUFSIZE, 1, u); in i2b_PVK()
[all …]
/openssl/include/openssl/
H A Dmodes.h169 const unsigned char *in, size_t inlen,
174 const unsigned char *in, size_t inlen,
178 size_t inlen, block128_f block);
181 size_t inlen, block128_f block);

Completed in 67 milliseconds

1234