diff --git a/nettle.texinfo b/nettle.texinfo index 62e2a18132be92ab371ae7b8d0540165073c3a02..d424c9fc8fd0baf38f12e06a41cf453abf17fdc2 100644 --- a/nettle.texinfo +++ b/nettle.texinfo @@ -185,7 +185,7 @@ Released into the public domain. @item SERPENT The implementation of the SERPENT cipher is written by Ross Anderson, Eli Biham, and Lars Knudsen, adapted to LSH by Rafael Sevilla, and to -Nettle by Niels M�ller. +Nettle by Niels M�ller. Released under the GPL. @item SHA1 The implementation of the SHA1 message digest is written by Peter @@ -441,7 +441,7 @@ However, using ECB is usually a bad idea. For a start, plaintext blocks that are equal are transformed to ciphertext blocks that are equal; that leaks information about the plaintext. Usually you should apply the cipher is some feedback mode, @dfn{CBC} (Cipher Block Chaining) being one -of the most popular. +of the most popular. XXX Add reference A stream cipher can be used for messages of arbitrary length; a typical stream cipher is a keyed pseudorandom generator. To encrypt a plaintext @@ -809,6 +809,18 @@ doesn't follow the Nettle conventions, because it is intended to be similar to the ANSI-C @code{memcpy} function. @end deftypefun +@deftypefun {void} cbc_encrypt (void *@var{ctx}, void (*@var{f})(), unsigned @var{block_size}, uint8_t *@var{iv}, unsigned @var{length}, uint8_t *@var{dst}, const uint8_t *@var{src}) +@deftypefunx {void} cbc_decrypt (void *@var{ctx}, void (*@var{f})(), unsigned @var{block_size}, uint8_t *@var{iv}, unsigned @var{length}, uint8_t *@var{dst}, const uint8_t *@var{src}) +Utility functions for applying a block cipher in Cipher Block Chaining +(CBC) mode. The function f is really typed as @code{void f (void +*@var{ctx}, unsigned @var{length}, uint8_t @var{dst}, const uint8_t +*@var{src}), and the @code{cbc_encrypt} and @code{cbc_decrypt} functions +pass their argument @var{ctx} on to @code{f}. + +There are also some macros to help use these functions correctly, XXX +describe CBC_SET_IV, CBC_ENCRYPT and CBC_DECRYPT. + +@end example @node Installation, Index, Reference, Top @comment node-name, next, previous, up @chapter Installation