diff --git a/lib/cipher/cryb_chacha.c b/lib/cipher/cryb_chacha.c index 50df9a1..f08b282 100644 --- a/lib/cipher/cryb_chacha.c +++ b/lib/cipher/cryb_chacha.c @@ -189,3 +189,15 @@ chacha_finish(chacha_ctx *ctx) (void)memset_s(ctx, 0, sizeof *ctx, sizeof *ctx); } + +cipher_algorithm chacha_cipher = { + .name = "chacha", + .contextlen = sizeof(chacha_ctx), + .blocklen = 64, + .keylen = 32, + .init = (cipher_init_func)chacha_init, + .keystream = (cipher_keystream_func)chacha_keystream, + .encrypt = (cipher_encrypt_func)chacha_encrypt, + .decrypt = (cipher_decrypt_func)chacha_decrypt, + .finish = (cipher_finish_func)chacha_finish, +}; diff --git a/lib/cipher/cryb_cipher.c b/lib/cipher/cryb_cipher.c index c8eaf25..458da94 100644 --- a/lib/cipher/cryb_cipher.c +++ b/lib/cipher/cryb_cipher.c @@ -35,7 +35,10 @@ #include #include +#include +#include #include +#include static const char *cryb_cipher_version_string = PACKAGE_VERSION; @@ -55,7 +58,12 @@ init_cipher_algorithms(void) &aes128_cipher, &aes192_cipher, &aes256_cipher, + &chacha_cipher, + &des56_cipher, + &des112_cipher, + &des168_cipher, &rc4_cipher, + &salsa_cipher, NULL }; cryb_cipher_algorithms = algorithms; diff --git a/lib/cipher/cryb_salsa.c b/lib/cipher/cryb_salsa.c index 273582c..e5817c6 100644 --- a/lib/cipher/cryb_salsa.c +++ b/lib/cipher/cryb_salsa.c @@ -189,3 +189,15 @@ salsa_finish(salsa_ctx *ctx) (void)memset_s(ctx, 0, sizeof *ctx, sizeof *ctx); } + +cipher_algorithm salsa_cipher = { + .name = "salsa", + .contextlen = sizeof(salsa_ctx), + .blocklen = 64, + .keylen = 32, + .init = (cipher_init_func)salsa_init, + .keystream = (cipher_keystream_func)salsa_keystream, + .encrypt = (cipher_encrypt_func)salsa_encrypt, + .decrypt = (cipher_decrypt_func)salsa_decrypt, + .finish = (cipher_finish_func)salsa_finish, +}; diff --git a/lib/digest/cryb_digest.c b/lib/digest/cryb_digest.c index 5796305..ffee101 100644 --- a/lib/digest/cryb_digest.c +++ b/lib/digest/cryb_digest.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -61,6 +62,7 @@ init_digest_algorithms(void) &md4_digest, &md5_digest, &sha1_digest, + &sha224_digest, &sha256_digest, &sha384_digest, &sha512_digest,