Home
last modified time | relevance | path

Searched refs:alen (Results 1 – 22 of 22) sorted by relevance

/openssl/crypto/modes/
H A Dccm128.c74 if (alen == 0) in CRYPTO_ccm128_aad()
80 if (alen < (0x10000 - 0x100)) { in CRYPTO_ccm128_aad()
82 ctx->cmac.c[1] ^= (u8)alen; in CRYPTO_ccm128_aad()
84 } else if (sizeof(alen) == 8 in CRYPTO_ccm128_aad()
85 && alen >= (size_t)1 << (32 % (sizeof(alen) * 8))) { in CRYPTO_ccm128_aad()
88 ctx->cmac.c[2] ^= (u8)(alen >> (56 % (sizeof(alen) * 8))); in CRYPTO_ccm128_aad()
89 ctx->cmac.c[3] ^= (u8)(alen >> (48 % (sizeof(alen) * 8))); in CRYPTO_ccm128_aad()
90 ctx->cmac.c[4] ^= (u8)(alen >> (40 % (sizeof(alen) * 8))); in CRYPTO_ccm128_aad()
91 ctx->cmac.c[5] ^= (u8)(alen >> (32 % (sizeof(alen) * 8))); in CRYPTO_ccm128_aad()
108 for (; i < 16 && alen; ++i, ++aad, --alen) in CRYPTO_ccm128_aad()
[all …]
H A Dgcm128.c723 u64 alen = ctx->len.u[0]; in CRYPTO_gcm128_aad() local
728 alen += len; in CRYPTO_gcm128_aad()
729 if (alen > (U64(1) << 61) || (sizeof(len) == 8 && alen < len)) in CRYPTO_gcm128_aad()
731 ctx->len.u[0] = alen; in CRYPTO_gcm128_aad()
1549 u64 alen = ctx->len.u[0] << 3; in CRYPTO_gcm128_finish() local
1575 alen = BSWAP8(alen); in CRYPTO_gcm128_finish()
1580 ctx->len.u[0] = alen; in CRYPTO_gcm128_finish()
1583 alen = (u64)GETU32(p) << 32 | GETU32(p + 4); in CRYPTO_gcm128_finish()
1589 bitlen.hi = alen; in CRYPTO_gcm128_finish()
1595 ctx->Xi.u[0] ^= alen; in CRYPTO_gcm128_finish()
/openssl/test/
H A Dbio_addr_test.c84 size_t alen, blen; in bio_addr_is_eq() local
102 if (!BIO_ADDR_rawaddress(a, NULL, &alen)) in bio_addr_is_eq()
108 if (alen != blen) in bio_addr_is_eq()
111 if (alen == 0) in bio_addr_is_eq()
114 adata = OPENSSL_malloc(alen); in bio_addr_is_eq()
116 || !BIO_ADDR_rawaddress(a, adata, &alen)) in bio_addr_is_eq()
124 ret = (memcmp(adata, bdata, alen) == 0); in bio_addr_is_eq()
H A Ddhtest.c54 int i, alen, blen, clen, aout, bout, cout; in dh_test() local
209 alen = DH_size(a); in dh_test()
210 if (!TEST_ptr(abuf = OPENSSL_malloc(alen)) in dh_test()
668 int i, alen, blen, aout, bout; in rfc7919_test() local
695 alen = DH_size(a); in rfc7919_test()
696 if (!TEST_int_gt(alen, 0) || !TEST_ptr(abuf = OPENSSL_malloc(alen)) in rfc7919_test()
H A Dquic_multistream_test.c3864 uint64_t agap = 0, alen = 0; in script_46_inject_plain() local
3888 alen = 19; in script_46_inject_plain()
3895 alen = 1; in script_46_inject_plain()
3925 || !TEST_true(WPACKET_quic_write_vlint(&wpkt, /*range[0].len=*/alen))) in script_46_inject_plain()
/openssl/providers/implementations/ciphers/
H A Dcipher_aes_ccm_hw_s390x.inc55 if (!alen)
64 *(uint16_t *)ptr = alen;
66 } else if (sizeof(alen) == 8
67 && alen >= (size_t)1 << (32 % (sizeof(alen) * 8))) {
69 *(uint64_t *)(ptr + 2) = alen;
77 while (i < 16 && alen) {
80 --alen;
94 rem = alen & 0xf;
95 alen &= ~(size_t)0xf;
96 if (alen) {
[all …]
H A Dciphercommon_ccm.c21 static int ccm_tls_init(PROV_CCM_CTX *ctx, unsigned char *aad, size_t alen) in ccm_tls_init() argument
25 if (!ossl_prov_is_running() || alen != EVP_AEAD_TLS1_AAD_LEN) in ccm_tls_init()
29 memcpy(ctx->buf, aad, alen); in ccm_tls_init()
30 ctx->tls_aad_len = alen; in ccm_tls_init()
32 len = ctx->buf[alen - 2] << 8 | ctx->buf[alen - 1]; in ccm_tls_init()
45 ctx->buf[alen - 2] = (unsigned char)(len >> 8); in ccm_tls_init()
46 ctx->buf[alen - 1] = (unsigned char)(len & 0xff); in ccm_tls_init()
H A Dcipher_aes_gcm_hw_vaes_avx512.inc89 u64 alen = gcmctx->len.u[0];
97 alen += aad_len;
99 if ((alen > (U64(1) << 61)) || (alen < aad_len))
102 gcmctx->len.u[0] = alen;
H A Dciphercommon_ccm_hw.c20 size_t alen) in ossl_ccm_generic_setaad() argument
22 CRYPTO_ccm128_aad(&ctx->ccm_ctx, aad, alen); in ossl_ccm_generic_setaad()
H A Dcipher_aes_gcm_hw_s390x.inc146 unsigned long long alen;
155 alen = kma->taadl + len;
156 if (alen > (U64(1) << 61) || (sizeof(len) == 8 && alen < len))
158 kma->taadl = alen;
H A Dcipher_chacha20_poly1305.h38 int (*tls_init)(PROV_CIPHER_CTX *ctx, unsigned char *aad, size_t alen);
H A Dcipher_chacha20_poly1305_hw.c16 unsigned char *aad, size_t alen) in chacha_poly1305_tls_init() argument
21 if (alen != EVP_AEAD_TLS1_AAD_LEN) in chacha_poly1305_tls_init()
H A Dcipher_aes_ocb.c59 size_t alen) in aes_generic_ocb_setaad() argument
61 return CRYPTO_ocb128_aad(&ctx->ocb, aad, alen) == 1; in aes_generic_ocb_setaad()
/openssl/crypto/cms/
H A Dcms_sd.c833 int alen; in CMS_SignerInfo_sign() local
863 alen = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &abuf, in CMS_SignerInfo_sign()
865 if (alen < 0 || abuf == NULL) in CMS_SignerInfo_sign()
867 if (EVP_DigestSignUpdate(mctx, abuf, alen) <= 0) in CMS_SignerInfo_sign()
894 int alen, r = -1; in CMS_SignerInfo_verify() local
945 alen = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &abuf, in CMS_SignerInfo_verify()
947 if (abuf == NULL || alen < 0) in CMS_SignerInfo_verify()
949 r = EVP_DigestVerifyUpdate(mctx, abuf, alen); in CMS_SignerInfo_verify()
/openssl/crypto/pkcs7/
H A Dpk7_doit.c951 int alen; in PKCS7_SIGNER_INFO_sign() local
972 alen = ASN1_item_i2d((ASN1_VALUE *)si->auth_attr, &abuf, in PKCS7_SIGNER_INFO_sign()
974 if (alen < 0 || abuf == NULL) in PKCS7_SIGNER_INFO_sign()
976 if (EVP_DigestSignUpdate(mctx, abuf, alen) <= 0) in PKCS7_SIGNER_INFO_sign()
1124 int alen; in PKCS7_signatureVerify() local
1155 alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf, in PKCS7_signatureVerify()
1157 if (alen <= 0 || abuf == NULL) { in PKCS7_signatureVerify()
1162 if (!EVP_VerifyUpdate(mdc_tmp, abuf, alen)) in PKCS7_signatureVerify()
/openssl/crypto/evp/
H A De_aes.c1262 unsigned long long alen; in s390x_aes_gcm_aad() local
1269 if (alen > (U64(1) << 61) || (sizeof(len) == 8 && alen < len)) in s390x_aes_gcm_aad()
1271 ctx->kma.param.taadl = alen; in s390x_aes_gcm_aad()
1808 if (!alen) in s390x_aes_ccm_aad()
1820 && alen >= (size_t)1 << (32 % (sizeof(alen) * 8))) { in s390x_aes_ccm_aad()
1830 while (i < 16 && alen) { in s390x_aes_ccm_aad()
1833 --alen; in s390x_aes_ccm_aad()
1847 rem = alen & 0xf; in s390x_aes_ccm_aad()
1848 alen &= ~(size_t)0xf; in s390x_aes_ccm_aad()
1849 if (alen) { in s390x_aes_ccm_aad()
[all …]
/openssl/providers/implementations/include/prov/
H A Dciphercommon_ccm.h97 size_t alen);
/openssl/ssl/
H A Dssl_cert.c708 int alen, blen, ret; in xname_cmp() local
713 alen = i2d_X509_NAME((X509_NAME *)a, &abuf); in xname_cmp()
716 if (alen < 0 || blen < 0) in xname_cmp()
718 else if (alen != blen) in xname_cmp()
719 ret = alen - blen; in xname_cmp()
721 ret = memcmp(abuf, bbuf, alen); in xname_cmp()
/openssl/crypto/
H A Ds390x_arch.h29 void s390x_kma(const unsigned char *aad, size_t alen, const unsigned char *in,
H A Ds390xcpuid.pl429 my ($aad,$alen,$in,$len,$out) = map("%r$_",(2..6));
/openssl/include/openssl/
H A Dmodes.h147 size_t alen);
/openssl/crypto/srp/
H A Dsrp_vfy.c44 static int t_fromb64(unsigned char *a, size_t alen, const char *src) in t_fromb64() argument
58 if (size > INT_MAX || ((size + padsize) / 4) * 3 > alen) in t_fromb64()

Completed in 99 milliseconds