aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--include/aesni/raw.h18
-rw-r--r--src/c/aes128.c6
-rw-r--r--src/c/aes192.c6
-rw-r--r--src/c/aes256.c6
4 files changed, 18 insertions, 18 deletions
diff --git a/include/aesni/raw.h b/include/aesni/raw.h
index fb29ce4..03a89e4 100644
--- a/include/aesni/raw.h
+++ b/include/aesni/raw.h
@@ -66,7 +66,7 @@ void __fastcall aesni_raw_expand_key_schedule128(
* be `NULL`.
*/
void __fastcall aesni_raw_invert_key_schedule128(
- AesNI_KeySchedule128* key_schedule,
+ const AesNI_KeySchedule128* key_schedule,
AesNI_KeySchedule128* inverted_schedule);
/**
@@ -79,7 +79,7 @@ void __fastcall aesni_raw_invert_key_schedule128(
*/
AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
AesNI_Block128 plain,
- AesNI_KeySchedule128* key_schedule);
+ const AesNI_KeySchedule128* key_schedule);
/**
* \brief Decrypts a 128-bit block using AES-128.
@@ -91,7 +91,7 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
*/
AesNI_Block128 __fastcall aesni_raw_decrypt_block128(
AesNI_Block128 cipher,
- AesNI_KeySchedule128* inverted_schedule);
+ const AesNI_KeySchedule128* inverted_schedule);
/**
* \}
@@ -122,7 +122,7 @@ void __fastcall aesni_raw_expand_key_schedule192(
* be `NULL`.
*/
void __fastcall aesni_raw_invert_key_schedule192(
- AesNI_KeySchedule192* key_schedule,
+ const AesNI_KeySchedule192* key_schedule,
AesNI_KeySchedule192* inverted_schedule);
/**
@@ -135,7 +135,7 @@ void __fastcall aesni_raw_invert_key_schedule192(
*/
AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
AesNI_Block128 plain,
- AesNI_KeySchedule192* key_schedule);
+ const AesNI_KeySchedule192* key_schedule);
/**
* \brief Decrypts a 128-bit block using AES-192.
@@ -147,7 +147,7 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
*/
AesNI_Block128 __fastcall aesni_raw_decrypt_block192(
AesNI_Block128 cipher,
- AesNI_KeySchedule192* inverted_schedule);
+ const AesNI_KeySchedule192* inverted_schedule);
/**
* \}
@@ -178,7 +178,7 @@ void __fastcall aesni_raw_expand_key_schedule256(
* be `NULL`.
*/
void __fastcall aesni_raw_invert_key_schedule256(
- AesNI_KeySchedule256* key_schedule,
+ const AesNI_KeySchedule256* key_schedule,
AesNI_KeySchedule256* inverted_schedule);
/**
@@ -191,7 +191,7 @@ void __fastcall aesni_raw_invert_key_schedule256(
*/
AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
AesNI_Block128 plain,
- AesNI_KeySchedule256* key_schedule);
+ const AesNI_KeySchedule256* key_schedule);
/**
* \brief Decrypts a 128-bit block using AES-256.
@@ -203,7 +203,7 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
*/
AesNI_Block128 __fastcall aesni_raw_decrypt_block256(
AesNI_Block128 cipher,
- AesNI_KeySchedule256* inverted_schedule);
+ const AesNI_KeySchedule256* inverted_schedule);
/**
* \}
diff --git a/src/c/aes128.c b/src/c/aes128.c
index ac1b4f5..92bc4a6 100644
--- a/src/c/aes128.c
+++ b/src/c/aes128.c
@@ -13,7 +13,7 @@
AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
AesNI_Block128 plain,
- AesNI_KeySchedule128* key_schedule)
+ const AesNI_KeySchedule128* key_schedule)
{
plain = _mm_xor_si128(plain, key_schedule->keys[0]);
plain = _mm_aesenc_si128(plain, key_schedule->keys[1]);
@@ -30,7 +30,7 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
AesNI_Block128 __fastcall aesni_raw_decrypt_block128(
AesNI_Block128 cipher,
- AesNI_KeySchedule128* inverted_schedule)
+ const AesNI_KeySchedule128* inverted_schedule)
{
cipher = _mm_xor_si128(cipher, inverted_schedule->keys[0]);
cipher = _mm_aesdec_si128(cipher, inverted_schedule->keys[1]);
@@ -82,7 +82,7 @@ void __fastcall aesni_raw_expand_key_schedule128(
}
void __fastcall aesni_raw_invert_key_schedule128(
- AesNI_KeySchedule128* key_schedule,
+ const AesNI_KeySchedule128* key_schedule,
AesNI_KeySchedule128* inverted_schedule)
{
inverted_schedule->keys[0] = key_schedule->keys[10];
diff --git a/src/c/aes192.c b/src/c/aes192.c
index c0d410a..b3a7e9f 100644
--- a/src/c/aes192.c
+++ b/src/c/aes192.c
@@ -13,7 +13,7 @@
AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
AesNI_Block128 plain,
- AesNI_KeySchedule192* key_schedule)
+ const AesNI_KeySchedule192* key_schedule)
{
plain = _mm_xor_si128(plain, key_schedule->keys[0]);
plain = _mm_aesenc_si128(plain, key_schedule->keys[1]);
@@ -32,7 +32,7 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
AesNI_Block128 __fastcall aesni_raw_decrypt_block192(
AesNI_Block128 cipher,
- AesNI_KeySchedule192* inverted_schedule)
+ const AesNI_KeySchedule192* inverted_schedule)
{
cipher = _mm_xor_si128(cipher, inverted_schedule->keys[0]);
cipher = _mm_aesdec_si128(cipher, inverted_schedule->keys[1]);
@@ -115,7 +115,7 @@ void __fastcall aesni_raw_expand_key_schedule192(
}
void __fastcall aesni_raw_invert_key_schedule192(
- AesNI_KeySchedule192* key_schedule,
+ const AesNI_KeySchedule192* key_schedule,
AesNI_KeySchedule192* inverted_schedule)
{
inverted_schedule->keys[0] = key_schedule->keys[12];
diff --git a/src/c/aes256.c b/src/c/aes256.c
index a9042c6..cd48d0d 100644
--- a/src/c/aes256.c
+++ b/src/c/aes256.c
@@ -13,7 +13,7 @@
AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
AesNI_Block128 plain,
- AesNI_KeySchedule256* key_schedule)
+ const AesNI_KeySchedule256* key_schedule)
{
plain = _mm_xor_si128(plain, key_schedule->keys[0]);
plain = _mm_aesenc_si128(plain, key_schedule->keys[1]);
@@ -34,7 +34,7 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
AesNI_Block128 __fastcall aesni_raw_decrypt_block256(
AesNI_Block128 cipher,
- AesNI_KeySchedule256* inverted_schedule)
+ const AesNI_KeySchedule256* inverted_schedule)
{
cipher = _mm_xor_si128(cipher, inverted_schedule->keys[0]);
cipher = _mm_aesdec_si128(cipher, inverted_schedule->keys[1]);
@@ -141,7 +141,7 @@ void __fastcall aesni_raw_expand_key_schedule256(
}
void __fastcall aesni_raw_invert_key_schedule256(
- AesNI_KeySchedule256* key_schedule,
+ const AesNI_KeySchedule256* key_schedule,
AesNI_KeySchedule256* inverted_schedule)
{
inverted_schedule->keys[0] = key_schedule->keys[14];