summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2023-04-20 19:14:25 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2023-04-21 09:18:02 +0300
commit7cdfc869b7afa057839fd361bfff9140cfbe63ed (patch)
tree7fdbfb9fa564b5247c55777c6415a94e15805b3c
parent9b1ee0574ed96800429aa9488b6dcb11a5407542 (diff)
downloadlibgcrypt-LIBGCRYPT-1.10-BRANCH.tar.gz
doc: add documentation for GCRYCTL_SET_ALLOW_WEAK_KEYLIBGCRYPT-1.10-BRANCH
* doc/gcrypt.texi: Add 'GCRYCTL_SET_ALLOW_WEAK_KEY' under 'gcry_cipher_ctl'. -- GnuPG-bug-id: 6451 Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
-rw-r--r--doc/gcrypt.texi22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index f6d755ed..1b5892d4 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -2139,6 +2139,28 @@ handle @var{h}. Please see the comments in the source code
(@code{src/global.c}) for details.
@end deftypefun
+@c begin constants for gcry_cipher_ctl
+@table @code
+
+@item GCRYCTL_SET_ALLOW_WEAK_KEY:
+
+This may be used to allow use of weak keys for certain block ciphers.
+@var{buffer} must be given as @code{NULL}. To allow weak keys for
+a cipher context @var{h}, set @var{buflen} to '1'. To disallow weak
+keys, set @var{buflen} to '0'.
+
+Default setting for a cipher context is to disallow weak keys.
+
+Note that even if weak keys are allowed, @code{gcry_cipher_setkey} will
+return error code @code{GPG_ERR_WEAK_KEY} if a weak key is detected.
+However, the cipher context is configured with the weak key and can
+proceed with encryption/decryption. When weak keys are disallowed,
+error code @code{GPG_ERR_WEAK_KEY} is returned and the cipher context
+is cannot be used for encryption/decryption.
+
+@end table
+@c end constants for gcry_cipher_info
+
@deftypefun gcry_error_t gcry_cipher_info (gcry_cipher_hd_t @var{h}, @
int @var{what}, void *@var{buffer}, size_t *@var{nbytes})