summaryrefslogtreecommitdiffstats
path: root/providers/implementations/include/prov/ciphercommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/include/prov/ciphercommon.h')
-rw-r--r--providers/implementations/include/prov/ciphercommon.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h
index 383b759304..7f9a4a3bf2 100644
--- a/providers/implementations/include/prov/ciphercommon.h
+++ b/providers/implementations/include/prov/ciphercommon.h
@@ -42,6 +42,13 @@ typedef int (PROV_CIPHER_HW_FN)(PROV_CIPHER_CTX *dat, unsigned char *out,
#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
struct prov_cipher_ctx_st {
+ /* place buffer at the beginning for memory alignment */
+ /* The original value of the iv */
+ unsigned char oiv[GENERIC_BLOCK_SIZE];
+ /* Buffer of partial blocks processed via update calls */
+ unsigned char buf[GENERIC_BLOCK_SIZE];
+ unsigned char iv[GENERIC_BLOCK_SIZE];
+
block128_f block;
union {
cbc128_f cbc;
@@ -83,12 +90,6 @@ struct prov_cipher_ctx_st {
* manage partial blocks themselves.
*/
unsigned int num;
-
- /* The original value of the iv */
- unsigned char oiv[GENERIC_BLOCK_SIZE];
- /* Buffer of partial blocks processed via update calls */
- unsigned char buf[GENERIC_BLOCK_SIZE];
- unsigned char iv[GENERIC_BLOCK_SIZE];
const PROV_CIPHER_HW *hw; /* hardware specific functions */
const void *ks; /* Pointer to algorithm specific key data */
OSSL_LIB_CTX *libctx;