comparison libtomcrypt/src/headers/tomcrypt.h @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children e9dba7abd939
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
2 *
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
5 *
6 * The library is free for all purposes without any express
7 * guarantee it works.
8 */
9
1 #ifndef TOMCRYPT_H_ 10 #ifndef TOMCRYPT_H_
2 #define TOMCRYPT_H_ 11 #define TOMCRYPT_H_
3 #include <assert.h> 12 #include <assert.h>
4 #include <stdio.h> 13 #include <stdio.h>
5 #include <string.h> 14 #include <string.h>
6 #include <stdlib.h> 15 #include <stdlib.h>
16 #include <stddef.h>
7 #include <time.h> 17 #include <time.h>
8 #include <ctype.h> 18 #include <ctype.h>
9 #include <limits.h> 19 #include <limits.h>
10 20
11 /* use configuration data */ 21 /* use configuration data */
14 #ifdef __cplusplus 24 #ifdef __cplusplus
15 extern "C" { 25 extern "C" {
16 #endif 26 #endif
17 27
18 /* version */ 28 /* version */
19 #define CRYPT 0x0117 29 #define CRYPT 0x0118
20 #define SCRYPT "1.17" 30 #define SCRYPT "1.18.1"
21 31
22 /* max size of either a cipher/hash block or symmetric key [largest of the two] */ 32 /* max size of either a cipher/hash block or symmetric key [largest of the two] */
23 #define MAXBLOCKSIZE 128 33 #define MAXBLOCKSIZE 128
24 34
25 /* descriptor table size */ 35 /* descriptor table size */
53 63
54 CRYPT_INVALID_ARG, /* Generic invalid argument */ 64 CRYPT_INVALID_ARG, /* Generic invalid argument */
55 CRYPT_FILE_NOTFOUND, /* File Not Found */ 65 CRYPT_FILE_NOTFOUND, /* File Not Found */
56 66
57 CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */ 67 CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */
58 CRYPT_PK_INVALID_SYSTEM,/* Invalid PK system specified */ 68
59 CRYPT_PK_DUP, /* Duplicate key already in key ring */ 69 CRYPT_OVERFLOW, /* An overflow of a value was detected/prevented */
60 CRYPT_PK_NOT_FOUND, /* Key not found in keyring */ 70
71 CRYPT_UNUSED1, /* UNUSED1 */
72
73 CRYPT_INPUT_TOO_LONG, /* The input was longer than expected. */
74
61 CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */ 75 CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */
62 76
63 CRYPT_INVALID_PRIME_SIZE,/* Invalid size of prime requested */ 77 CRYPT_INVALID_PRIME_SIZE,/* Invalid size of prime requested */
64 CRYPT_PK_INVALID_PADDING /* Invalid padding on input */ 78 CRYPT_PK_INVALID_PADDING, /* Invalid padding on input */
79
80 CRYPT_HASH_OVERFLOW /* Hash applied to too many bits */
65 }; 81 };
66 82
67 #include <tomcrypt_cfg.h> 83 #include <tomcrypt_cfg.h>
68 #include <tomcrypt_macros.h> 84 #include <tomcrypt_macros.h>
69 #include <tomcrypt_cipher.h> 85 #include <tomcrypt_cipher.h>
81 #endif 97 #endif
82 98
83 #endif /* TOMCRYPT_H_ */ 99 #endif /* TOMCRYPT_H_ */
84 100
85 101
86 /* $Source$ */ 102 /* ref: $Format:%D$ */
87 /* $Revision$ */ 103 /* git commit: $Format:%H$ */
88 /* $Date$ */ 104 /* commit time: $Format:%ai$ */