Lines Matching defs:out
69 unsigned char *out, size_t length,
180 static int aesni_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
183 aesni_cbc_encrypt(in, out, len, &EVP_C_DATA(EVP_AES_KEY,ctx)->ks.ks,
189 static int aesni_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
197 aesni_ecb_encrypt(in, out, len, &EVP_C_DATA(EVP_AES_KEY,ctx)->ks.ks,
204 static int aesni_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
208 static int aesni_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
212 static int aesni_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
216 static int aesni_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
220 static int aesni_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
257 static int aesni_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
311 static int aesni_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
337 static int aesni_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
392 static int aesni_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
519 static int aes_t4_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
523 static int aes_t4_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
527 static int aes_t4_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
531 static int aes_t4_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
535 static int aes_t4_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
539 static int aes_t4_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
543 static int aes_t4_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
593 static int aes_t4_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
666 static int aes_t4_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
691 static int aes_t4_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
745 static int aes_t4_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
966 static int s390x_aes_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
984 static int s390x_aes_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
989 s390x_km(in, len, out, cctx->fc, &cctx->km.param);
1009 static int s390x_aes_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1020 *out = *in ^ cctx->kmo.param.cv[n];
1024 ++out;
1031 s390x_kmo(in, len, out, cctx->fc, &cctx->kmo.param);
1033 out += len;
1042 out[n] = in[n] ^ cctx->kmo.param.cv[n];
1072 static int s390x_aes_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1087 *out = cctx->kmf.param.cv[n] ^ tmp;
1088 cctx->kmf.param.cv[n] = enc ? *out : tmp;
1092 ++out;
1099 s390x_kmf(in, len, out, cctx->fc, &cctx->kmf.param);
1101 out += len;
1111 out[n] = cctx->kmf.param.cv[n] ^ tmp;
1112 cctx->kmf.param.cv[n] = enc ? out[n] : tmp;
1141 static int s390x_aes_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1149 s390x_kmf(in, len, out, cctx->fc, &cctx->kmf.param);
1157 static int s390x_aes_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1165 static int s390x_aes_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1230 unsigned char *out, size_t len)
1267 *out = buf.b[n];
1269 ++out;
1281 s390x_kma(ctx->ares, ctx->areslen, in, len, out,
1284 out += len;
1306 out[i] = in[i] ^ ctx->kres[n + i];
1356 EVP_CIPHER_CTX *out;
1499 out = ptr;
1500 gctx_out = EVP_C_DATA(S390X_AES_GCM_CTX, out);
1503 gctx_out->iv = out->iv;
1566 static int s390x_aes_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1574 if (out != in || len < (EVP_GCM_TLS_EXPLICIT_IV_LEN + EVP_GCM_TLS_TAG_LEN))
1590 EVP_GCM_TLS_EXPLICIT_IV_LEN, out) <= 0)
1594 out += EVP_GCM_TLS_EXPLICIT_IV_LEN;
1599 s390x_kma(buf, gctx->tls_aad_len, in, len, out,
1603 memcpy(out + len, gctx->kma.param.t.b, EVP_GCM_TLS_TAG_LEN);
1608 OPENSSL_cleanse(out, len);
1625 static int s390x_aes_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1636 return s390x_aes_gcm_tls_cipher(ctx, out, in, len);
1642 if (out == NULL) {
1646 if (s390x_aes_gcm(gctx, in, out, len))
1696 static int s390x_aes_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1785 unsigned char *out, size_t len, int enc)
1840 CRYPTO_ctr128_encrypt_ctr32(in, out, len + rem, &ctx->aes.key.k,
1845 CRYPTO_ctr128_encrypt_ctr32(in, out, len + rem, &ctx->aes.key.k,
1850 s390x_kmac(out, len, ctx->aes.ccm.fc, &ctx->aes.ccm.kmac_param);
1853 ctx->aes.ccm.kmac_param.icv.b[i] ^= out[len + i];
1877 static int s390x_aes_ccm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1885 if (out != in
1891 memcpy(out, buf, EVP_CCM_TLS_EXPLICIT_IV_LEN);
1906 out += EVP_CCM_TLS_EXPLICIT_IV_LEN;
1909 if (s390x_aes_ccm(cctx, in, out, len, enc))
1912 memcpy(out + len, cctx->aes.ccm.kmac_param.icv.b, cctx->aes.ccm.m);
1915 if (!s390x_aes_ccm(cctx, in, out, len, enc)) {
1921 OPENSSL_cleanse(out, len);
1970 static int s390x_aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
1982 return s390x_aes_ccm_tls_cipher(ctx, out, in, len);
1989 if (in == NULL && out != NULL)
1995 if (out == NULL) {
2029 if (s390x_aes_ccm(cctx, in, out, len, enc))
2037 if (!s390x_aes_ccm(cctx, in, out, len, enc)) {
2045 OPENSSL_cleanse(out, len);
2178 static int s390x_aes_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2421 static int aes_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2427 (*dat->stream.cbc) (in, out, len, &dat->ks, ctx->iv,
2430 CRYPTO_cbc128_encrypt(in, out, len, &dat->ks, ctx->iv,
2433 CRYPTO_cbc128_decrypt(in, out, len, &dat->ks,
2439 static int aes_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2450 (*dat->block) (in + i, out + i, &dat->ks);
2455 static int aes_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2461 CRYPTO_ofb128_encrypt(in, out, len, &dat->ks,
2467 static int aes_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2473 CRYPTO_cfb128_encrypt(in, out, len, &dat->ks,
2480 static int aes_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2486 CRYPTO_cfb128_8_encrypt(in, out, len, &dat->ks,
2493 static int aes_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2500 CRYPTO_cfb128_1_encrypt(in, out, len, &dat->ks,
2509 CRYPTO_cfb128_1_encrypt(in, out, MAXBITCHUNK * 8, &dat->ks,
2514 out += MAXBITCHUNK;
2519 CRYPTO_cfb128_1_encrypt(in, out, len * 8, &dat->ks,
2528 static int aes_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2540 CRYPTO_ctr128_encrypt_ctr32(in, out, len, &dat->ks,
2545 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks,
2685 EVP_CIPHER_CTX *out = ptr;
2686 EVP_AES_GCM_CTX *gctx_out = EVP_C_DATA(EVP_AES_GCM_CTX,out);
2693 gctx_out->iv = out->iv;
2790 static int aes_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2796 if (out != in
2817 EVP_GCM_TLS_EXPLICIT_IV_LEN, out) <= 0)
2824 out += EVP_GCM_TLS_EXPLICIT_IV_LEN;
2835 bulk = AES_gcm_encrypt(in, out, len,
2843 out + bulk,
2853 bulk = AES_gcm_encrypt(in, out, len,
2860 in + bulk, out + bulk, len - bulk))
2863 out += len;
2865 CRYPTO_gcm128_tag(&gctx->gcm, out, EVP_GCM_TLS_TAG_LEN);
2876 bulk = AES_gcm_decrypt(in, out, len,
2884 out + bulk,
2894 bulk = AES_gcm_decrypt(in, out, len,
2901 in + bulk, out + bulk, len - bulk))
2908 OPENSSL_cleanse(out, len);
2944 static int aes_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
2954 return aes_gcm_tls_cipher(ctx, out, in, len);
2976 if (out == NULL) {
2986 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, res))
2990 out + res, len - res,
2999 out + bulk,
3008 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, res))
3012 out + res, len - res,
3020 in + bulk, out + bulk, len - bulk))
3030 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, res))
3034 out + res, len - res,
3043 out + bulk,
3052 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, res))
3056 out + res, len - res,
3064 in + bulk, out + bulk, len - bulk))
3104 EVP_CIPHER_CTX *out = ptr;
3105 EVP_AES_XTS_CTX *xctx_out = EVP_C_DATA(EVP_AES_XTS_CTX,out);
3238 static int aes_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
3245 || out == NULL
3262 (*xctx->stream) (in, out, len,
3265 else if (CRYPTO_xts128_encrypt(&xctx->xts, ctx->iv, in, out, len,
3365 EVP_CIPHER_CTX *out = ptr;
3366 EVP_AES_CCM_CTX *cctx_out = EVP_C_DATA(EVP_AES_CCM_CTX,out);
3428 static int aes_ccm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
3434 if (out != in || len < (EVP_CCM_TLS_EXPLICIT_IV_LEN + (size_t)cctx->M))
3438 memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx),
3453 out += EVP_CCM_TLS_EXPLICIT_IV_LEN;
3455 if (cctx->str ? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len,
3457 CRYPTO_ccm128_encrypt(ccm, in, out, len))
3459 if (!CRYPTO_ccm128_tag(ccm, out + len, cctx->M))
3463 if (cctx->str ? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len,
3465 !CRYPTO_ccm128_decrypt(ccm, in, out, len)) {
3472 OPENSSL_cleanse(out, len);
3477 static int aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
3487 return aes_ccm_tls_cipher(ctx, out, in, len);
3490 if (in == NULL && out != NULL)
3496 if (!out) {
3522 if (cctx->str ? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len,
3524 CRYPTO_ccm128_encrypt(ccm, in, out, len))
3530 if (cctx->str ? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len,
3532 !CRYPTO_ccm128_decrypt(ccm, in, out, len)) {
3541 OPENSSL_cleanse(out, len);
3594 static int aes_wrap_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
3613 if (ossl_is_partially_overlapping(out, in, inlen)) {
3617 if (!out) {
3636 out, in, inlen,
3640 out, in, inlen,
3645 out, in, inlen, (block128_f) AES_encrypt);
3648 out, in, inlen, (block128_f) AES_decrypt);
3887 static int aes_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
3912 if (out == NULL) {
3919 if (ossl_is_partially_overlapping(out + *buf_len, in, len)) {
3945 if (out == NULL) {
3949 if (!CRYPTO_ocb128_encrypt(&octx->ocb, buf, out,
3953 if (!CRYPTO_ocb128_decrypt(&octx->ocb, buf, out,
3959 if (out != NULL)
3960 out += AES_BLOCK_SIZE;
3970 if (out == NULL) {
3975 (&octx->ocb, in, out, len - trailing_len))
3979 (&octx->ocb, in, out, len - trailing_len))
4000 if (!CRYPTO_ocb128_encrypt(&octx->ocb, octx->data_buf, out,
4004 if (!CRYPTO_ocb128_decrypt(&octx->ocb, octx->data_buf, out,