hu_InitSbg56()

Initializes the module and performs a series of self-tests to ensure the integrity of the module and correct operation of its cryptographic algorithms.

Synopsis:

#include "hugse56.h"

int hu_InitSbg56(sb_GlobalCtx sbCtx)
            

Arguments:

sbCtx
A global context.

Library:

libhuapi (For the qcc command, use the -l huapi option to link against this library)

Description:

Upon a successful call to this function, the state of the module is set to SBG56_STATE_ENABLED.

If for any reason the self-tests fail, the state of the module is set to SBG56_STATE_DISABLED.

This function may be called only if the module is in the SBG56_STATE_INSTALLED state. Calling this function from any other state results in an SB_FAIL_LIBRARY_ALREADY_INIT error.

Note: This function must be called once to initialize the module before any cryptographic functions are called. It is not reentrant.

Returns:

SB_FAIL_KAT
The module failed one or more known-answer tests.
SB_FAIL_INTEGRITY
The integrity test failed.
SB_FAIL_LIBRARY_ALREADY_INIT
The module has already been initialized.
SB_FAIL_LIBRARY_DISABLED
The module is disabled and this operation is not allowed.
SB_SUCCESS
Success.

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus