[Botan-devel] LibraryInitializer and fork()

Jack Lloyd lloyd at randombit.net
Tue Apr 14 10:39:16 EDT 2009

On Mon, Apr 13, 2009 at 11:56:54PM -0700, Bala Narasimhan wrote:
> What are best practises with regards to LibraryInitializer and fork() ? Is
> there something one needs to keep in mind? Does fork() inherit the
> LibraryInitializer of the parent? Is that safe?

Yes this should be safe, though it has not been tested much or
recently. One thing to be careful about is to reseed the PRNG in both
parent and child after the fork, since otherwise they will share the
PRNG state and might accidentally generate the same keys, nonces, etc
when this is not desired.


More information about the botan-devel mailing list