On Sunday, February 15, 2015 at 8:03:06 PM UTC-5, Jeffrey Walton wrote:
>
>
> On Sunday, February 15, 2015 at 7:13:42 AM UTC-5, Aydin Abadi wrote:
>>
>> I need to know how I can store (or access) the seed generated by a 
>> pseudorandom generator in crypto++. So i need to access the random seed to 
>> re-use it for some purpose.
>>
>
> You will probably have to use a RandomPool and manage the seed yourself. 
> See the wiki page on RandomNumberGenerator for details (
> http://www.cryptopp.com/wiki/RandomNumberGenerator). 
>

A RandomPool is the wrong tool here because it also uses time in its 
calculations. Sorry about that - I should have checked before I made the 
recommendation.

You can use OFB_Mode<T>::Encryption because it indirectly inherits from 
RandomNumberGenerator by way of AdditiveCipherTemplate<T>. For T (the T for 
OFB mode), use something like 3-key TripleDES, Camellia or AES. Crypto++'s 
test.cpp actually uses the AES/OFB generator (its the thing returned from 
GlobalPRNG()). Note: other modes of operation do *not* inherit from 
RandomNumberGenerator, so you can't use them in this instance.

There's also an alternate AES-256 based generator available on the wiki 
page at http://www.cryptopp.com/wiki/RandomNumberGenerator. Fetch the 
AES_RNG header file if you are interested in using it (its a header only 
implementation).

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to