Crypto Toolkit Interface


This interface is used to initialize and uninitialize the SILC Crypto Toolkit. SILC Crypto Toolkit is initialized by calling the silc_crypto_init function. It needs to be called only once per-process but must be called before any crypto functions are used.

In initialization all builtin ciphers, hash functions, MACs, PKCSs and other algorithms will be registered to the crypto library. If user wants to register new algorithms or change the order of the automatically registered algorithms, user can do this by re-registering the algorithms in desired order.

A global SilcStack, a memory pool, can be associated with the Crypto Toolkit. If it is set in initialization, all routines in the Crypto Toolkit will use that stack as its memory source. Some interfaces and libraries in the SILC Crypto Toolkit support also providing the SilcStack as an additional argument, in which case a different stack from the global one can be used.