"Fossies" - the Fresh Open Source Software Archive

Member "src/Crypto/SerpentFast.h" (10 Oct 2018, 754 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 "SerpentFast.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 * Serpent
    3 * (C) 1999-2007 Jack Lloyd
    4 *
    5 * Botan is released under the Simplified BSD License (see license.txt)
    6 */
    7 
    8 #include "Common/Tcdefs.h"
    9 
   10 #pragma once
   11 
   12 #ifdef __cplusplus
   13 extern "C"
   14 {
   15 #endif
   16 
   17 /* userKey is always 32-bytes long */
   18 void serpent_set_key(const unsigned __int8 userKey[], unsigned __int8 *ks);
   19 void serpent_encrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks);
   20 void serpent_decrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks);
   21 
   22 #define serpent_encrypt(inBlock,outBlock,ks)    serpent_encrypt_blocks(inBlock,outBlock,1,ks)
   23 #define serpent_decrypt(inBlock,outBlock,ks)    serpent_decrypt_blocks(inBlock,outBlock,1,ks)
   24 
   25 #ifdef __cplusplus
   26 }
   27 #endif
   28