Home
last modified time | relevance | path

Searched refs:pad (Results 1 – 25 of 64) sorted by relevance

123

/openssl/crypto/bn/asm/
H A Dvia-mont.pl98 $pad=16*1; # amount of reserved bytes on top of every vector
141 &lea ("ecx",&DWP($pad,"","ecx",4)); # ecx becomes vector size in bytes
158 &lea ("ebp",&DWP(-$pad,"ecx"));
164 &lea ("ecx",&DWP((32+$pad)/4,"ecx"));# padded tp + scratch
168 &lea ("edi",&DWP(64+$pad,"esp","ecx",4));# pointer to ap copy
171 &mov ("ecx",$pad/4);
179 &mov ("ecx",$pad/4);
187 &mov ("ecx",$pad/4);
202 &lea ("ebp",&DWP(-$pad,"edi","ebp",4)); # so just "rewind"
236 &lea ("edi",&DWP(64+$pad,"esp","edx",4));# pointer to ap
[all …]
/openssl/crypto/asn1/
H A Da_int.c100 unsigned int pad = 0; in i2c_ibuf() local
108 pad = 1; in i2c_ibuf()
113 pad = 1; in i2c_ibuf()
125 ret += pad; in i2c_ibuf()
157 int neg, pad; in c2i_ibuf() local
177 pad = 0; in c2i_ibuf()
179 pad = 1; in c2i_ibuf()
188 pad |= p[i]; in c2i_ibuf()
189 pad = pad != 0 ? 1 : 0; in c2i_ibuf()
198 p += pad; in c2i_ibuf()
[all …]
H A Dx_bignum.c98 int pad; in bn_i2c() local
104 pad = 0; in bn_i2c()
106 pad = 1; in bn_i2c()
108 if (pad) in bn_i2c()
112 return pad + BN_num_bytes(bn); in bn_i2c()
H A Dx_long.c90 int clen, pad, i; in long_i2c() local
110 pad = 1; in long_i2c()
112 pad = 0; in long_i2c()
118 if (pad) in long_i2c()
125 return clen + pad; in long_i2c()
/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c85 unsigned char pad = (unsigned char)(blocksize - *buflen); in ossl_cipher_padblock() local
88 buf[i] = pad; in ossl_cipher_padblock()
93 size_t pad, i; in ossl_cipher_unpadblock() local
105 pad = buf[blocksize - 1]; in ossl_cipher_unpadblock()
106 if (pad == 0 || pad > blocksize) { in ossl_cipher_unpadblock()
110 for (i = 0; i < pad; i++) { in ossl_cipher_unpadblock()
111 if (buf[--len] != pad) { in ossl_cipher_unpadblock()
H A Dciphercommon.c272 || !ctx->pad) { in ossl_cipher_generic_block_update()
349 if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) { in ossl_cipher_generic_block_update()
363 if (!ctx->enc && ctx->pad && nextblocks == inl) { in ossl_cipher_generic_block_update()
415 if (ctx->pad) { in ossl_cipher_generic_block_final()
440 if (ctx->bufsz == 0 && !ctx->pad) { in ossl_cipher_generic_block_final()
453 if (ctx->pad && !ossl_cipher_unpadblock(ctx->buf, &ctx->bufsz, blksz)) { in ossl_cipher_generic_block_final()
586 if (p != NULL && !OSSL_PARAM_set_uint(p, ctx->pad)) { in ossl_cipher_generic_get_ctx_params()
633 unsigned int pad; in ossl_cipher_generic_set_ctx_params() local
635 if (!OSSL_PARAM_get_uint(p, &pad)) { in ossl_cipher_generic_set_ctx_params()
639 ctx->pad = pad ? 1 : 0; in ossl_cipher_generic_set_ctx_params()
[all …]
H A Dcipher_aes_wrp.c64 ctx->pad = (ctx->ivlen == AES_WRAP_PAD_IVLEN); in aes_wrap_newctx()
111 if (ctx->pad) in aes_wrap_init()
171 int pad = ctx->pad; in aes_wrap_cipher_internal() local
190 if (!pad && inlen & 0x7) { in aes_wrap_cipher_internal()
198 if (pad) in aes_wrap_cipher_internal()
H A Dcipher_aes_cbc_hmac_sha1_hw.c325 unsigned int len = (i == (x4 - 1) ? last : frag), pad, j; in tls1_multi_block_encrypt() local
343 pad = 15 - len % 16; in tls1_multi_block_encrypt()
344 for (j = 0; j <= pad; j++) in tls1_multi_block_encrypt()
345 *(out++) = pad; in tls1_multi_block_encrypt()
346 len += pad + 1; in tls1_multi_block_encrypt()
450 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha1_cipher() local
475 pad = out[len - 1]; in aesni_cbc_hmac_sha1_cipher()
480 mask = constant_time_ge(maxpad, pad); in aesni_cbc_hmac_sha1_cipher()
488 pad = constant_time_select(mask, pad, maxpad); in aesni_cbc_hmac_sha1_cipher()
490 inp_len = len - (SHA_DIGEST_LENGTH + pad + 1); in aesni_cbc_hmac_sha1_cipher()
[all …]
H A Dcipher_aes_cbc_hmac_sha256_hw.c345 unsigned int len = (i == (x4 - 1) ? last : frag), pad, j; in tls1_multi_block_encrypt() local
366 pad = 15 - len % 16; in tls1_multi_block_encrypt()
367 for (j = 0; j <= pad; j++) in tls1_multi_block_encrypt()
368 *(out++) = pad; in tls1_multi_block_encrypt()
369 len += pad + 1; in tls1_multi_block_encrypt()
492 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha256_cipher() local
511 pad = out[len - 1]; in aesni_cbc_hmac_sha256_cipher()
516 mask = constant_time_ge(maxpad, pad); in aesni_cbc_hmac_sha256_cipher()
524 pad = constant_time_select(mask, pad, maxpad); in aesni_cbc_hmac_sha256_cipher()
526 inp_len = len - (SHA256_DIGEST_LENGTH + pad + 1); in aesni_cbc_hmac_sha256_cipher()
[all …]
/openssl/apps/
H A Drsautl.c82 unsigned char *rsa_in = NULL, *rsa_out = NULL, pad = RSA_PKCS1_PADDING; in rsautl_main() local
120 pad = RSA_NO_PADDING; in rsautl_main()
123 pad = RSA_PKCS1_OAEP_PADDING; in rsautl_main()
126 pad = RSA_PKCS1_PADDING; in rsautl_main()
129 pad = RSA_X931_PADDING; in rsautl_main()
246 && EVP_PKEY_CTX_set_rsa_padding(ctx, pad) > 0 in rsautl_main()
252 && EVP_PKEY_CTX_set_rsa_padding(ctx, pad) > 0 in rsautl_main()
257 && EVP_PKEY_CTX_set_rsa_padding(ctx, pad) > 0 in rsautl_main()
262 && EVP_PKEY_CTX_set_rsa_padding(ctx, pad) > 0 in rsautl_main()
/openssl/crypto/sha/
H A Dsha3.c28 int ossl_sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen) in ossl_sha3_init() argument
36 ctx->pad = pad; in ossl_sha3_init()
43 int ossl_keccak_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen, size_t mdlen) in ossl_keccak_init() argument
45 int ret = ossl_sha3_init(ctx, pad, bitlen); in ossl_keccak_init()
120 ctx->buf[num] = ctx->pad; in ossl_sha3_final()
165 ctx->buf[num] = ctx->pad; in ossl_sha3_squeeze()
/openssl/crypto/modes/
H A Docb128.c390 OCB_BLOCK pad; in CRYPTO_ocb128_encrypt() local
396 ctx->encrypt(ctx->sess.offset.c, pad.c, ctx->keyenc); in CRYPTO_ocb128_encrypt()
399 ocb_block_xor(in, pad.c, last_len, out); in CRYPTO_ocb128_encrypt()
402 memset(pad.c, 0, 16); /* borrow pad */ in CRYPTO_ocb128_encrypt()
403 memcpy(pad.c, in, last_len); in CRYPTO_ocb128_encrypt()
404 pad.c[last_len] = 0x80; in CRYPTO_ocb128_encrypt()
482 OCB_BLOCK pad; in CRYPTO_ocb128_decrypt() local
491 ocb_block_xor(in, pad.c, last_len, out); in CRYPTO_ocb128_decrypt()
494 memset(pad.c, 0, 16); /* borrow pad */ in CRYPTO_ocb128_decrypt()
495 memcpy(pad.c, out, last_len); in CRYPTO_ocb128_decrypt()
[all …]
/openssl/providers/implementations/digests/
H A Dsha3_prov.c203 fc = ctx->pad; in s390x_sha3_absorb()
221 fc = ctx->pad | S390X_KLMD_DUFOP; in s390x_sha3_final()
239 fc = ctx->pad | S390X_KLMD_DUFOP; in s390x_shake_final()
260 fc = ctx->pad; in s390x_shake_squeeze()
282 s390x_klmd(NULL, 0, out, outlen, ctx->pad | S390X_KLMD_PS, ctx->A); in s390x_shake_squeeze()
302 fc = ctx->pad; in s390x_keccakc_final()
316 ctx->pad | S390X_KLMD_PS | S390X_KLMD_DUFOP, ctx->A); in s390x_keccakc_final()
352 fc = ctx->pad; in s390x_keccakc_squeeze()
372 s390x_klmd(NULL, 0, out, outlen, ctx->pad | S390X_KLMD_PS, ctx->A); in s390x_keccakc_squeeze()
414 ctx->pad = S390X_##uname; \
[all …]
/openssl/crypto/hmac/
H A Dhmac.c30 unsigned char pad[HMAC_MAX_MD_CBLOCK_SIZE]; in HMAC_Init_ex() local
83 pad[i] = 0x36 ^ keytmp[i]; in HMAC_Init_ex()
85 || !EVP_DigestUpdate(ctx->i_ctx, pad, in HMAC_Init_ex()
90 pad[i] = 0x5c ^ keytmp[i]; in HMAC_Init_ex()
92 || !EVP_DigestUpdate(ctx->o_ctx, pad, in HMAC_Init_ex()
102 OPENSSL_cleanse(pad, sizeof(pad)); in HMAC_Init_ex()
/openssl/include/internal/
H A Dsha3.h46 unsigned char pad; member
52 int ossl_sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen);
53 int ossl_keccak_init(KECCAK1600_CTX *ctx, unsigned char pad,
/openssl/crypto/dh/
H A Ddh_pmeth.c35 int pad; member
96 dctx->pad = sctx->pad; in pkey_dh_copy()
132 dctx->pad = p1; in pkey_dh_ctrl()
267 int pad; in pkey_dh_ctrl_str() local
268 pad = atoi(value); in pkey_dh_ctrl_str()
269 return EVP_PKEY_CTX_set_dh_pad(ctx, pad); in pkey_dh_ctrl_str()
421 if (dctx->pad) in pkey_dh_derive()
H A Ddh_key.c146 int rv, pad; in DH_compute_key_padded() local
156 pad = BN_num_bytes(dh->params.p) - rv; in DH_compute_key_padded()
158 if (pad > 0) { in DH_compute_key_padded()
159 memmove(key + pad, key, rv); in DH_compute_key_padded()
160 memset(key, 0, pad); in DH_compute_key_padded()
162 return rv + pad; in DH_compute_key_padded()
/openssl/providers/implementations/exchange/
H A Ddh_exch.c66 unsigned int pad : 1; member
177 size_t outlen, unsigned int pad) in dh_plain_derive() argument
200 if (pad) in dh_plain_derive()
264 pdhctx->pad); in dh_derive()
344 unsigned int pad; in dh_set_ctx_params() local
436 if (!OSSL_PARAM_get_uint(p, &pad)) in dh_set_ctx_params()
438 pdhctx->pad = pad ? 1 : 0; in dh_set_ctx_params()
/openssl/crypto/evp/
H A De_aes_cbc_hmac_sha1.c381 pad = 15 - len % 16; in tls1_1_multi_block_encrypt()
382 for (j = 0; j <= pad; j++) in tls1_1_multi_block_encrypt()
383 *(out++) = pad; in tls1_1_multi_block_encrypt()
384 len += pad + 1; in tls1_1_multi_block_encrypt()
538 pad = out[len - 1]; in aesni_cbc_hmac_sha1_cipher()
543 mask = constant_time_ge(maxpad, pad); in aesni_cbc_hmac_sha1_cipher()
551 pad = constant_time_select(mask, pad, maxpad); in aesni_cbc_hmac_sha1_cipher()
733 pad = (pad & ~res) | (maxpad & res); in aesni_cbc_hmac_sha1_cipher()
734 out = out + len - 1 - pad; in aesni_cbc_hmac_sha1_cipher()
735 for (res = 0, i = 0; i < pad; i++) in aesni_cbc_hmac_sha1_cipher()
[all …]
H A De_aes_cbc_hmac_sha256.c394 pad = 15 - len % 16; in tls1_1_multi_block_encrypt()
395 for (j = 0; j <= pad; j++) in tls1_1_multi_block_encrypt()
396 *(out++) = pad; in tls1_1_multi_block_encrypt()
397 len += pad + 1; in tls1_1_multi_block_encrypt()
542 pad = out[len - 1]; in aesni_cbc_hmac_sha256_cipher()
547 mask = constant_time_ge(maxpad, pad); in aesni_cbc_hmac_sha256_cipher()
555 pad = constant_time_select(mask, pad, maxpad); in aesni_cbc_hmac_sha256_cipher()
731 pad = (pad & ~res) | (maxpad & res); in aesni_cbc_hmac_sha256_cipher()
732 out = out + len - 1 - pad; in aesni_cbc_hmac_sha256_cipher()
733 for (res = 0, i = 0; i < pad; i++) in aesni_cbc_hmac_sha256_cipher()
[all …]
/openssl/ssl/record/methods/
H A Dtls1_meth.c175 int pad = 0, tmpr, provided; in tls1_cipher() local
276 pad = EVP_CIPHER_CTX_ctrl(ds, EVP_CTRL_AEAD_TLS1_AAD, in tls1_cipher()
278 if (pad <= 0) { in tls1_cipher()
284 reclen[ctr] += pad; in tls1_cipher()
285 recs[ctr].length += pad; in tls1_cipher()
453 pad ? (size_t)pad : macsize, in tls1_cipher()
/openssl/doc/man7/
H A DEVP_MD-MDC2.pod28 =item "pad-type" (B<OSSL_DIGEST_PARAM_PAD_TYPE>) <unsigned integer>
32 If the pad type is set to 2 then the final block is padded with 0x80 followed by
H A DEVP_ASYM_CIPHER-RSA.pod16 =item "pad-mode" (B<OSSL_ASYM_CIPHER_PARAM_PAD_MODE>) <UTF8 string>
36 =item "pad-mode" (B<OSSL_ASYM_CIPHER_PARAM_PAD_MODE>) <integer>
90 =item "pkcs15-pad-disabled" (B<OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED>) <integer>
H A DEVP_SIGNATURE-RSA.pod58 They are all pre-set to use the pad mode "pkcs1". This cannot be changed.
80 =item "pad-mode" (B<OSSL_SIGNATURE_PARAM_PAD_MODE>) <UTF8 string>
145 =item "sign-x931-pad-check" (B<OSSL_SIGNATURE_PARAM_FIPS_SIGN_X931_PAD_CHECK>) <integer>
176 =item "pad-mode" (B<OSSL_SIGNATURE_PARAM_PAD_MODE>) <UTF8 string>
/openssl/test/
H A Dbad_dtls_test.c288 unsigned char pad; in send_record() local
300 pad = 15 - ((len + SHA_DIGEST_LENGTH) % 16); in send_record()
301 enc = OPENSSL_malloc(len + SHA_DIGEST_LENGTH + 1 + pad); in send_record()
330 enc[len++] = pad; in send_record()

Completed in 39 milliseconds

123