encrypt
const BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt)
if (encrypt)
const BF_KEY *key, int encrypt)
if (encrypt)
const BF_KEY *schedule, unsigned char *ivec, int encrypt)
if (encrypt)
ctx->cipher.encrypt);
if (arg <= 0 || arg > 16 || c->encrypt)
if (arg <= 0 || arg > 16 || !c->encrypt || gctx->taglen < 0)
if (c->encrypt)
if (gctx->iv_gen == 0 || gctx->key_set == 0 || c->encrypt)
if (!c->encrypt) {
if (EVP_CIPHER_CTX_ctrl(ctx, ctx->encrypt ?
if (ctx->encrypt) {
} else if (ctx->encrypt) {
if (!ctx->encrypt) {
ctx->encrypt))
if ((c->encrypt && ptr) || (!c->encrypt && !ptr))
if (!c->encrypt || !cctx->tag_set)
if (!ctx->encrypt && !cctx->tag_set)
if (ctx->encrypt) {
ctx->encrypt);
if (ctx->encrypt)
if (ctx->encrypt && inlen < 8)
if (!ctx->encrypt && inlen < 16)
if (ctx->encrypt)
if (ctx->encrypt)
aesni_ecb_encrypt(in, out, len, ctx->cipher_data, ctx->encrypt);
ctx->encrypt);
else if (ctx->encrypt)
ctx->encrypt, dat->block);
ctx->encrypt, dat->block);
&ctx->num, ctx->encrypt, dat->block);
ctx->iv, &ctx->num, ctx->encrypt, dat->block);
ctx->iv, &ctx->num, ctx->encrypt, dat->block);
if (ctx->encrypt) {
if (ctx->encrypt) {
BF_cfb64_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
BF_ecb_encrypt(in + i, out + i, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
BF_cbc_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
BF_cbc_encrypt(in, out, (long)inl, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
Camellia_cfb128_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
Camellia_cfb128_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
Camellia_cfb128_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
Camellia_cfb1_encrypt(in, out, ((1 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? chunk * 8 : chunk), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_cfb1_encrypt(in, out, ((1 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? chunk * 8 : chunk), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_cfb1_encrypt(in, out, ((1 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? chunk * 8 : chunk), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_cfb8_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_cfb8_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_cfb8_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
CAST_cfb64_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
CAST_ecb_encrypt(in + i, out + i, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
CAST_cbc_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
CAST_cbc_encrypt(in, out, (long)inl, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
const unsigned char *iv, int encrypt)
if (ctx->encrypt && out != NULL)
if (ctx->encrypt) {
if (ctx->encrypt)
if (!ctx->encrypt)
ctx->cipher_data, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
ctx->cipher_data, (DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
(DES_cblock *)ctx->iv, ctx->encrypt);
Gost2814789_ecb_encrypt(in + i, out + i, &((EVP_GOST2814789_CTX *)ctx->cipher_data)->ks, ctx->encrypt);
Gost2814789_cfb64_encrypt(in, out, chunk, &((EVP_GOST2814789_CTX *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
idea_cbc_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
idea_cbc_encrypt(in, out, (long)inl, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
idea_cfb64_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
RC2_cbc_encrypt(in, out, (long)inl, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
RC2_cfb64_encrypt(in, out, (long)chunk, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
RC2_ecb_encrypt(in + i, out + i, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
RC2_cbc_encrypt(in, out, (long)chunk, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
if (ctx->encrypt) {
if (!ctx->encrypt) {
sm4_cfb128_encrypt(in, out, chunk, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
sm4_ecb_encrypt(in + i, out + i, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
sm4_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
sm4_cbc_encrypt(in, out, inl, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
&data(ctx)->outw, ctx->encrypt);
&data(ctx)->outw, ctx->encrypt);
ctx->encrypt = enc;
if (ctx->encrypt)
if (ctx->encrypt)
if (ctx->encrypt)
enc = ctx->encrypt;
ctx->encrypt = enc;
return ctx->encrypt;
int encrypt; /* encrypt or decrypt */
int (*encrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
if (!ctx || !ctx->pmeth || !ctx->pmeth->encrypt) {
if (!ctx || !ctx->pmeth || !ctx->pmeth->encrypt) {
return ctx->pmeth->encrypt(ctx, out, outlen, in, inlen);
ctx->pmeth->encrypt || ctx->pmeth->decrypt) ||
pmeth->encrypt = encryptfn;
.encrypt = pkey_gost01_encrypt,
IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int encrypt)
if (encrypt)
unsigned char *ivec, int *num, int encrypt)
if (encrypt)
RC2_KEY *ks, unsigned char *iv, int encrypt)
if (encrypt)
int encrypt)
if (encrypt)
int *num, int encrypt)
if (encrypt)
.encrypt = pkey_rsa_encrypt,
enc = ctx->encrypt;
if (ctx->encrypt) {
cc->encrypt = do_encrypt;
len, aadlen, authlen, cc->encrypt);
if (!cc->encrypt &&
return cc->encrypt ?
if (cc->encrypt &&
int encrypt;
int encrypt(char *, int);
bool encrypt);
int datalen __unused, const uint8_t *iv __unused, bool encrypt __unused)
bool encrypt)
if (encrypt)
bool encrypt)
encrypt ? rijndael_encrypt_wrap : rijndael_decrypt_wrap, block,
const uint8_t *iv, bool encrypt)
if (encrypt)
const uint8_t *iv, bool encrypt)
if (encrypt)
bool encrypt)
if (encrypt)
bool encrypt)
encrypt ? twofish_encrypt_wrap : twofish_decrypt_wrap, block,
bool encrypt)
if (encrypt)
bool encrypt)
encrypt ? serpent_encrypt_wrap : serpent_decrypt_wrap, block,
uint32_t flags, int len, int rate, int encrypt, bus_addr_t physaddr)
if (!encrypt)
desc->flags |= encrypt ? htole32(RT2560_TX_CIPHER_BUSY)