comparison src/headers/tomcrypt.h @ 280:59400faa4b44 libtomcrypt-orig libtomcrypt-1.05

Re-import libtomcrypt 1.05 for cleaner propagating. From crypt-1.05.tar.bz2, SHA1 of 88250202bb51570dc64f7e8f1c943cda9479258f
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Mar 2006 12:58:00 +0000
parents
children 997e6f7dc01e d5faf4814ddb
comparison
equal deleted inserted replaced
-1:000000000000 280:59400faa4b44
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 #define TAB_SIZE 32
27
28 /* error codes [will be expanded in future releases] */
29 enum {
30 CRYPT_OK=0, /* Result OK */
31 CRYPT_ERROR, /* Generic Error */
32 CRYPT_NOP, /* Not a failure but no operation was performed */
33
34 CRYPT_INVALID_KEYSIZE, /* Invalid key size given */
35 CRYPT_INVALID_ROUNDS, /* Invalid number of rounds */
36 CRYPT_FAIL_TESTVECTOR, /* Algorithm failed test vectors */
37
38 CRYPT_BUFFER_OVERFLOW, /* Not enough space for output */
39 CRYPT_INVALID_PACKET, /* Invalid input packet given */
40
41 CRYPT_INVALID_PRNGSIZE, /* Invalid number of bits for a PRNG */
42 CRYPT_ERROR_READPRNG, /* Could not read enough from PRNG */
43
44 CRYPT_INVALID_CIPHER, /* Invalid cipher specified */
45 CRYPT_INVALID_HASH, /* Invalid hash specified */
46 CRYPT_INVALID_PRNG, /* Invalid PRNG specified */
47
48 CRYPT_MEM, /* Out of memory */
49
50 CRYPT_PK_TYPE_MISMATCH, /* Not equivalent types of PK keys */
51 CRYPT_PK_NOT_PRIVATE, /* Requires a private PK key */
52
53 CRYPT_INVALID_ARG, /* Generic invalid argument */
54 CRYPT_FILE_NOTFOUND, /* File Not Found */
55
56 CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */
57 CRYPT_PK_INVALID_SYSTEM,/* Invalid PK system specified */
58 CRYPT_PK_DUP, /* Duplicate key already in key ring */
59 CRYPT_PK_NOT_FOUND, /* Key not found in keyring */
60 CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */
61
62 CRYPT_INVALID_PRIME_SIZE/* Invalid size of prime requested */
63 };
64
65 #include <tomcrypt_cfg.h>
66 #include <tomcrypt_macros.h>
67 #include <tomcrypt_cipher.h>
68 #include <tomcrypt_hash.h>
69 #include <tomcrypt_mac.h>
70 #include <tomcrypt_prng.h>
71 #include <tomcrypt_pk.h>
72 #include <tomcrypt_misc.h>
73 #include <tomcrypt_argchk.h>
74 #include <tomcrypt_pkcs.h>
75
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif /* TOMCRYPT_H_ */
81
82
83 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt.h,v $ */
84 /* $Revision: 1.7 $ */
85 /* $Date: 2005/06/19 18:03:25 $ */