3 #include "crypto_desc.h"
7 #ifdef DROPBEAR_LTC_PRNG
8 int dropbear_ltc_prng
= -1;
12 /* Register the compiled in ciphers.
13 * This should be run before using any of the ciphers/hashes */
16 const struct ltc_cipher_descriptor
*regciphers
[] = {
20 #ifdef DROPBEAR_BLOWFISH
23 #ifdef DROPBEAR_TWOFISH
32 const struct ltc_hash_descriptor
*reghashes
[] = {
33 /* we need sha1 for hostkey stuff regardless */
35 #ifdef DROPBEAR_MD5_HMAC
38 #ifdef DROPBEAR_SHA256
41 #ifdef DROPBEAR_SHA384
44 #ifdef DROPBEAR_SHA512
51 for (i
= 0; regciphers
[i
] != NULL
; i
++) {
52 if (register_cipher(regciphers
[i
]) == -1) {
53 dropbear_exit("Error registering crypto");
57 for (i
= 0; reghashes
[i
] != NULL
; i
++) {
58 if (register_hash(reghashes
[i
]) == -1) {
59 dropbear_exit("Error registering crypto");
63 #ifdef DROPBEAR_LTC_PRNG
64 dropbear_ltc_prng
= register_prng(&dropbear_prng_desc
);
65 if (dropbear_ltc_prng
== -1) {
66 dropbear_exit("Error registering crypto");
72 dropbear_ecc_fill_dp();