/* Legal Notice: Some portions of the source code contained in this file were derived from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses'. Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and are governed by the TrueCrypt License 3.0 the full text of which is contained in the file License.txt included in TrueCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_PKCS5 #define TC_HEADER_PKCS5 #include "Tcdefs.h" #if defined(__cplusplus) extern "C" { #endif void hmac_sha512 (char *k, int lk, char *d, int ld, char *out, int t); void derive_u_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *u, int b); void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *dk, int dklen); void hmac_sha1 (char *k, int lk, char *d, int ld, char *out, int t); void derive_u_sha1 (char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *u, int b); void derive_key_sha1 (char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *dk, int dklen); void hmac_ripemd160 (char *key, int keylen, char *input, int len, char *digest); void derive_u_ripemd160 (BOOL bNotTest, char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *u, int b); void derive_key_ripemd160 (BOOL bNotTest, char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *dk, int dklen); void hmac_whirlpool (char *k, int lk, char *d, int ld, char *out, int t); void derive_u_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *u, int b); void derive_key_whirlpool (char *pwd, int pwd_len, char *salt, int salt_len, int iterations, char *dk, int dklen); int get_pkcs5_iteration_count (int pkcs5_prf_id, BOOL bBoot); char *get_pkcs5_prf_name (int pkcs5_prf_id); #if defined(__cplusplus) } #endif #endif // TC_HEADER_PKCS5 /VeraCrypt/log/src/Crypto/SerpentFast.h'>
path: root/src/Crypto/SerpentFast.h
blob: a5937b6ea6ccd2887cad693e8416eea02bb85a8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* Serpent
* (C) 1999-2007 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include "Common/Tcdefs.h"

#pragma once

#ifdef __cplusplus
extern "C"
{
#endif

/* userKey is always 32-bytes long */
void serpent_set_key(const unsigned __int8 userKey[], unsigned __int8 *ks);
void serpent_encrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks);
void serpent_decrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks);

#define serpent_encrypt(inBlock,outBlock,ks)	serpent_encrypt_blocks(inBlock,outBlock,1,ks)
#define serpent_decrypt(inBlock,outBlock,ks)	serpent_decrypt_blocks(inBlock,outBlock,1,ks)

#ifdef __cplusplus
}
#endif