diff options
-rw-r--r-- | doc/gcrypt.texi | 19 | ||||
-rw-r--r-- | src/gcrypt.h.in | 1 |
2 files changed, 14 insertions, 6 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index 30acd2ff..7337db95 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -1647,6 +1647,11 @@ Associated Data (AEAD) block cipher mode, which is specified in Poly1305 is an Authenticated Encryption with Associated Data (AEAD) mode, which can be used with ChaCha20 and Salsa20 stream ciphers. +@item GCRY_CIPHER_MODE_OCB +@cindex OCB, OCB3 +OCB is an Authenticated Encryption with Associated Data (AEAD) block +cipher mode, which is specified in RFC-7253. + @end table @node Working with cipher handles @@ -1675,12 +1680,14 @@ and the according constants. Note that some modes are incompatible with some algorithms - in particular, stream mode (@code{GCRY_CIPHER_MODE_STREAM}) only works with stream ciphers. Poly1305 AEAD mode (@code{GCRY_CIPHER_MODE_POLY1305}) only works with -ChaCha and Salsa stream ciphers. The block cipher modes (@code{GCRY_CIPHER_MODE_ECB}, -@code{GCRY_CIPHER_MODE_CBC}, @code{GCRY_CIPHER_MODE_CFB}, -@code{GCRY_CIPHER_MODE_OFB} and @code{GCRY_CIPHER_MODE_CTR}) will work -with any block cipher algorithm. GCM mode (@code{GCRY_CIPHER_MODE_CCM}) and -CCM mode (@code{GCRY_CIPHER_MODE_GCM}) will only work with block cipher algorithms -which have the block size of 16 bytes. +ChaCha and Salsa stream ciphers. The block cipher modes +(@code{GCRY_CIPHER_MODE_ECB}, @code{GCRY_CIPHER_MODE_CBC}, +@code{GCRY_CIPHER_MODE_CFB}, @code{GCRY_CIPHER_MODE_OFB} and +@code{GCRY_CIPHER_MODE_CTR}) will work with any block cipher +algorithm. GCM mode (@code{GCRY_CIPHER_MODE_CCM}), CCM mode +(@code{GCRY_CIPHER_MODE_GCM}), and OCB mode +(@code{GCRY_CIPHER_MODE_OCB}) will only work with block cipher +algorithms which have the block size of 16 bytes. The third argument @var{flags} can either be passed as @code{0} or as the bit-wise OR of the following constants. diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index f3207c96..85c67532 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -912,6 +912,7 @@ enum gcry_cipher_modes GCRY_CIPHER_MODE_CCM = 8, /* Counter with CBC-MAC. */ GCRY_CIPHER_MODE_GCM = 9, /* Galois Counter Mode. */ GCRY_CIPHER_MODE_POLY1305 = 10, /* Poly1305 based AEAD mode. */ + GCRY_CIPHER_MODE_OCB = 11 /* OCB3 mode. */ }; /* Flags used with the open function. */ |