"Fossies" - the Fresh Open Source Software Archive

Member "src/Crypto/kuznyechik.h" (10 Oct 2018, 875 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "kuznyechik.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.21_Source_vs_1.22_Source.

    1 /*
    2 This code is written by kerukuro for cppcrypto library (http://cppcrypto.sourceforge.net/)
    3 and released into public domain.
    4 */
    5 
    6 /* Adapted to VeraCrypt */
    7 
    8 #ifndef CPPCRYPTO_KUZNYECHIK_H
    9 #define CPPCRYPTO_KUZNYECHIK_H
   10 
   11 #include "Common/Tcdefs.h"
   12 
   13 #ifdef __cplusplus
   14 extern "C" {
   15 #endif
   16 
   17 typedef struct _kuznyechik_kds
   18 {
   19     uint64 rke[20];
   20     uint64 rkd[20];
   21 } kuznyechik_kds;
   22 
   23 #define KUZNYECHIK_KS               (sizeof(kuznyechik_kds))
   24 
   25 void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
   26 void kuznyechik_encrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
   27 void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
   28 void kuznyechik_decrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
   29 void kuznyechik_set_key(const byte* key, kuznyechik_kds *kds);
   30 
   31 #ifdef __cplusplus
   32 }
   33 #endif
   34 
   35 #endif