Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
01cb819
trim trailing spaces
sjaeckel Jul 9, 2017
a0a7dae
add termdoc option to view documentation on the terminal
sjaeckel Jul 9, 2017
ce68fa3
add rand_bn_X() doc
sjaeckel Jul 9, 2017
728bc4a
update "Primality Testing"
sjaeckel Jul 9, 2017
9a0e208
add 'ltc_mp_digit' docs
sjaeckel Jul 9, 2017
09c3196
use v1.18.0 instead of v1.18
sjaeckel Jul 9, 2017
583b2b3
document PKCS#1 v1.5 signatures w/o ASN.1
sjaeckel Jul 9, 2017
39650b4
add doc of new RSA API functions
sjaeckel Jul 17, 2017
7edc411
fix crypt.pdf building
karel-m Jul 17, 2017
9584975
some crypt.tex hacking
karel-m Jul 17, 2017
468245c
doc: stream ciphers
karel-m Jul 20, 2017
5d74fee
doc tuning
karel-m Jul 20, 2017
56d17c8
some more doc updates
sjaeckel Aug 7, 2017
2ccb3fb
update OCB3 doc
sjaeckel Aug 8, 2017
dd01232
review stream ciphers
sjaeckel Aug 8, 2017
fc65352
moar doc
sjaeckel Aug 9, 2017
0742a99
update README
sjaeckel Aug 9, 2017
13b484f
moar doc
sjaeckel Aug 14, 2017
78e9601
review "Configuring and Building the Library"
sjaeckel Aug 14, 2017
8b3af12
add radix_to_bin() docs
sjaeckel Aug 14, 2017
35d920a
moar doc
sjaeckel Aug 14, 2017
11827fe
ChaCha20-Poly1305 doc
karel-m Sep 19, 2017
50e52d0
poly1305 doc
karel-m Sep 19, 2017
f3f839e
BLAKE2s + BLAKE2b MAC doc
karel-m Sep 19, 2017
fff9fee
DSA new functions - doc
karel-m Sep 20, 2017
c210f24
IV is short for 'initialization vector'
sjaeckel Sep 20, 2017
4f7747e
DSA not DH
sjaeckel Sep 20, 2017
2d3a921
align code
sjaeckel Sep 20, 2017
9fb08af
fix location of some of the tables
sjaeckel Sep 20, 2017
7cc9aad
remove TODO
sjaeckel Sep 20, 2017
f8d132e
update changes
sjaeckel Sep 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ The following list does not claim to be complete resp. to be available across al
| `sizes` | builds the `sizes` binary, printing all internal data sizes on invocation *\*4* |
| `constants` | builds the `constants` binary, printing all internal constants on invocation *\*4* |
| `openssl-enc` | builds the `openssl-enc` binary, which is more or less compatible to [`openssl enc`](https://linux.die.net/man/1/enc) *\*4* *\*5* |
| `test` | builds the `test` binary, which runs all algorithm self-tests + some extended tests *\*4* *\*6* |
| `timing` | builds the `timing` binary, which can be used to measure timings for algorithms and modes *\*4* *\*6* |
| `test` | builds the `test` binary, which runs all algorithm self-tests + some extended tests *\*4* |
| `timing` | builds the `timing` binary, which can be used to measure timings for algorithms and modes *\*4* |
| `bins` | builds `hashsum` *\*4* |
| `all_test` | builds `test`, `hashsum`, `ltcrypt`, `small`, `tv_gen`, `sizes` & `constants` *\*4* |
| `docs` | builds the developer documentation `doc/crypt.pdf` |
Expand All @@ -105,8 +105,6 @@ The following list does not claim to be complete resp. to be available across al

*\*5* broken build in some configurations, therefore not built by default

*\*6* requires define of one of `USE_GMP`, `USE_LTM` or `USE_TFM` (+ the appropriate MPI provider)

*\*7* also builds the necessary artifact(s) before installing it

*\*8* also have a look at the 'Installation' section of this file
Expand Down
3 changes: 0 additions & 3 deletions TODO

This file was deleted.

4 changes: 3 additions & 1 deletion changes
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ v1.18.0
XTS mode and RSA private key operations with keys without CRT parameters
-- RC2 now also works with smaller key-sizes
-- Improved/extended several tests & demos
-- Hardened DSA and RSA by testing (through Karel's perl-CryptX)
against Google's "Wycheproof" and Kudelski Security's "CDF"
-- Fixed all compiler warnings
-- Fixed several build issues on FreeBSD, NetBSD, Linux x32 ABI, HP-UX/IA64,
Mac OS X, Windows (32&64bit, MingW&MSVC) ...
Expand All @@ -33,7 +35,7 @@ v1.18.0
-- Add Base64-URL de-/encoding and some strict variants
-- Add Blake2b & Blake2s (hash & mac), thanks to Kelvin Sherlock
-- Add Camellia block cipher
-- Add ChaCha20 (stream cipher), Poly1305 (mac), ChaCha20Poly1305 (encauth)
-- Add ChaCha (stream cipher), Poly1305 (mac), ChaCha20Poly1305 (encauth)
-- Add constant-time mem-compare mem_neq()
-- Add DER GeneralizedTime de-/encoding
-- Add DSA and ECC key generation FIPS-186-4 compliance
Expand Down
1,285 changes: 1,112 additions & 173 deletions doc/crypt.tex

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions doc/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ docdvi: crypt.tex
latex crypt $(silent_stdout)
latex crypt $(silent_stdout)

termdoc: docdvi
dvi2tty crypt.dvi -w120

clean:
rm -f $(LEFTOVERS)
rm -rf doxygen/
4 changes: 2 additions & 2 deletions src/encauth/chachapoly/chacha20poly1305_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
Process an entire GCM packet in one call.
@param key The secret key
@param keylen The length of the secret key
@param iv The initial vector
@param ivlen The length of the initial vector
@param iv The initialization vector
@param ivlen The length of the initialization vector
@param aad The additional authentication data (header)
@param aadlen The length of the aad
@param in The plaintext
Expand Down
4 changes: 2 additions & 2 deletions src/encauth/gcm/gcm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
@param cipher Index of cipher to use
@param key The secret key
@param keylen The length of the secret key
@param IV The initial vector
@param IVlen The length of the initial vector
@param IV The initialization vector
@param IVlen The length of the initialization vector
@param adata The additional authentication data (header)
@param adatalen The length of the adata
@param pt The plaintext
Expand Down
4 changes: 2 additions & 2 deletions src/headers/tomcrypt_cipher.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ extern struct ltc_cipher_descriptor {
/** Accelerated GCM packet (one shot)
@param key The secret key
@param keylen The length of the secret key
@param IV The initial vector
@param IVlen The length of the initial vector
@param IV The initialization vector
@param IVlen The length of the initialization vector
@param adata The additional authentication data (header)
@param adatalen The length of the adata
@param pt The plaintext
Expand Down
2 changes: 1 addition & 1 deletion src/mac/hmac/hmac_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned lon
zeromem((hmac->key) + keylen, (size_t)(LTC_HMAC_BLOCKSIZE - keylen));
}

/* Create the initial vector for step (3) */
/* Create the initialization vector for step (3) */
for(i=0; i < LTC_HMAC_BLOCKSIZE; i++) {
buf[i] = hmac->key[i] ^ 0x36;
}
Expand Down
6 changes: 3 additions & 3 deletions src/modes/cbc/cbc_getiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#ifdef LTC_CBC_MODE

/**
Get the current initial vector
@param IV [out] The destination of the initial vector
@param len [in/out] The max size and resulting size of the initial vector
Get the current initialization vector
@param IV [out] The destination of the initialization vector
@param len [in/out] The max size and resulting size of the initialization vector
@param cbc The CBC state
@return CRYPT_OK if successful
*/
Expand Down
4 changes: 2 additions & 2 deletions src/modes/cbc/cbc_setiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#ifdef LTC_CBC_MODE

/**
Set an initial vector
@param IV The initial vector
Set an initialization vector
@param IV The initialization vector
@param len The length of the vector (in octets)
@param cbc The CBC state
@return CRYPT_OK if successful
Expand Down
2 changes: 1 addition & 1 deletion src/modes/cbc/cbc_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
Initialize a CBC context
@param cipher The index of the cipher desired
@param IV The initial vector
@param IV The initialization vector
@param key The secret key
@param keylen The length of the secret key (octets)
@param num_rounds Number of rounds in the cipher desired (0 for default)
Expand Down
6 changes: 3 additions & 3 deletions src/modes/cfb/cfb_getiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#ifdef LTC_CFB_MODE

/**
Get the current initial vector
@param IV [out] The destination of the initial vector
@param len [in/out] The max size and resulting size of the initial vector
Get the current initialization vector
@param IV [out] The destination of the initialization vector
@param len [in/out] The max size and resulting size of the initialization vector
@param cfb The CFB state
@return CRYPT_OK if successful
*/
Expand Down
4 changes: 2 additions & 2 deletions src/modes/cfb/cfb_setiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifdef LTC_CFB_MODE

/**
Set an initial vector
@param IV The initial vector
Set an initialization vector
@param IV The initialization vector
@param len The length of the vector (in octets)
@param cfb The CFB state
@return CRYPT_OK if successful
Expand Down
2 changes: 1 addition & 1 deletion src/modes/cfb/cfb_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
Initialize a CFB context
@param cipher The index of the cipher desired
@param IV The initial vector
@param IV The initialization vector
@param key The secret key
@param keylen The length of the secret key (octets)
@param num_rounds Number of rounds in the cipher desired (0 for default)
Expand Down
6 changes: 3 additions & 3 deletions src/modes/ctr/ctr_getiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#ifdef LTC_CTR_MODE

/**
Get the current initial vector
@param IV [out] The destination of the initial vector
@param len [in/out] The max size and resulting size of the initial vector
Get the current initialization vector
@param IV [out] The destination of the initialization vector
@param len [in/out] The max size and resulting size of the initialization vector
@param ctr The CTR state
@return CRYPT_OK if successful
*/
Expand Down
4 changes: 2 additions & 2 deletions src/modes/ctr/ctr_setiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifdef LTC_CTR_MODE

/**
Set an initial vector
@param IV The initial vector
Set an initialization vector
@param IV The initialization vector
@param len The length of the vector (in octets)
@param ctr The CTR state
@return CRYPT_OK if successful
Expand Down
2 changes: 1 addition & 1 deletion src/modes/ctr/ctr_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
Initialize a CTR context
@param cipher The index of the cipher desired
@param IV The initial vector
@param IV The initialization vector
@param key The secret key
@param keylen The length of the secret key (octets)
@param num_rounds Number of rounds in the cipher desired (0 for default)
Expand Down
6 changes: 3 additions & 3 deletions src/modes/f8/f8_getiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#ifdef LTC_F8_MODE

/**
Get the current initial vector
@param IV [out] The destination of the initial vector
@param len [in/out] The max size and resulting size of the initial vector
Get the current initialization vector
@param IV [out] The destination of the initialization vector
@param len [in/out] The max size and resulting size of the initialization vector
@param f8 The F8 state
@return CRYPT_OK if successful
*/
Expand Down
4 changes: 2 additions & 2 deletions src/modes/f8/f8_setiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifdef LTC_F8_MODE

/**
Set an initial vector
@param IV The initial vector
Set an initialization vector
@param IV The initialization vector
@param len The length of the vector (in octets)
@param f8 The F8 state
@return CRYPT_OK if successful
Expand Down
2 changes: 1 addition & 1 deletion src/modes/f8/f8_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
Initialize an F8 context
@param cipher The index of the cipher desired
@param IV The initial vector
@param IV The initialization vector
@param key The secret key
@param keylen The length of the secret key (octets)
@param salt_key The salting key for the IV
Expand Down
6 changes: 3 additions & 3 deletions src/modes/ofb/ofb_getiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#ifdef LTC_OFB_MODE

/**
Get the current initial vector
@param IV [out] The destination of the initial vector
@param len [in/out] The max size and resulting size of the initial vector
Get the current initialization vector
@param IV [out] The destination of the initialization vector
@param len [in/out] The max size and resulting size of the initialization vector
@param ofb The OFB state
@return CRYPT_OK if successful
*/
Expand Down
4 changes: 2 additions & 2 deletions src/modes/ofb/ofb_setiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#ifdef LTC_OFB_MODE

/**
Set an initial vector
@param IV The initial vector
Set an initialization vector
@param IV The initialization vector
@param len The length of the vector (in octets)
@param ofb The OFB state
@return CRYPT_OK if successful
Expand Down
2 changes: 1 addition & 1 deletion src/modes/ofb/ofb_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
Initialize a OFB context
@param cipher The index of the cipher desired
@param IV The initial vector
@param IV The initialization vector
@param key The secret key
@param keylen The length of the secret key (octets)
@param num_rounds Number of rounds in the cipher desired (0 for default)
Expand Down
4 changes: 2 additions & 2 deletions src/pk/dsa/dsa_verify_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@param hash The hash that was signed
@param hashlen The length of the hash that was signed
@param stat [out] The result of the signature verification, 1==valid, 0==invalid
@param key The corresponding public DH key
@param key The corresponding public DSA key
@return CRYPT_OK if successful (even if the signature is invalid)
*/
int dsa_verify_hash_raw( void *r, void *s,
Expand Down Expand Up @@ -89,7 +89,7 @@ int dsa_verify_hash_raw( void *r, void *s,
@param hash The hash that was signed
@param hashlen The length of the hash that was signed
@param stat [out] The result of the signature verification, 1==valid, 0==invalid
@param key The corresponding public DH key
@param key The corresponding public DSA key
@return CRYPT_OK if successful (even if the signature is invalid)
*/
int dsa_verify_hash(const unsigned char *sig, unsigned long siglen,
Expand Down