diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-21 13:33:50 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-21 13:33:50 +0300 |
commit | 351c5188013fff041c7217aed64478cfc7643480 (patch) | |
tree | c918b5093ac45394439f3dff30da37b809173603 /include/aes/box_data.h | |
parent | cmake: install libraries & their headers (diff) | |
download | aes-tools-351c5188013fff041c7217aed64478cfc7643480.tar.gz aes-tools-351c5188013fff041c7217aed64478cfc7643480.zip |
restructure the project
Diffstat (limited to 'include/aes/box_data.h')
-rw-r--r-- | include/aes/box_data.h | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/include/aes/box_data.h b/include/aes/box_data.h deleted file mode 100644 index e2315eb..0000000 --- a/include/aes/box_data.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2015 Egor Tensin <Egor.Tensin@gmail.com> -// This file is part of the "AES tools" project. -// For details, see https://github.com/egor-tensin/aes-tools. -// Distributed under the MIT License. - -#pragma once - -#include "aes.h" -#include "error.h" -#include "mode.h" - -#include <stdlib.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -typedef union -{ - AES_AES128_Key aes128_key; - AES_AES192_Key aes192_key; - AES_AES256_Key aes256_key; -} -AES_BoxKey; - -typedef union -{ - AES_AES128_RoundKeys aes128_encryption_keys; - AES_AES192_RoundKeys aes192_encryption_keys; - AES_AES256_RoundKeys aes256_encryption_keys; -} -AES_BoxEncryptionRoundKeys; - -typedef union -{ - AES_AES128_RoundKeys aes128_decryption_keys; - AES_AES192_RoundKeys aes192_decryption_keys; - AES_AES256_RoundKeys aes256_decryption_keys; -} -AES_BoxDecryptionRoundKeys; - -typedef union -{ - AES_AES128_KeyString aes128; - AES_AES192_KeyString aes192; - AES_AES256_KeyString aes256; -} -AES_BoxKeyString; - -typedef union -{ - AES_AES_Block aes_block; -} -AES_BoxBlock; - -typedef union -{ - AES_AES_BlockString aes; -} -AES_BoxBlockString; - -typedef AES_StatusCode (*AES_BoxCalculateRoundKeys)( - const AES_BoxKey* params, - AES_BoxEncryptionRoundKeys*, - AES_BoxDecryptionRoundKeys*, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxParseBlock)( - AES_BoxBlock* dest, - const char* src, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxParseKey)( - AES_BoxKey* dest, - const char* src, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxFormatBlock)( - AES_BoxBlockString* dest, - const AES_BoxBlock* src, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxFormatKey)( - AES_BoxKeyString* dest, - const AES_BoxKey* src, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxEncryptBlock)( - const AES_BoxBlock* plaintext, - const AES_BoxEncryptionRoundKeys* params, - AES_BoxBlock* ciphertext, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxDecryptBlock)( - const AES_BoxBlock* ciphertext, - const AES_BoxDecryptionRoundKeys* params, - AES_BoxBlock* plaintext, - AES_ErrorDetails* err_details); - -typedef AES_StatusCode (*AES_BoxXorBlock)( - AES_BoxBlock*, - const AES_BoxBlock*, - AES_ErrorDetails*); - -typedef AES_StatusCode (*AES_BoxIncBlock)( - AES_BoxBlock*, - AES_ErrorDetails*); - -typedef AES_StatusCode (*AES_BoxGetBlockSize)( - size_t*, - AES_ErrorDetails*); - -typedef AES_StatusCode (*AES_BoxStoreBlock)( - void*, - const AES_BoxBlock*, - AES_ErrorDetails*); - -typedef AES_StatusCode (*AES_BoxLoadBlock)( - AES_BoxBlock*, - const void*, - AES_ErrorDetails*); - -typedef struct -{ - AES_BoxCalculateRoundKeys calc_round_keys; - AES_BoxParseBlock parse_block; - AES_BoxParseKey parse_key; - AES_BoxFormatBlock format_block; - AES_BoxFormatKey format_key; - AES_BoxEncryptBlock encrypt_block; - AES_BoxDecryptBlock decrypt_block; - AES_BoxXorBlock xor_block; - AES_BoxIncBlock inc_block; - AES_BoxGetBlockSize get_block_size; - AES_BoxStoreBlock store_block; - AES_BoxLoadBlock load_block; -} -AES_BoxAlgorithmInterface; - -typedef struct -{ - const AES_BoxAlgorithmInterface* algorithm; - AES_BoxEncryptionRoundKeys encryption_keys; - AES_BoxDecryptionRoundKeys decryption_keys; - AES_Mode mode; - AES_BoxBlock iv; -} -AES_Box; - -#ifdef __cplusplus -} -#endif |