-/* $OpenBSD: e_aes.c,v 1.43 2022/08/02 07:51:37 jsing Exp $ */
+/* $OpenBSD: e_aes.c,v 1.44 2022/08/04 08:00:11 jsing Exp $ */
/* ====================================================================
* Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved.
*
return 1;
}
-#define aesni_ofb_cipher aes_ofb_cipher
-static int aesni_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
-#define aesni_cfb_cipher aes_cfb_cipher
-static int aesni_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
-#define aesni_cfb8_cipher aes_cfb8_cipher
-static int aesni_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
-#define aesni_cfb1_cipher aes_cfb1_cipher
-static int aesni_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
-#define aesni_ctr_cipher aes_ctr_cipher
-static int aesni_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
static int
aesni_gcm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
return 1;
}
-#define aesni_gcm_cipher aes_gcm_cipher
-static int aesni_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
static int
aesni_xts_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
return 1;
}
-#define aesni_xts_cipher aes_xts_cipher
-static int aesni_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
static int
aesni_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
return 1;
}
-#define aesni_ccm_cipher aes_ccm_cipher
-static int aesni_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, size_t len);
-
#endif
static int
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_OFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_ofb_cipher,
+ .do_cipher = aes_ofb_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb_cipher,
+ .do_cipher = aes_cfb_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb1_cipher,
+ .do_cipher = aes_cfb1_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb8_cipher,
+ .do_cipher = aes_cfb8_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CTR_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_ctr_cipher,
+ .do_cipher = aes_ctr_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_OFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_ofb_cipher,
+ .do_cipher = aes_ofb_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb_cipher,
+ .do_cipher = aes_cfb_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb1_cipher,
+ .do_cipher = aes_cfb1_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb8_cipher,
+ .do_cipher = aes_cfb8_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CTR_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_ctr_cipher,
+ .do_cipher = aes_ctr_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_OFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_ofb_cipher,
+ .do_cipher = aes_ofb_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1 | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb_cipher,
+ .do_cipher = aes_cfb_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb1_cipher,
+ .do_cipher = aes_cfb1_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CFB_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_cfb8_cipher,
+ .do_cipher = aes_cfb8_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS | EVP_CIPH_CTR_MODE,
.init = aesni_init_key,
- .do_cipher = aesni_ctr_cipher,
+ .do_cipher = aes_ctr_cipher,
.ctx_size = sizeof(EVP_AES_KEY),
};
#endif
.iv_len = 12,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_AEAD_CIPHER|CUSTOM_FLAGS | EVP_CIPH_GCM_MODE,
.init = aesni_gcm_init_key,
- .do_cipher = aesni_gcm_cipher,
+ .do_cipher = aes_gcm_cipher,
.cleanup = aes_gcm_cleanup,
.ctx_size = sizeof(EVP_AES_GCM_CTX),
.ctrl = aes_gcm_ctrl,
.iv_len = 12,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_AEAD_CIPHER|CUSTOM_FLAGS | EVP_CIPH_GCM_MODE,
.init = aesni_gcm_init_key,
- .do_cipher = aesni_gcm_cipher,
+ .do_cipher = aes_gcm_cipher,
.cleanup = aes_gcm_cleanup,
.ctx_size = sizeof(EVP_AES_GCM_CTX),
.ctrl = aes_gcm_ctrl,
.iv_len = 12,
.flags = EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_AEAD_CIPHER|CUSTOM_FLAGS | EVP_CIPH_GCM_MODE,
.init = aesni_gcm_init_key,
- .do_cipher = aesni_gcm_cipher,
+ .do_cipher = aes_gcm_cipher,
.cleanup = aes_gcm_cleanup,
.ctx_size = sizeof(EVP_AES_GCM_CTX),
.ctrl = aes_gcm_ctrl,
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|XTS_FLAGS | EVP_CIPH_XTS_MODE,
.init = aesni_xts_init_key,
- .do_cipher = aesni_xts_cipher,
+ .do_cipher = aes_xts_cipher,
.cleanup = aes_xts_cleanup,
.ctx_size = sizeof(EVP_AES_XTS_CTX),
.ctrl = aes_xts_ctrl,
.iv_len = 16,
.flags = EVP_CIPH_FLAG_FIPS|XTS_FLAGS | EVP_CIPH_XTS_MODE,
.init = aesni_xts_init_key,
- .do_cipher = aesni_xts_cipher,
+ .do_cipher = aes_xts_cipher,
.cleanup = aes_xts_cleanup,
.ctx_size = sizeof(EVP_AES_XTS_CTX),
.ctrl = aes_xts_ctrl,
.iv_len = 12,
.flags = EVP_CIPH_FLAG_FIPS|CUSTOM_FLAGS | EVP_CIPH_CCM_MODE,
.init = aesni_ccm_init_key,
- .do_cipher = aesni_ccm_cipher,
+ .do_cipher = aes_ccm_cipher,
.cleanup = aes_ccm_cleanup,
.ctx_size = sizeof(EVP_AES_CCM_CTX),
.ctrl = aes_ccm_ctrl,
.iv_len = 12,
.flags = EVP_CIPH_FLAG_FIPS|CUSTOM_FLAGS | EVP_CIPH_CCM_MODE,
.init = aesni_ccm_init_key,
- .do_cipher = aesni_ccm_cipher,
+ .do_cipher = aes_ccm_cipher,
.cleanup = aes_ccm_cleanup,
.ctx_size = sizeof(EVP_AES_CCM_CTX),
.ctrl = aes_ccm_ctrl,
.iv_len = 12,
.flags = EVP_CIPH_FLAG_FIPS|CUSTOM_FLAGS | EVP_CIPH_CCM_MODE,
.init = aesni_ccm_init_key,
- .do_cipher = aesni_ccm_cipher,
+ .do_cipher = aes_ccm_cipher,
.cleanup = aes_ccm_cleanup,
.ctx_size = sizeof(EVP_AES_CCM_CTX),
.ctrl = aes_ccm_ctrl,