FmCreateCipherObject
Synopsis
#include “fmciphobj.h”
CipherObj * FmCreateCipherObject(FMCO_CipherObjIndex index);
Description
This function constructs and initializes a Cipher Object of the specified type.
Parameters
Option |
Description |
---|---|
index
|
The type of cipher object requested. It can have the following values (defined in fmciphobj.h): >FMCO_IDX_AES: Implementation of the AES (Rijndael) algorithm >FMCO_IDX_CAST: Implementation of the CAST algorithm >FMCO_IDX_IDEA: Implementation of the IDEA algorithm >FMCO_IDX_RC2: Implementation of the RC2 algorithm >FMCO_IDX_RC4: Implementation of the RC4 algorithm >FMCO_IDX_DES: Implementation of the single DES algorithm >FMCO_IDX_TRIPLEDES: Implementation of the triple DES (with either double or triple length keys) algorithm >FMCO_IDX_DSA: Implementation of the DSA algorithm (signing and verification only) >FMCO_IDX_ECDSA: Implementation of the ECDSA algorithm (signing and verification only) >FMCO_IDX_HMACMD2: Implementation of the HMAC construct using MD2 hash algorithm (signing and verification only) >FMCO_IDX_HMACMD5: Implementation of the HMAC construct using MD5 hash algorithm (signing and verification only) >FMCO_IDX_HMACSHA1: Implementation of the HMAC construct using SHA-1 hash algorithm (signing and verification only) >FMCO_IDX_HMACRMD128: Implementation of the HMAC construct using RIPEMD-128 hash algorithm (signing and verification only) >FMCO_IDX_HMACRMD160: Implementation of the HMAC construct using RIPEMD-160 hash algorithm (signing and verification only) >FMCO_IDX_RSA: Implementation of the RSA algorithm (only single part operations supported) This list is correct at time of writing; the actual number of objects supported depends on the HSM firmware version. |
Return Value
The address of the cipher object is returned. If the system does not have enough memory to complete the operation, NULL is returned.
Comments
The returned Cipher Object should be freed by calling its Free() function (See Free).
The Cipher Objects may have some of the function’s addresses set to NULL to indicate that they are not implemented. It is recommended that the function address be checked before using these functions. Please consult the list under Cipher Object for details.
NOTE It is the Operating System firmware that provides the CipherObject – not the FM SDK. As new versions of OS firmware are developed and released, more Cipher Objects may be added to the list of supported algorithms.
A firmware upgrade may be required to obtain a particular Cipher Algorithm.