aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/aesni/raw.h
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
commit0651133db30c0932877780c2f98901e4ca1072e1 (patch)
tree2b87823b4b9f4b5a75affa4b1606abb06a598c97 /include/aesni/raw.h
parentfactor out 128-bit XORing (diff)
downloadaes-tools-0651133db30c0932877780c2f98901e4ca1072e1.tar.gz
aes-tools-0651133db30c0932877780c2f98901e4ca1072e1.zip
refactoring
Diffstat (limited to '')
-rw-r--r--include/aesni/raw.h218
1 files changed, 0 insertions, 218 deletions
diff --git a/include/aesni/raw.h b/include/aesni/raw.h
deleted file mode 100644
index 03a89e4..0000000
--- a/include/aesni/raw.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * \file
- * \author Egor Tensin <Egor.Tensin@gmail.com>
- * \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.
- */
-
-#pragma once
-
-/**
- * \defgroup aesni_raw_api Raw API
- * \brief *Don't use.* "Raw" 128-bit block encryption/decryption functions.
- * \ingroup aesni
- * \{
- *
- * For each of AES-128/192/256, four functions are defined:
- *
- * * a key schedule "expansion" function to prepare for encryption,
- * * a 128-bit block encryption function using the key schedule,
- * * a key schedule "inversion" function to prepare for decryption,
- * * a 128-bit block decryption function using the "inverted" key schedule.
- *
- * The functions, respectively, are:
- *
- * * `aesni_raw_expand_key_scheduleNNN`,
- * * `aesni_raw_encrypt_blockNNN`,
- * * `aesni_raw_invert_key_scheduleNNN`,
- * * `aesni_raw_decrypt_blockNNN`,
- *
- * where `NNN` is key length (either `128`, `192` or `256`).
- */
-
-#include "data.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- * \defgroup aesni_raw_api_aes128 AES-128
- * \{
- */
-
-/**
- * \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`.
- */
-void __fastcall aesni_raw_expand_key_schedule128(
- AesNI_Block128 key,
- AesNI_KeySchedule128* key_schedule);
-
-/**
- * \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`.
- */
-void __fastcall aesni_raw_invert_key_schedule128(
- const AesNI_KeySchedule128* key_schedule,
- AesNI_KeySchedule128* inverted_schedule);
-
-/**
- * \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`.
- * \return The encrypted 128-bit ciphertext.
- */
-AesNI_Block128 __fastcall aesni_raw_encrypt_block128(
- AesNI_Block128 plain,
- const AesNI_KeySchedule128* key_schedule);
-
-/**
- * \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 key schedule. Must not
- * be `NULL`.
- * \return The decrypted 128-bit plaintext.
- */
-AesNI_Block128 __fastcall aesni_raw_decrypt_block128(
- AesNI_Block128 cipher,
- const AesNI_KeySchedule128* inverted_schedule);
-
-/**
- * \}
- *
- * \defgroup aesni_raw_api_aes192 AES-192
- * \{
- */
-
-/**
- * \brief Expands a key schedule for AES-192 encryption.
- *
- * \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`.
- */
-void __fastcall aesni_raw_expand_key_schedule192(
- AesNI_Block128 key_lo,
- AesNI_Block128 key_hi,
- AesNI_KeySchedule192* key_schedule);
-
-/**
- * \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`.
- */
-void __fastcall aesni_raw_invert_key_schedule192(
- const AesNI_KeySchedule192* key_schedule,
- AesNI_KeySchedule192* inverted_schedule);
-
-/**
- * \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`.
- * \return The encrypted 128-bit ciphertext.
- */
-AesNI_Block128 __fastcall aesni_raw_encrypt_block192(
- AesNI_Block128 plain,
- const AesNI_KeySchedule192* key_schedule);
-
-/**
- * \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 key schedule. Must not
- * be `NULL`.
- * \return The decrypted 128-bit plaintext.
- */
-AesNI_Block128 __fastcall aesni_raw_decrypt_block192(
- AesNI_Block128 cipher,
- const AesNI_KeySchedule192* inverted_schedule);
-
-/**
- * \}
- *
- * \defgroup aesni_raw_api_aes256 AES-256
- * \{
- */
-
-/**
- * \brief Expands a key schedule for AES-256 encryption.
- *
- * \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`.
- */
-void __fastcall aesni_raw_expand_key_schedule256(
- AesNI_Block128 key_lo,
- AesNI_Block128 key_hi,
- AesNI_KeySchedule256* key_schedule);
-
-/**
- * \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`.
- */
-void __fastcall aesni_raw_invert_key_schedule256(
- const AesNI_KeySchedule256* key_schedule,
- AesNI_KeySchedule256* inverted_schedule);
-
-/**
- * \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`.
- * \return The encrypted 128-bit ciphertext.
- */
-AesNI_Block128 __fastcall aesni_raw_encrypt_block256(
- AesNI_Block128 plain,
- const AesNI_KeySchedule256* key_schedule);
-
-/**
- * \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 key schedule. Must not
- * be `NULL`.
- * \return The decrypted 128-bit plaintext.
- */
-AesNI_Block128 __fastcall aesni_raw_decrypt_block256(
- AesNI_Block128 cipher,
- const AesNI_KeySchedule256* inverted_schedule);
-
-/**
- * \}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-/**
- * \}
- */