aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/aesni/raw.h
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-15 02:55:10 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-15 02:55:10 +0300
commit2d67b793e64f6ed4e2e6a7c56441b9bc019e2659 (patch)
treeabc83a07b5905eec76041b3aad686c5d4117bea7 /include/aesni/raw.h
parenterror handling refactoring + more docs (diff)
downloadaes-tools-2d67b793e64f6ed4e2e6a7c56441b9bc019e2659.tar.gz
aes-tools-2d67b793e64f6ed4e2e6a7c56441b9bc019e2659.zip
code style
Diffstat (limited to 'include/aesni/raw.h')
-rw-r--r--include/aesni/raw.h56
1 files changed, 36 insertions, 20 deletions
diff --git a/include/aesni/raw.h b/include/aesni/raw.h
index 4b35266..fb29ce4 100644
--- a/include/aesni/raw.h
+++ b/include/aesni/raw.h
@@ -4,8 +4,9 @@
* \date 2015
* \copyright This file is licensed under the terms of the MIT License.
* See LICENSE.txt for details.
+ *
* \brief *Don't use.* Declares "raw" 128-bit block encryption/decryption
- * functions.
+ * functions.
*/
#pragma once
@@ -20,7 +21,7 @@
*
* * a key schedule "expansion" function to prepare for encryption,
* * a 128-bit block encryption function using the key schedule,
- * * a key schedule "reversion" function to prepare for decryption,
+ * * a key schedule "inversion" function to prepare for decryption,
* * a 128-bit block decryption function using the "inverted" key schedule.
*
* The functions, respectively, are:
@@ -49,17 +50,20 @@ extern "C"
* \brief Expands a key schedule for AES-128 encryption.
*
* \param[in] key The AES-128 key.
- * \param[out] key_schedule The AES-128 encryption key schedule. Must not be `NULL`.
+ * \param[out] key_schedule The AES-128 encryption key schedule. Must not be
+ * `NULL`.
*/
void __fastcall aesni_raw_expand_key_schedule128(
AesNI_Block128 key,
AesNI_KeySchedule128* key_schedule);
/**
- * \brief "Reverses" a key schedule for AES-128 "equivalent inverse cipher" decryption.
+ * \brief "Inverts" an AES-128 key schedule to prepare for decryption.
*
- * \param[in] key_schedule The AES-128 encryption key schedule. Must not be `NULL`.
- * \param[out] inverted_schedule The AES-128 decryption key schedule. Must not be `NULL`.
+ * \param[in] key_schedule The AES-128 encryption key schedule. Must not be
+ * `NULL`.
+ * \param[out] inverted_schedule The AES-128 decryption key schedule. Must not
+ * be `NULL`.
*/
void __fastcall aesni_raw_invert_key_schedule128(
AesNI_KeySchedule128* key_schedule,
@@ -69,7 +73,8 @@ void __fastcall aesni_raw_invert_key_schedule128(
* \brief Encrypts a 128-bit block using AES-128.
*
* \param[in] plain The plaintext to be encrypted.
- * \param[in] key_schedule The AES-128 encryption key schedule. Must not be `NULL`.
+ * \param[in] key_schedule The AES-128 encryption key schedule. Must not be
+ * `NULL`.
* \return The encrypted 128-bit ciphertext.
*/
AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
@@ -80,7 +85,8 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
* \brief Decrypts a 128-bit block using AES-128.
*
* \param[in] cipher The ciphertext to be decrypted.
- * \param[in] inverted_schedule The AES-128 decryption ("reversed") key schedule. Must not be `NULL`.
+ * \param[in] inverted_schedule The AES-128 decryption key schedule. Must not
+ * be `NULL`.
* \return The decrypted 128-bit plaintext.
*/
AesNI_Block128 __fastcall aesni_raw_decrypt_block128(
@@ -99,7 +105,8 @@ AesNI_Block128 __fastcall aesni_raw_decrypt_block128(
*
* \param[in] key_lo The least significant part of the AES-192 key.
* \param[in] key_hi The most significant part of the AES-192 key.
- * \param[out] key_schedule The AES-192 encryption key schedule. Must not be `NULL`.
+ * \param[out] key_schedule The AES-192 encryption key schedule. Must not be
+ * `NULL`.
*/
void __fastcall aesni_raw_expand_key_schedule192(
AesNI_Block128 key_lo,
@@ -107,10 +114,12 @@ void __fastcall aesni_raw_expand_key_schedule192(
AesNI_KeySchedule192* key_schedule);
/**
- * \brief "Reverses" a key schedule for AES-192 "equivalent inverse cipher" decryption.
+ * \brief "Inverts" an AES-192 key schedule to prepare for decryption.
*
- * \param[in] key_schedule The AES-192 encryption key schedule. Must not be `NULL`.
- * \param[out] inverted_schedule The AES-192 decryption key schedule. Must not be `NULL`.
+ * \param[in] key_schedule The AES-192 encryption key schedule. Must not be
+ * `NULL`.
+ * \param[out] inverted_schedule The AES-192 decryption key schedule. Must not
+ * be `NULL`.
*/
void __fastcall aesni_raw_invert_key_schedule192(
AesNI_KeySchedule192* key_schedule,
@@ -120,7 +129,8 @@ void __fastcall aesni_raw_invert_key_schedule192(
* \brief Encrypts a 128-bit block using AES-192.
*
* \param[in] plain The plaintext to be encrypted.
- * \param[in] key_schedule The AES-192 encryption key schedule. Must not be `NULL`.
+ * \param[in] key_schedule The AES-192 encryption key schedule. Must not be
+ * `NULL`.
* \return The encrypted 128-bit ciphertext.
*/
AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
@@ -131,7 +141,8 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
* \brief Decrypts a 128-bit block using AES-192.
*
* \param[in] cipher The ciphertext to be decrypted.
- * \param[in] inverted_schedule The AES-192 decryption ("reversed") key schedule. Must not be `NULL`.
+ * \param[in] inverted_schedule The AES-192 decryption key schedule. Must not
+ * be `NULL`.
* \return The decrypted 128-bit plaintext.
*/
AesNI_Block128 __fastcall aesni_raw_decrypt_block192(
@@ -150,7 +161,8 @@ AesNI_Block128 __fastcall aesni_raw_decrypt_block192(
*
* \param[in] key_lo The least significant part of the AES-256 key.
* \param[in] key_hi The most significant part of the AES-256 key.
- * \param[out] key_schedule The AES-256 encryption key schedule. Must not be `NULL`.
+ * \param[out] key_schedule The AES-256 encryption key schedule. Must not be
+ * `NULL`.
*/
void __fastcall aesni_raw_expand_key_schedule256(
AesNI_Block128 key_lo,
@@ -158,10 +170,12 @@ void __fastcall aesni_raw_expand_key_schedule256(
AesNI_KeySchedule256* key_schedule);
/**
- * \brief "Reverses" a key schedule for AES-256 "equivalent inverse cipher" decryption.
+ * \brief "Inverts" a AES-256 key schedule to prepare for decryption.
*
- * \param[in] key_schedule The AES-256 encryption key schedule. Must not be `NULL`.
- * \param[out] inverted_schedule The AES-256 decryption key schedule. Must not be `NULL`.
+ * \param[in] key_schedule The AES-256 encryption key schedule. Must not be
+ * `NULL`.
+ * \param[out] inverted_schedule The AES-256 decryption key schedule. Must not
+ * be `NULL`.
*/
void __fastcall aesni_raw_invert_key_schedule256(
AesNI_KeySchedule256* key_schedule,
@@ -171,7 +185,8 @@ void __fastcall aesni_raw_invert_key_schedule256(
* \brief Encrypts a 128-bit block using AES-256.
*
* \param[in] plain The plaintext to be encrypted.
- * \param[in] key_schedule The AES-256 encryption key schedule. Must not be `NULL`.
+ * \param[in] key_schedule The AES-256 encryption key schedule. Must not be
+ * `NULL`.
* \return The encrypted 128-bit ciphertext.
*/
AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
@@ -182,7 +197,8 @@ AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
* \brief Decrypts a 128-bit block using AES-256.
*
* \param[in] cipher The ciphertext to be decrypted.
- * \param[in] inverted_schedule The AES-256 decryption ("reversed") key schedule. Must not be `NULL`.
+ * \param[in] inverted_schedule The AES-256 decryption key schedule. Must not
+ * be `NULL`.
* \return The decrypted 128-bit plaintext.
*/
AesNI_Block128 __fastcall aesni_raw_decrypt_block256(