Mercurial > dropbear
comparison libtomcrypt/src/headers/tomcrypt.h @ 302:973fccb59ea4 ucc-axis-hack
propagate from branch 'au.asn.ucc.matt.dropbear' (head 11034278bd1917bebcbdc69cf53b1891ce9db121)
to branch 'au.asn.ucc.matt.dropbear.ucc-axis-hack' (head 10a1f614fec73d0820c3f61160d9db409b9beb46)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 25 Mar 2006 12:59:58 +0000 |
parents | 1b9e69c058d2 |
children | e66eec4dcba7 0cbe8f6dbf9e |
comparison
equal
deleted
inserted
replaced
299:740e782679be | 302:973fccb59ea4 |
---|---|
1 #ifndef TOMCRYPT_H_ | |
2 #define TOMCRYPT_H_ | |
3 #include <assert.h> | |
4 #include <stdio.h> | |
5 #include <string.h> | |
6 #include <stdlib.h> | |
7 #include <time.h> | |
8 #include <ctype.h> | |
9 #include <limits.h> | |
10 | |
11 /* use configuration data */ | |
12 #include <tomcrypt_custom.h> | |
13 | |
14 #ifdef __cplusplus | |
15 extern "C" { | |
16 #endif | |
17 | |
18 /* version */ | |
19 #define CRYPT 0x0105 | |
20 #define SCRYPT "1.05" | |
21 | |
22 /* max size of either a cipher/hash block or symmetric key [largest of the two] */ | |
23 #define MAXBLOCKSIZE 128 | |
24 | |
25 /* descriptor table size */ | |
26 /* Dropbear change - this should be smaller, saves some size */ | |
27 #define TAB_SIZE 4 | |
28 | |
29 /* error codes [will be expanded in future releases] */ | |
30 enum { | |
31 CRYPT_OK=0, /* Result OK */ | |
32 CRYPT_ERROR, /* Generic Error */ | |
33 CRYPT_NOP, /* Not a failure but no operation was performed */ | |
34 | |
35 CRYPT_INVALID_KEYSIZE, /* Invalid key size given */ | |
36 CRYPT_INVALID_ROUNDS, /* Invalid number of rounds */ | |
37 CRYPT_FAIL_TESTVECTOR, /* Algorithm failed test vectors */ | |
38 | |
39 CRYPT_BUFFER_OVERFLOW, /* Not enough space for output */ | |
40 CRYPT_INVALID_PACKET, /* Invalid input packet given */ | |
41 | |
42 CRYPT_INVALID_PRNGSIZE, /* Invalid number of bits for a PRNG */ | |
43 CRYPT_ERROR_READPRNG, /* Could not read enough from PRNG */ | |
44 | |
45 CRYPT_INVALID_CIPHER, /* Invalid cipher specified */ | |
46 CRYPT_INVALID_HASH, /* Invalid hash specified */ | |
47 CRYPT_INVALID_PRNG, /* Invalid PRNG specified */ | |
48 | |
49 CRYPT_MEM, /* Out of memory */ | |
50 | |
51 CRYPT_PK_TYPE_MISMATCH, /* Not equivalent types of PK keys */ | |
52 CRYPT_PK_NOT_PRIVATE, /* Requires a private PK key */ | |
53 | |
54 CRYPT_INVALID_ARG, /* Generic invalid argument */ | |
55 CRYPT_FILE_NOTFOUND, /* File Not Found */ | |
56 | |
57 CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */ | |
58 CRYPT_PK_INVALID_SYSTEM,/* Invalid PK system specified */ | |
59 CRYPT_PK_DUP, /* Duplicate key already in key ring */ | |
60 CRYPT_PK_NOT_FOUND, /* Key not found in keyring */ | |
61 CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */ | |
62 | |
63 CRYPT_INVALID_PRIME_SIZE/* Invalid size of prime requested */ | |
64 }; | |
65 | |
66 #include <tomcrypt_cfg.h> | |
67 #include <tomcrypt_macros.h> | |
68 #include <tomcrypt_cipher.h> | |
69 #include <tomcrypt_hash.h> | |
70 #include <tomcrypt_mac.h> | |
71 #include <tomcrypt_prng.h> | |
72 #include <tomcrypt_pk.h> | |
73 #include <tomcrypt_misc.h> | |
74 #include <tomcrypt_argchk.h> | |
75 #include <tomcrypt_pkcs.h> | |
76 | |
77 #ifdef __cplusplus | |
78 } | |
79 #endif | |
80 | |
81 #endif /* TOMCRYPT_H_ */ | |
82 | |
83 | |
84 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt.h,v $ */ | |
85 /* $Revision: 1.7 $ */ | |
86 /* $Date: 2005/06/19 18:03:25 $ */ |