11 /* if there is a custom definition header file use it */
12 #include <mycrypt_custom.h>
22 /* max size of either a cipher/hash block or symmetric key [largest of the two] */
23 #define MAXBLOCKSIZE 128
26 /* error codes [will be expanded in future releases] */
28 CRYPT_OK=0, /* Result OK */
29 CRYPT_ERROR, /* Generic Error */
30 CRYPT_NOP, /* Not a failure but no operation was performed */
32 CRYPT_INVALID_KEYSIZE, /* Invalid key size given */
33 CRYPT_INVALID_ROUNDS, /* Invalid number of rounds */
34 CRYPT_FAIL_TESTVECTOR, /* Algorithm failed test vectors */
36 CRYPT_BUFFER_OVERFLOW, /* Not enough space for output */
37 CRYPT_INVALID_PACKET, /* Invalid input packet given */
39 CRYPT_INVALID_PRNGSIZE, /* Invalid number of bits for a PRNG */
40 CRYPT_ERROR_READPRNG, /* Could not read enough from PRNG */
42 CRYPT_INVALID_CIPHER, /* Invalid cipher specified */
43 CRYPT_INVALID_HASH, /* Invalid hash specified */
44 CRYPT_INVALID_PRNG, /* Invalid PRNG specified */
46 CRYPT_MEM, /* Out of memory */
48 CRYPT_PK_TYPE_MISMATCH, /* Not equivalent types of PK keys */
49 CRYPT_PK_NOT_PRIVATE, /* Requires a private PK key */
51 CRYPT_INVALID_ARG, /* Generic invalid argument */
53 CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */
54 CRYPT_PK_INVALID_SYSTEM,/* Invalid PK system specified */
55 CRYPT_PK_DUP, /* Duplicate key already in key ring */
56 CRYPT_PK_NOT_FOUND, /* Key not found in keyring */
57 CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */
59 CRYPT_INVALID_PRIME_SIZE/* Invalid size of prime requested */
63 #include <mycrypt_cfg.h>
64 #include <mycrypt_macros.h>
65 #include <mycrypt_cipher.h>
66 #include <mycrypt_hash.h>
67 #include <mycrypt_prng.h>
68 #include <mycrypt_pk.h>
69 #include <mycrypt_gf.h>
70 #include <mycrypt_misc.h>
71 #include <mycrypt_kr.h>
72 #include <mycrypt_argchk.h>