@@ -57,3 +57,7 @@ int ccm_add_aad(ccm_state *ccm,
}
#endif
+
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */
@@ -107,3 +107,7 @@ int ccm_add_nonce(ccm_state *ccm,
@@ -59,3 +59,7 @@ int ccm_done(ccm_state *ccm,
@@ -75,3 +75,7 @@ int ccm_init(ccm_state *ccm, int cipher,
@@ -82,3 +82,7 @@ int ccm_process(ccm_state *ccm,
@@ -29,3 +29,7 @@ int ccm_reset(ccm_state *ccm)
@@ -32,3 +32,7 @@ int chacha20poly1305_add_aad(chacha20poly1305_state *st, const unsigned char *in
@@ -43,3 +43,7 @@ int chacha20poly1305_decrypt(chacha20poly1305_state *st, const unsigned char *in
@@ -40,3 +40,7 @@ int chacha20poly1305_done(chacha20poly1305_state *st, unsigned char *tag, unsign
@@ -42,3 +42,7 @@ int chacha20poly1305_encrypt(chacha20poly1305_state *st, const unsigned char *in
@@ -24,3 +24,7 @@ int chacha20poly1305_init(chacha20poly1305_state *st, const unsigned char *key,
@@ -68,3 +68,7 @@ LBL_ERR:
@@ -62,3 +62,7 @@ int chacha20poly1305_setiv(chacha20poly1305_state *st, const unsigned char *iv,
@@ -34,3 +34,7 @@ int chacha20poly1305_setiv_rfc7905(chacha20poly1305_state *st, const unsigned ch
@@ -128,3 +128,7 @@ int chacha20poly1305_test(void)
@@ -582,3 +582,7 @@ int blake2b_160_test(void)
@@ -557,3 +557,7 @@ int blake2s_128_test(void)
@@ -425,3 +425,6 @@ int rmd256_test(void)
@@ -490,3 +490,6 @@ int rmd320_test(void)
@@ -300,3 +300,7 @@ int sha3_shake_memory(int num, const unsigned char *in, unsigned long inlen, uns
@@ -395,3 +395,7 @@ int sha3_shake_test(void)
@@ -1,3 +1,12 @@
+/* LibTomCrypt, modular cryptographic library -- Tom St Denis
+ *
+ * LibTomCrypt is a library that provides various cryptographic
+ * algorithms in a highly modular and flexible manner.
+ * The library is free for all purposes without any express
+ * guarantee it works.
+ */
#ifndef TOMCRYPT_H_
#define TOMCRYPT_H_
#include <assert.h>
/* Defines the LTC_ARGCHK macro used within the library */
/* ARGTYPE is defined in tomcrypt_cfg.h */
#if ARGTYPE == 0
/* This is the build config file.
*
* With this you can setup what to inlcude/exclude automatically during any build. Just comment
/* ---- SYMMETRIC KEY STUFF -----
* We put each of the ciphers scheduled keys in their own structs then we put all of
#ifndef TOMCRYPT_CUSTOM_H_
#define TOMCRYPT_CUSTOM_H_
/* ---- HASH FUNCTIONS ---- */
#ifdef LTC_SHA3
struct sha3_state {
#ifdef LTC_HMAC
typedef struct Hmac_state {
hash_state md;
@@ -1,3 +1,11 @@
/* ---- HELPER MACROS ---- */
#ifdef ENDIAN_NEUTRAL
/** math functions **/
#define LTC_MP_LT -1
/* ---- LTC_BASE64 Routines ---- */
#ifdef LTC_BASE64
int base64_encode(const unsigned char *in, unsigned long len,
/* ---- NUMBER THEORY ---- */
enum {
/* PKCS Header Info */
/* ===> PKCS #1 -- RSA Cryptography <=== */
/* ---- PRNG Stuff ---- */
#ifdef LTC_YARROW
struct yarrow_prng {
@@ -59,3 +59,7 @@ int blake2bmac_done(blake2bmac_state *st, unsigned char *mac, unsigned long *mac
@@ -77,3 +77,7 @@ LBL_ERR:
@@ -42,3 +42,7 @@ LBL_ERR:
@@ -56,3 +56,7 @@ LBL_ERR:
@@ -308,3 +308,7 @@ int blake2bmac_test(void)
@@ -59,3 +59,7 @@ int blake2smac_done(blake2smac_state *st, unsigned char *mac, unsigned long *mac
@@ -308,3 +308,7 @@ int blake2smac_test(void)
@@ -262,3 +262,7 @@ int poly1305_done(poly1305_state *st, unsigned char *mac, unsigned long *maclen)
@@ -82,3 +82,7 @@ LBL_ERR:
@@ -47,3 +47,7 @@ LBL_ERR:
@@ -61,3 +61,7 @@ LBL_ERR:
@@ -50,3 +50,7 @@ int poly1305_test(void)
@@ -68,3 +68,7 @@ int rand_bn_range(void *N, void *limit, prng_state *prng, int wprng)
return CRYPT_OK;
@@ -9,3 +9,7 @@
#include "tomcrypt.h"
ltc_math_descriptor ltc_mp;
@@ -11,3 +11,7 @@
#ifdef LTC_PRNG_ENABLE_LTC_RNG
unsigned long (*ltc_rng)(unsigned char *out, unsigned long outlen, void (*callback)(void));
@@ -96,3 +96,7 @@ int register_all_ciphers(void)
return err;
@@ -94,3 +94,7 @@ int register_all_hashes(void)
@@ -43,3 +43,7 @@ int register_all_prngs(void)
@@ -149,3 +149,7 @@ int hkdf(int hash_idx, const unsigned char *salt, unsigned long saltlen,
/* vim: set ts=2 sw=2 et ai si: */
@@ -38,3 +38,7 @@ int pk_get_oid(int pk, oid_st *st)
@@ -106,3 +106,7 @@ LBL_ERR:
@@ -365,3 +365,7 @@ LBL_ERR:
@@ -65,4 +65,7 @@ int der_encode_subject_public_key_info(unsigned char *out, unsigned long *outlen
@@ -63,3 +63,7 @@ LBL_ERR:
@@ -147,3 +147,7 @@ LBL_NOFREE:
#endif /* LTC_MRSA */
@@ -60,3 +60,7 @@ LBL_ERR:
@@ -240,3 +240,7 @@ int chacha20_prng_test(void)
@@ -243,3 +243,7 @@ int rc4_test(void)
@@ -242,3 +242,7 @@ int sober128_test(void)
@@ -93,3 +93,7 @@ int chacha_crypt(chacha_state *st, const unsigned char *in, unsigned long inlen,
@@ -24,3 +24,7 @@ int chacha_done(chacha_state *st)
@@ -41,3 +41,7 @@ int chacha_ivctr32(chacha_state *st, const unsigned char *iv, unsigned long ivle
@@ -41,3 +41,7 @@ int chacha_ivctr64(chacha_state *st, const unsigned char *iv, unsigned long ivle
@@ -32,3 +32,7 @@ int chacha_keystream(chacha_state *st, unsigned char *out, unsigned long outlen)
@@ -59,3 +59,7 @@ int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keyle
@@ -65,3 +65,7 @@ int chacha_test(void)
@@ -105,3 +105,7 @@ int rc4_stream_done(rc4_state *st)
@@ -33,3 +33,7 @@ int rc4_stream_test(void)
@@ -340,3 +340,7 @@ int sober128_stream_done(sober128_state *c)
@@ -47,3 +47,7 @@ int sober128_stream_test(void)