[PATCH] DRBG: remove stale comments
Stephan Mueller
smueller at chronox.de
Mon Feb 22 21:27:49 CET 2016
The removed comments are not applicable any more.
Signed-off-by: Stephan Mueller <smueller at chronox.de>
---
random/random-drbg.c | 45 ---------------------------------------------
1 file changed, 45 deletions(-)
diff --git a/random/random-drbg.c b/random/random-drbg.c
index f9d11a3..f036719 100644
--- a/random/random-drbg.c
+++ b/random/random-drbg.c
@@ -99,51 +99,6 @@
* flags is set to 0 and perslen is set to 0, the current DRBG type is
* completely reset without using a personalization string.
*
- * DRBG Usage
- * ==========
- * The SP 800-90A DRBG allows the user to specify a personalization string
- * for initialization as well as an additional information string for each
- * random number request. The following code fragments show how a caller
- * uses the API to use the full functionality of the DRBG.
- *
- * Usage without any additional data
- * ---------------------------------
- * gcry_randomize(outbuf, OUTLEN, GCRY_STRONG_RANDOM);
- *
- *
- * Usage with personalization string during initialization
- * -------------------------------------------------------
- * drbg_string_t pers;
- * char personalization[11] = "some-string";
- *
- * drbg_string_fill(&pers, personalization, strlen(personalization));
- * // The reset completely re-initializes the DRBG with the provided
- * // personalization string without changing the DRBG type
- * ret = gcry_control(GCRYCTL_DRBG_REINIT, 0, &pers);
- * gcry_randomize(outbuf, OUTLEN, GCRY_STRONG_RANDOM);
- *
- *
- * Usage with additional information string during random number request
- * ---------------------------------------------------------------------
- * drbg_string_t addtl;
- * char addtl_string[11] = "some-string";
- *
- * drbg_string_fill(&addtl, addtl_string, strlen(addtl_string));
- * // The following call is a wrapper to gcry_randomize() and returns
- * // the same error codes.
- * gcry_randomize_drbg(outbuf, OUTLEN, GCRY_STRONG_RANDOM, &addtl);
- *
- *
- * Usage with personalization and additional information strings
- * -------------------------------------------------------------
- * Just mix both scenarios above.
- *
- *
- * Switch the DRBG type to some other type
- * ---------------------------------------
- * // Switch to CTR DRBG AES-128 without prediction resistance
- * ret = gcry_control(GCRYCTL_DRBG_REINIT, DRBG_NOPR_CTRAES128, NULL);
- * gcry_randomize(outbuf, OUTLEN, GCRY_STRONG_RANDOM);
*/
#include <string.h>
--
2.5.0
More information about the Gcrypt-devel
mailing list