Lines Matching defs:len

140                                 size_t len, const AES_KEY *key,
143 size_t len, const AES_KEY *key1,
146 size_t len, const AES_KEY *key1,
155 void AES_xts_encrypt(const char *inp, char *out, size_t len,
158 void AES_xts_decrypt(const char *inp, char *out, size_t len,
249 size_t len,
254 size_t len,
258 size_t len);
299 const unsigned char *in, size_t len)
301 aesni_cbc_encrypt(in, out, len, ctx->cipher_data, ctx->iv, ctx->encrypt);
307 const unsigned char *in, size_t len)
311 if (len < bl)
314 aesni_ecb_encrypt(in, out, len, ctx->cipher_data, ctx->encrypt);
321 const unsigned char *in, size_t len);
325 const unsigned char *in, size_t len);
329 const unsigned char *in, size_t len);
333 const unsigned char *in, size_t len);
337 const unsigned char *in, size_t len);
373 const unsigned char *in, size_t len);
411 const unsigned char *in, size_t len);
436 const unsigned char *in, size_t len);
507 size_t len, const AES_KEY *key,
510 size_t len, const AES_KEY *key,
513 size_t len, const AES_KEY *key,
516 size_t len, const AES_KEY *key,
519 size_t len, const AES_KEY *key,
522 size_t len, const AES_KEY *key,
619 const unsigned char *in, size_t len);
623 const unsigned char *in, size_t len);
627 const unsigned char *in, size_t len);
631 const unsigned char *in, size_t len);
635 const unsigned char *in, size_t len);
639 const unsigned char *in, size_t len);
643 const unsigned char *in, size_t len);
693 const unsigned char *in, size_t len);
761 const unsigned char *in, size_t len);
805 const unsigned char *in, size_t len);
907 size_t len, const AES_KEY *key,
1014 const unsigned char *in, size_t len)
1019 if (len < bl)
1023 (*dat->stream.cbc) (in, out, len, &dat->ks, ctx->iv, ctx->encrypt);
1025 CRYPTO_cbc128_encrypt(in, out, len, &dat->ks, ctx->iv, dat->block);
1027 CRYPTO_cbc128_decrypt(in, out, len, &dat->ks, ctx->iv, dat->block);
1033 const unsigned char *in, size_t len)
1039 if (len < bl)
1042 for (i = 0, len -= bl; i <= len; i += bl)
1049 const unsigned char *in, size_t len)
1053 CRYPTO_ofb128_encrypt(in, out, len, &dat->ks,
1059 const unsigned char *in, size_t len)
1063 CRYPTO_cfb128_encrypt(in, out, len, &dat->ks,
1069 const unsigned char *in, size_t len)
1073 CRYPTO_cfb128_8_encrypt(in, out, len, &dat->ks,
1079 const unsigned char *in, size_t len)
1084 CRYPTO_cfb128_1_encrypt(in, out, len, &dat->ks,
1089 while (len >= MAXBITCHUNK) {
1092 len -= MAXBITCHUNK;
1094 if (len)
1095 CRYPTO_cfb128_1_encrypt(in, out, len * 8, &dat->ks,
1102 const unsigned char *in, size_t len)
1108 CRYPTO_ctr128_encrypt_ctr32(in, out, len, &dat->ks,
1111 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks,
1237 unsigned int len = c->buf[arg - 2] << 8 | c->buf[arg - 1];
1239 len -= EVP_GCM_TLS_EXPLICIT_IV_LEN;
1242 len -= EVP_GCM_TLS_TAG_LEN;
1243 c->buf[arg - 2] = len >> 8;
1244 c->buf[arg - 1] = len & 0xff;
1356 const unsigned char *in, size_t len)
1362 || len < (EVP_GCM_TLS_EXPLICIT_IV_LEN + EVP_GCM_TLS_TAG_LEN))
1378 len -= EVP_GCM_TLS_EXPLICIT_IV_LEN + EVP_GCM_TLS_TAG_LEN;
1384 if (len >= 32 && AES_GCM_ASM(gctx)) {
1388 bulk = AES_gcm_encrypt(in, out, len,
1391 gctx->gcm.len.u[1] += bulk;
1397 len - bulk, gctx->ctr))
1402 if (len >= 32 && AES_GCM_ASM2(gctx)) {
1406 bulk = AES_gcm_encrypt(in, out, len,
1409 gctx->gcm.len.u[1] += bulk;
1413 in + bulk, out + bulk, len - bulk))
1416 out += len;
1419 rv = len + EVP_GCM_TLS_EXPLICIT_IV_LEN + EVP_GCM_TLS_TAG_LEN;
1425 if (len >= 16 && AES_GCM_ASM(gctx)) {
1429 bulk = AES_gcm_decrypt(in, out, len,
1432 gctx->gcm.len.u[1] += bulk;
1438 len - bulk, gctx->ctr))
1443 if (len >= 16 && AES_GCM_ASM2(gctx)) {
1447 bulk = AES_gcm_decrypt(in, out, len,
1450 gctx->gcm.len.u[1] += bulk;
1454 in + bulk, out + bulk, len - bulk))
1460 if (memcmp(ctx->buf, in + len, EVP_GCM_TLS_TAG_LEN)) {
1461 OPENSSL_cleanse(out, len);
1464 rv = len;
1474 const unsigned char *in, size_t len)
1482 return aes_gcm_tls_cipher(ctx, out, in, len);
1488 if (CRYPTO_gcm128_aad(&gctx->gcm, in, len))
1494 if (len >= 32 && AES_GCM_ASM(gctx)) {
1501 out + res, len - res,
1504 gctx->gcm.len.u[1] += bulk;
1511 len - bulk, gctx->ctr))
1516 if (len >= 32 && AES_GCM_ASM2(gctx)) {
1523 out + res, len - res,
1526 gctx->gcm.len.u[1] += bulk;
1531 in + bulk, out + bulk, len - bulk))
1538 if (len >= 16 && AES_GCM_ASM(gctx)) {
1545 out + res, len - res,
1548 gctx->gcm.len.u[1] += bulk;
1555 len - bulk, gctx->ctr))
1560 if (len >= 16 && AES_GCM_ASM2(gctx)) {
1567 out + res, len - res,
1570 gctx->gcm.len.u[1] += bulk;
1575 in + bulk, out + bulk, len - bulk))
1579 return len;
1724 const unsigned char *in, size_t len)
1729 if (!out || !in || len < AES_BLOCK_SIZE)
1732 (*xctx->stream) (in, out, len,
1734 else if (CRYPTO_xts128_encrypt(&xctx->xts, ctx->iv, in, out, len,
1855 const unsigned char *in, size_t len)
1866 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
1869 return len;
1872 if (!cctx->len_set && len)
1874 CRYPTO_ccm128_aad(ccm, in, len);
1875 return len;
1882 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
1887 if (cctx->str ? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len,
1889 CRYPTO_ccm128_encrypt(ccm, in, out, len))
1892 return len;
1895 if (cctx->str ? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len,
1897 !CRYPTO_ccm128_decrypt(ccm, in, out, len)) {
1901 rv = len;
1905 OPENSSL_cleanse(out, len);