I have a problem using the HashDRBG from libgcrypt. My goal is to get some random data from a seed:
outbuf <--- DRBG_HASHSHA512(seed)
The only option I've seen so far is using libgrypt: (http://ift.tt/2vlZkxb)
Regarding the instructions, I have to use something like:
gcry_control(GCRYCTL_DRBG_REINIT, DRBG_NOPR_CTRAES128, NULL);
to initialize it depending on the DRBG type. But I always get the error: "Symbol 'DRBG_NOPR_CTRAES128' could not be resolved". The same with other DRBG types.
As well as "Type 'drbg_string_t' could not be resolved", when I want to use the additional information string. I have gcrypt.h included and the libraries linked with libgcrypt-config --cflags --libs
.
The generation of the random stream should then be done by:
gcry_randomize(outbuf, OUTLEN, GCRY_STRONG_RANDOM);
This function call worked at least for the default parameters.
Has anybody an idea on how to enable these missing functionalities? Thank you.
Aucun commentaire:
Enregistrer un commentaire