Home
last modified time | relevance | path

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

123

/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/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 …]
/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c58 const unsigned char **in, size_t *inlen) in ossl_cipher_fillblock() argument
66 if (*inlen < bufremain) in ossl_cipher_fillblock()
67 bufremain = *inlen; in ossl_cipher_fillblock()
70 *inlen -= bufremain; in ossl_cipher_fillblock()
73 return *inlen & blockmask; in ossl_cipher_fillblock()
81 const unsigned char **in, size_t *inlen) in ossl_cipher_trailingdata() argument
83 if (*inlen == 0) in ossl_cipher_trailingdata()
86 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
91 memcpy(buf + *buflen, *in, *inlen); in ossl_cipher_trailingdata()
92 *buflen += *inlen; in ossl_cipher_trailingdata()
[all …]
H A Dcipher_aes_wrp.c30 size_t inlen, block128_f block);
143 const unsigned char *in, size_t inlen) in aes_wrap_cipher_internal() argument
155 if (inlen == 0) { in aes_wrap_cipher_internal()
161 if (!ctx->enc && (inlen < 16 || inlen & 0x7)) { in aes_wrap_cipher_internal()
167 if (!pad && inlen & 0x7) { in aes_wrap_cipher_internal()
176 inlen = (inlen + 7) / 8 * 8; in aes_wrap_cipher_internal()
178 return inlen + 8; in aes_wrap_cipher_internal()
185 return inlen - 8; in aes_wrap_cipher_internal()
190 inlen, ctx->block); in aes_wrap_cipher_internal()
/openssl/crypto/cms/
H A Dcms_pwri.c196 if (inlen < 2 * blocklen) { in kek_unwrap_key()
200 if (inlen % blocklen) { in kek_unwrap_key()
204 if ((tmp = OPENSSL_malloc(inlen)) == NULL) { in kek_unwrap_key()
231 if (inlen < (size_t)(tmp[0] - 4)) { in kek_unwrap_key()
239 OPENSSL_clear_free(tmp, inlen); in kek_unwrap_key()
255 olen = (inlen + 4 + blocklen - 1) / blocklen; in kek_wrap_key()
261 if (inlen > 0xFF) { in kek_wrap_key()
267 out[0] = (unsigned char)inlen; in kek_wrap_key()
271 memcpy(out + 4, in, inlen); in kek_wrap_key()
273 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
46 max_out_len = inlen + EVP_CIPHER_CTX_get_block_size(ctx); in PKCS12_pbe_crypt_ex()
57 if (inlen < mac_len) { in PKCS12_pbe_crypt_ex()
61 inlen -= mac_len; in PKCS12_pbe_crypt_ex()
75 if (!EVP_CipherUpdate(ctx, out, &i, in, inlen)) { in PKCS12_pbe_crypt_ex()
117 const unsigned char *in, int inlen, in PKCS12_pbe_crypt() argument
120 return PKCS12_pbe_crypt_ex(algor, pass, passlen, in, inlen, data, datalen, in PKCS12_pbe_crypt()
180 int inlen; in PKCS12_item_i2d_encrypt_ex() local
186 inlen = ASN1_item_i2d(obj, &in, it); in PKCS12_item_i2d_encrypt_ex()
191 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/providers/implementations/rands/
H A Ddrbg_ctr.c75 if (in == NULL || inlen == 0) in ctr_XOR()
82 n = inlen < ctr->keylen ? inlen : ctr->keylen; in ctr_XOR()
85 if (inlen <= ctr->keylen) in ctr_XOR()
88 n = inlen - ctr->keylen; in ctr_XOR()
162 if (inlen >= left) { in ctr_BCC_update()
167 inlen -= left; in ctr_BCC_update()
173 for (; inlen >= 16; in += 16, inlen -= 16) { in ctr_BCC_update()
179 if (inlen > 0) { in ctr_BCC_update()
202 size_t inlen; in ctr_df() local
218 *p++ = (inlen >> 8) & 0xff; in ctr_df()
[all …]
H A Ddrbg_hash.c69 const unsigned char *in, size_t inlen, in hash_df() argument
105 && EVP_DigestUpdate(ctx, in, inlen) in hash_df()
145 unsigned char *in, size_t inlen) in add_bytes() argument
152 assert(drbg->seedlen >= 1 && inlen >= 1 && inlen <= drbg->seedlen); in add_bytes()
155 add = &in[inlen - 1]; in add_bytes()
157 for (i = inlen; i > 0; i--, d--, add--) { in add_bytes()
165 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()
42 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode()
50 while (in[--inlen] == '=') { in ct_base64_decode()
/openssl/providers/implementations/asymciphers/
H A Dsm2_enc.c83 size_t inlen) in sm2_asym_encrypt() argument
92 if (!ossl_sm2_ciphertext_size(psm2ctx->key, md, inlen, outlen)) { in sm2_asym_encrypt()
99 return ossl_sm2_encrypt(psm2ctx->key, md, in, inlen, out, outlen); in sm2_asym_encrypt()
104 size_t inlen) in sm2_asym_decrypt() argument
113 if (!ossl_sm2_plaintext_size(in, inlen, outlen)) in sm2_asym_decrypt()
118 return ossl_sm2_decrypt(psm2ctx->key, md, in, inlen, out, outlen); in sm2_asym_decrypt()
H A Drsa_enc.c136 size_t outsize, const unsigned char *in, size_t inlen) in rsa_encrypt() argument
171 rsasize, in, inlen, in rsa_encrypt()
185 ret = RSA_public_encrypt(inlen, in, out, prsactx->rsa, in rsa_encrypt()
196 size_t outsize, const unsigned char *in, size_t inlen) in rsa_decrypt() argument
238 ret = RSA_private_decrypt(inlen, in, tbuf, prsactx->rsa, in rsa_decrypt()
277 ret = RSA_private_decrypt(inlen, in, out, prsactx->rsa, in rsa_decrypt()
/openssl/doc/man3/
H A DEVP_PKEY_decrypt.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
62 size_t outlen, inlen;
66 * NB: assumes key, eng, in, inlen are already set up
78 if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0)
86 if (EVP_PKEY_decrypt(ctx, out, &outlen, in, inlen) <= 0)
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_decapsulate.pod50 * and that in, inlen are already set up to contain encapsulated data.
68 if (EVP_PKEY_decapsulate(ctx, NULL, &secretlen, in, inlen) <= 0)
76 if (EVP_PKEY_decapsulaterctx, secret, &secretlen, in, inlen) <= 0)
/openssl/crypto/asn1/
H A Dtasn_utl.c160 int ossl_asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, in ossl_asn1_enc_save() argument
169 if (inlen <= 0) in ossl_asn1_enc_save()
171 if ((enc->enc = OPENSSL_malloc(inlen)) == NULL) { in ossl_asn1_enc_save()
175 memcpy(enc->enc, in, inlen); in ossl_asn1_enc_save()
176 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.c294 const unsigned char *in, size_t inlen) in rsasve_recover() argument
311 if (inlen != nlen) { in rsasve_recover()
316 return (RSA_private_decrypt(inlen, in, out, prsactx->rsa, RSA_NO_PADDING) > 0); in rsasve_recover()
333 const unsigned char *in, size_t inlen) in rsakem_recover() argument
339 return rsasve_recover(prsactx, out, outlen, in, inlen); in rsakem_recover()
/openssl/crypto/pem/
H A Dpvkfmt.c851 int enctmplen, inlen; in do_PVK_body_key() local
855 inlen = cb(psbuf, PEM_BUFSIZE, 0, u); in do_PVK_body_key()
857 inlen = PEM_def_callback(psbuf, PEM_BUFSIZE, 0, u); in do_PVK_body_key()
858 if (inlen < 0) { in do_PVK_body_key()
878 inlen = keylen - 8; in do_PVK_body_key()
884 if (!EVP_DecryptUpdate(cctx, q, &enctmplen, p, inlen)) in do_PVK_body_key()
894 if (!EVP_DecryptUpdate(cctx, q, &enctmplen, p, inlen)) in do_PVK_body_key()
1064 int enctmplen, inlen; in i2b_PVK() local
1066 inlen = cb(psbuf, PEM_BUFSIZE, 1, u); in i2b_PVK()
1068 inlen = PEM_def_callback(psbuf, PEM_BUFSIZE, 1, u); in i2b_PVK()
[all …]
/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()
/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);
H A Daes.h99 unsigned int inlen);
103 unsigned int inlen);
/openssl/engines/
H A De_dasync.c120 size_t inlen);
124 size_t inlen);
891 size_t inlen) in dasync_rsa_encrypt() argument
895 size_t inlen); in dasync_rsa_encrypt()
899 return pencryptfn(ctx, out, outlen, in, inlen); in dasync_rsa_encrypt()
913 size_t inlen) in dasync_rsa_decrypt() argument
917 size_t inlen); in dasync_rsa_decrypt()
921 return pdecrypt(ctx, out, outlen, in, inlen); in dasync_rsa_decrypt()

Completed in 78 milliseconds

123