X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Fsilccipher.h;h=a0503c899105d6ffa06c1f3c72fde2f8e332a2af;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=b24a69697d987b682eb9e970385ed61d2903cf73;hpb=c145f2f7712489b6530438b18bd71e5d1e6ec642;p=silc.git diff --git a/lib/silccrypt/silccipher.h b/lib/silccrypt/silccipher.h index b24a6969..a0503c89 100644 --- a/lib/silccrypt/silccipher.h +++ b/lib/silccrypt/silccipher.h @@ -95,6 +95,11 @@ typedef struct SilcCipherStruct *SilcCipher; * The Electronic Codebook mode. This mode does not provide sufficient * security and should not be used. * + * Each mode modifies the IV (initialization vector) of the cipher when + * silc_cipher_encrypt or silc_cipher_decrypt is called. The IV may be + * set/reset by calling silc_cipher_set_iv and the current IV can be + * retrieved by calling silc_cipher_get_iv. + * * SOURCE */ typedef enum { @@ -181,7 +186,7 @@ SilcBool silc_cipher_unregister_all(void); * * SYNOPSIS * - * SilcBool silc_cipher_alloc(const unsigned char *name, + * SilcBool silc_cipher_alloc(const char *name, * SilcCipher *new_cipher); * * DESCRIPTION @@ -206,7 +211,7 @@ SilcBool silc_cipher_unregister_all(void); * Notes about modes: * ***/ -SilcBool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher); +SilcBool silc_cipher_alloc(const char *name, SilcCipher *new_cipher); /****f* silccrypt/SilcCipherAPI/silc_cipher_free * @@ -225,14 +230,14 @@ void silc_cipher_free(SilcCipher cipher); * * SYNOPSIS * - * SilcBool silc_cipher_is_supported(const unsigned char *name); + * SilcBool silc_cipher_is_supported(const char *name); * * DESCRIPTION * * Returns TRUE if cipher `name' is supported. * ***/ -SilcBool silc_cipher_is_supported(const unsigned char *name); +SilcBool silc_cipher_is_supported(const char *name); /****f* silccrypt/SilcCipherAPI/silc_cipher_get_supported * @@ -316,13 +321,16 @@ SilcBool silc_cipher_set_key(SilcCipher cipher, const unsigned char *key, * * DESCRIPTION * - * Sets the IV (initial vector) for the cipher. The `iv' must be + * Sets the IV (initialization vector) for the cipher. The `iv' must be * the size of the block size of the cipher. If `iv' is NULL this * does not do anything. * * If the encryption mode is CTR (Counter mode) this also resets the * the counter for a new block. This is done also if `iv' is NULL. * + * If the encryption mode is CFB (cipher feedback) this also resets the + * the feedback stream for a new block. This is done also if `iv' is NULL. + * ***/ void silc_cipher_set_iv(SilcCipher cipher, const unsigned char *iv);