Browse Source

Merge pull request #197 from libtom/update/doc

Update documentation
Steffen Jaeckel 8 years ago
parent
commit
b6213309ca

+ 2 - 4
README.md

@@ -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* |
 | `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* |
 | `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* |
 | `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* |
 | `bins` | builds `hashsum` *\*4* |
 | `all_test` | builds `test`, `hashsum`, `ltcrypt`, `small`, `tv_gen`, `sizes` & `constants` *\*4* |
 | `all_test` | builds `test`, `hashsum`, `ltcrypt`, `small`, `tv_gen`, `sizes` & `constants` *\*4* |
 | `docs` | builds the developer documentation `doc/crypt.pdf` |
 | `docs` | builds the developer documentation `doc/crypt.pdf` |
@@ -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
 *\*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
 *\*7* also builds the necessary artifact(s) before installing it
 
 
 *\*8* also have a look at the 'Installation' section of this file
 *\*8* also have a look at the 'Installation' section of this file

+ 0 - 3
TODO

@@ -1,3 +0,0 @@
-for 1.18
-- document new ECC functions
-- add test for new functions

+ 3 - 1
changes

@@ -22,6 +22,8 @@ v1.18.0
          XTS mode and RSA private key operations with keys without CRT parameters
          XTS mode and RSA private key operations with keys without CRT parameters
       -- RC2 now also works with smaller key-sizes
       -- RC2 now also works with smaller key-sizes
       -- Improved/extended several tests & demos
       -- 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 all compiler warnings
       -- Fixed several build issues on FreeBSD, NetBSD, Linux x32 ABI, HP-UX/IA64,
       -- Fixed several build issues on FreeBSD, NetBSD, Linux x32 ABI, HP-UX/IA64,
          Mac OS X, Windows (32&64bit, MingW&MSVC) ...
          Mac OS X, Windows (32&64bit, MingW&MSVC) ...
@@ -33,7 +35,7 @@ v1.18.0
       -- Add Base64-URL de-/encoding and some strict variants
       -- Add Base64-URL de-/encoding and some strict variants
       -- Add Blake2b & Blake2s (hash & mac), thanks to Kelvin Sherlock
       -- Add Blake2b & Blake2s (hash & mac), thanks to Kelvin Sherlock
       -- Add Camellia block cipher
       -- 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 constant-time mem-compare mem_neq()
       -- Add DER GeneralizedTime de-/encoding
       -- Add DER GeneralizedTime de-/encoding
       -- Add DSA and ECC key generation FIPS-186-4 compliance
       -- Add DSA and ECC key generation FIPS-186-4 compliance

File diff suppressed because it is too large
+ 727 - 58
doc/crypt.tex


+ 3 - 0
doc/makefile

@@ -55,6 +55,9 @@ docdvi: crypt.tex
 	latex crypt $(silent_stdout)
 	latex crypt $(silent_stdout)
 	latex crypt $(silent_stdout)
 	latex crypt $(silent_stdout)
 
 
+termdoc: docdvi
+	dvi2tty crypt.dvi -w120
+
 clean:
 clean:
 	rm -f $(LEFTOVERS)
 	rm -f $(LEFTOVERS)
 	rm -rf doxygen/
 	rm -rf doxygen/

+ 2 - 2
src/encauth/chachapoly/chacha20poly1305_memory.c

@@ -15,8 +15,8 @@
   Process an entire GCM packet in one call.
   Process an entire GCM packet in one call.
   @param key               The secret key
   @param key               The secret key
   @param keylen            The length of 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 aad               The additional authentication data (header)
   @param aadlen            The length of the aad
   @param aadlen            The length of the aad
   @param in                The plaintext
   @param in                The plaintext

+ 2 - 2
src/encauth/gcm/gcm_memory.c

@@ -20,8 +20,8 @@
   @param cipher            Index of cipher to use
   @param cipher            Index of cipher to use
   @param key               The secret key
   @param key               The secret key
   @param keylen            The length of 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 adata             The additional authentication data (header)
   @param adatalen          The length of the adata
   @param adatalen          The length of the adata
   @param pt                The plaintext
   @param pt                The plaintext

+ 2 - 2
src/headers/tomcrypt_cipher.h

@@ -499,8 +499,8 @@ extern struct ltc_cipher_descriptor {
    /** Accelerated GCM packet (one shot)
    /** Accelerated GCM packet (one shot)
        @param key        The secret key
        @param key        The secret key
        @param keylen     The length of 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 adata      The additional authentication data (header)
        @param adatalen   The length of the adata
        @param adatalen   The length of the adata
        @param pt         The plaintext
        @param pt         The plaintext

+ 1 - 1
src/mac/hmac/hmac_init.c

@@ -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));
        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++) {
     for(i=0; i < LTC_HMAC_BLOCKSIZE;   i++) {
        buf[i] = hmac->key[i] ^ 0x36;
        buf[i] = hmac->key[i] ^ 0x36;
     }
     }

+ 3 - 3
src/modes/cbc/cbc_getiv.c

@@ -16,9 +16,9 @@
 #ifdef LTC_CBC_MODE
 #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
    @param cbc  The CBC state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful
 */
 */

+ 2 - 2
src/modes/cbc/cbc_setiv.c

@@ -17,8 +17,8 @@
 #ifdef LTC_CBC_MODE
 #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 len  The length of the vector (in octets)
    @param cbc  The CBC state
    @param cbc  The CBC state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful

+ 1 - 1
src/modes/cbc/cbc_start.c

@@ -18,7 +18,7 @@
 /**
 /**
    Initialize a CBC context
    Initialize a CBC context
    @param cipher      The index of the cipher desired
    @param cipher      The index of the cipher desired
-   @param IV          The initial vector
+   @param IV          The initialization vector
    @param key         The secret key
    @param key         The secret key
    @param keylen      The length of the secret key (octets)
    @param keylen      The length of the secret key (octets)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)

+ 3 - 3
src/modes/cfb/cfb_getiv.c

@@ -16,9 +16,9 @@
 #ifdef LTC_CFB_MODE
 #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
    @param cfb  The CFB state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful
 */
 */

+ 2 - 2
src/modes/cfb/cfb_setiv.c

@@ -16,8 +16,8 @@
 #ifdef LTC_CFB_MODE
 #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 len  The length of the vector (in octets)
    @param cfb  The CFB state
    @param cfb  The CFB state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful

+ 1 - 1
src/modes/cfb/cfb_start.c

@@ -19,7 +19,7 @@
 /**
 /**
    Initialize a CFB context
    Initialize a CFB context
    @param cipher      The index of the cipher desired
    @param cipher      The index of the cipher desired
-   @param IV          The initial vector
+   @param IV          The initialization vector
    @param key         The secret key
    @param key         The secret key
    @param keylen      The length of the secret key (octets)
    @param keylen      The length of the secret key (octets)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)

+ 3 - 3
src/modes/ctr/ctr_getiv.c

@@ -16,9 +16,9 @@
 #ifdef LTC_CTR_MODE
 #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
    @param ctr  The CTR state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful
 */
 */

+ 2 - 2
src/modes/ctr/ctr_setiv.c

@@ -16,8 +16,8 @@
 #ifdef LTC_CTR_MODE
 #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 len  The length of the vector (in octets)
    @param ctr  The CTR state
    @param ctr  The CTR state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful

+ 1 - 1
src/modes/ctr/ctr_start.c

@@ -19,7 +19,7 @@
 /**
 /**
    Initialize a CTR context
    Initialize a CTR context
    @param cipher      The index of the cipher desired
    @param cipher      The index of the cipher desired
-   @param IV          The initial vector
+   @param IV          The initialization vector
    @param key         The secret key
    @param key         The secret key
    @param keylen      The length of the secret key (octets)
    @param keylen      The length of the secret key (octets)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)

+ 3 - 3
src/modes/f8/f8_getiv.c

@@ -16,9 +16,9 @@
 #ifdef LTC_F8_MODE
 #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
    @param f8   The F8 state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful
 */
 */

+ 2 - 2
src/modes/f8/f8_setiv.c

@@ -16,8 +16,8 @@
 #ifdef LTC_F8_MODE
 #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 len  The length of the vector (in octets)
    @param f8   The F8 state
    @param f8   The F8 state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful

+ 1 - 1
src/modes/f8/f8_start.c

@@ -19,7 +19,7 @@
 /**
 /**
    Initialize an F8 context
    Initialize an F8 context
    @param cipher      The index of the cipher desired
    @param cipher      The index of the cipher desired
-   @param IV          The initial vector
+   @param IV          The initialization vector
    @param key         The secret key
    @param key         The secret key
    @param keylen      The length of the secret key (octets)
    @param keylen      The length of the secret key (octets)
    @param salt_key    The salting key for the IV
    @param salt_key    The salting key for the IV

+ 3 - 3
src/modes/ofb/ofb_getiv.c

@@ -16,9 +16,9 @@
 #ifdef LTC_OFB_MODE
 #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
    @param ofb  The OFB state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful
 */
 */

+ 2 - 2
src/modes/ofb/ofb_setiv.c

@@ -16,8 +16,8 @@
 #ifdef LTC_OFB_MODE
 #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 len  The length of the vector (in octets)
    @param ofb  The OFB state
    @param ofb  The OFB state
    @return CRYPT_OK if successful
    @return CRYPT_OK if successful

+ 1 - 1
src/modes/ofb/ofb_start.c

@@ -19,7 +19,7 @@
 /**
 /**
    Initialize a OFB context
    Initialize a OFB context
    @param cipher      The index of the cipher desired
    @param cipher      The index of the cipher desired
-   @param IV          The initial vector
+   @param IV          The initialization vector
    @param key         The secret key
    @param key         The secret key
    @param keylen      The length of the secret key (octets)
    @param keylen      The length of the secret key (octets)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)
    @param num_rounds  Number of rounds in the cipher desired (0 for default)

+ 2 - 2
src/pk/dsa/dsa_verify_hash.c

@@ -23,7 +23,7 @@
   @param hash     The hash that was signed
   @param hash     The hash that was signed
   @param hashlen  The length of 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 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)
   @return CRYPT_OK if successful (even if the signature is invalid)
 */
 */
 int dsa_verify_hash_raw(         void   *r,          void   *s,
 int dsa_verify_hash_raw(         void   *r,          void   *s,
@@ -89,7 +89,7 @@ error:
   @param hash     The hash that was signed
   @param hash     The hash that was signed
   @param hashlen  The length of 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 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)
   @return CRYPT_OK if successful (even if the signature is invalid)
 */
 */
 int dsa_verify_hash(const unsigned char *sig, unsigned long siglen,
 int dsa_verify_hash(const unsigned char *sig, unsigned long siglen,

Some files were not shown because too many files changed in this diff