Mercurial > dropbear
annotate libtomcrypt/src/headers/tomcrypt_dropbear.h @ 1499:2d450c1056e3
options: Complete the transition to numeric toggles (`#if')
For the sake of review, this commit alters only the code; the affiliated
comments within the source files also need to be updated, but doing so
now would obscure the operational changes that have been made here.
* All on/off options have been switched to the numeric `#if' variant;
that is the only way to make this `default_options.h.in' thing work
in a reasonable manner.
* There is now some very minor compile-time checking of the user's
choice of options.
* NO_FAST_EXPTMOD doesn't seem to be used, so it has been removed.
* ENABLE_USER_ALGO_LIST was supposed to be renamed DROPBEAR_USER_ALGO_LIST,
and this commit completes that work.
* DROPBEAR_FUZZ seems to be a relatively new, as-yet undocumented option,
which was added by the following commit:
commit 6e0b539e9ca0b5628c6c5a3d118ad6a2e79e8039
Author: Matt Johnston <[email protected]>
Date: Tue May 23 22:29:21 2017 +0800
split out checkpubkey_line() separately
It has now been added to `sysoptions.h' and defined as `0' by default.
* The configuration option `DROPBEAR_PASSWORD_ENV' is no longer listed in
`default_options.h.in'; it is no longer meant to be set by the user, and
is instead left to be defined in `sysoptions.h' (where it was already being
defined) as merely the name of the environment variable in question:
DROPBEAR_PASSWORD
To enable or disable use of that environment variable, the user must now
toggle `DROPBEAR_USE_DROPBEAR_PASSWORD'.
* The sFTP support is now toggled by setting `DROPBEAR_SFTPSERVER', and the
path of the sFTP server program is set independently through the usual
SFTPSERVER_PATH.
author | Michael Witten <mfwitten@gmail.com> |
---|---|
date | Thu, 20 Jul 2017 19:38:26 +0000 |
parents | 8305ebe45940 |
children | 3a97f14c0235 |
rev | line source |
---|---|
1476
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
1 /* compile options depend on Dropbear options.h */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
2 #include "options.h" |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
3 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
4 /* Dropbear config */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
5 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
6 #define LTC_NOTHING |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
8 /* Use small code where possible */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
9 #if DROPBEAR_SMALL_CODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
10 #define LTC_SMALL_CODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
11 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
12 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
13 #if DROPBEAR_BLOWFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
14 #define LTC_BLOWFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
15 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
16 #if DROPBEAR_AES |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
17 #define LTC_RIJNDAEL |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
18 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
19 /* _TABLES tells it to use tables during setup, _SMALL means to use the smaller scheduled key format |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
20 * (saves 4KB of ram), _ALL_TABLES enables all tables during setup */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
21 #if DROPBEAR_TWOFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
22 #define LTC_TWOFISH |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
23 #define LTC_TWOFISH_SMALL |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
24 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
25 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
26 #if DROPBEAR_3DES |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
27 #define LTC_DES |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
28 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
29 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
30 #if DROPBEAR_ENABLE_CTR_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
31 #define LTC_CBC_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
32 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
33 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
34 #if DROPBEAR_ENABLE_CTR_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
35 #define LTC_CTR_MODE |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
36 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
37 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
38 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
39 #if DROPBEAR_SHA512 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
40 #define LTC_SHA512 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
41 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
42 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
43 #if DROPBEAR_SHA384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
44 #define LTC_SHA384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
45 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
46 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
47 #if DROPBEAR_SHA256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
48 #define LTC_SHA256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
49 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
50 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
51 #define LTC_SHA1 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
52 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
53 #if DROPBEAR_MD5 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
54 #define LTC_MD5 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
55 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
56 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
57 /* ECC */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
58 #if DROPBEAR_ECC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 #define LTC_MECC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
60 #define LTM_DESC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
61 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
62 /* use Shamir's trick for point mul (speeds up signature verification) */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
63 #define LTC_ECC_SHAMIR |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
64 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
65 #if DROPBEAR_ECC_256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
66 #define LTC_ECC256 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
67 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
68 #if DROPBEAR_ECC_384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
69 #define LTC_ECC384 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
70 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
71 #if DROPBEAR_ECC_521 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
72 #define LTC_ECC521 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
73 #endif |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
74 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
75 #endif /* DROPBEAR_ECC */ |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
76 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
77 #define LTC_HMAC |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
78 #define LTC_HASH_HELPERS |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
79 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
80 #define LTC_NO_TEST |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
81 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
82 #define LTC_BASE64 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
83 |
8305ebe45940
Put Dropbear config in a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
84 /* end Dropbear config */ |