1 module tomcrypt.tomcrypt;
2 
3 import core.stdc.stdio;
4 import core.stdc..string;
5 import core.stdc.stdlib;
6 import core.stdc.time;
7 import core.stdc.ctype;
8 import core.stdc.limits;
9 
10 import tomcrypt.custom;
11 
12 /* version */
13 enum CRYPT   = 0x0117;
14 enum SCRYPT  = "1.17";
15 
16 /* max size of either a cipher/hash block or symmetric key [largest of the two] */
17 enum MAXBLOCKSIZE  = 128;
18 
19 /* descriptor table size */
20 enum TAB_SIZE      = 32;
21 
22 /* error codes [will be expanded in future releases] */
23 enum {
24    CRYPT_OK=0,             /* Result OK */
25    CRYPT_ERROR,            /* Generic Error */
26    CRYPT_NOP,              /* Not a failure but no operation was performed */
27 
28    CRYPT_INVALID_KEYSIZE,  /* Invalid key size given */
29    CRYPT_INVALID_ROUNDS,   /* Invalid number of rounds */
30    CRYPT_FAIL_TESTVECTOR,  /* Algorithm failed test vectors */
31 
32    CRYPT_BUFFER_OVERFLOW,  /* Not enough space for output */
33    CRYPT_INVALID_PACKET,   /* Invalid input packet given */
34 
35    CRYPT_INVALID_PRNGSIZE, /* Invalid number of bits for a PRNG */
36    CRYPT_ERROR_READPRNG,   /* Could not read enough from PRNG */
37 
38    CRYPT_INVALID_CIPHER,   /* Invalid cipher specified */
39    CRYPT_INVALID_HASH,     /* Invalid hash specified */
40    CRYPT_INVALID_PRNG,     /* Invalid PRNG specified */
41 
42    CRYPT_MEM,              /* Out of memory */
43 
44    CRYPT_PK_TYPE_MISMATCH, /* Not equivalent types of PK keys */
45    CRYPT_PK_NOT_PRIVATE,   /* Requires a private PK key */
46 
47    CRYPT_INVALID_ARG,      /* Generic invalid argument */
48    CRYPT_FILE_NOTFOUND,    /* File Not Found */
49 
50    CRYPT_PK_INVALID_TYPE,  /* Invalid type of PK key */
51    CRYPT_PK_INVALID_SYSTEM,/* Invalid PK system specified */
52    CRYPT_PK_DUP,           /* Duplicate key already in key ring */
53    CRYPT_PK_NOT_FOUND,     /* Key not found in keyring */
54    CRYPT_PK_INVALID_SIZE,  /* Invalid size input for PK parameters */
55 
56    CRYPT_INVALID_PRIME_SIZE,/* Invalid size of prime requested */
57    CRYPT_PK_INVALID_PADDING /* Invalid padding on input */
58 };
59 
60 public
61 {
62     import tomcrypt.cfg;
63     import tomcrypt.macros;
64     import tomcrypt.cipher;
65     import tomcrypt.hash;
66     import tomcrypt.mac;
67     import tomcrypt.prng;
68     import tomcrypt.pk;
69     import tomcrypt.math;
70     import tomcrypt.misc;
71     import tomcrypt.argchk;
72     import tomcrypt.pkcs;
73 }
74 
75 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt.h,v $ */
76 /* $Revision: 1.21 $ */
77 /* $Date: 2006/12/16 19:34:05 $ */