TrustCore SDK NanoCrypto API reference  version 7.0
aes_mmo.h File Reference

Header file for declaring AES Matyas-Meyer-Oseas (MMO) hash functions. More...

Go to the source code of this file.

Functions

MOC_EXTERN MSTATUS AES_MMO_allocDigest (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *pp_context)
 Allocates a new AES-MMO context. More...
 
MOC_EXTERN MSTATUS AES_MMO_completeDigest (MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte *pData, ubyte4 dataLen, ubyte *pHashOutput)
 Performs the AES-MMO hash in a context free one-shot style. More...
 
MOC_EXTERN MSTATUS AES_MMO_final (MOC_SYM(hwAccelDescr hwAccelCtx) AES_MMO_CTX *pAesMmoCtx, ubyte *pHashOutput)
 Finalizes an AES-MMO context and outputs the resulting hash. More...
 
MOC_EXTERN MSTATUS AES_MMO_freeDigest (MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *pp_context)
 Deletes a new AES-MMO context. More...
 
MOC_EXTERN MSTATUS AES_MMO_initDigest (MOC_SYM(hwAccelDescr hwAccelCtx) AES_MMO_CTX *pAesMmoCtx)
 Initializes an AES-MMO context. More...
 
MOC_EXTERN MSTATUS AES_MMO_updateDigest (MOC_SYM(hwAccelDescr hwAccelCtx) AES_MMO_CTX *pAesMmoCtx, const ubyte *pData, ubyte4 dataLen)
 Updates an AES-MMO context with a buffer of data. More...
 

Detailed Description

Header file for declaring AES Matyas-Meyer-Oseas (MMO) hash functions.

aes_mmo.h

Function Documentation

◆ AES_MMO_allocDigest()

MOC_EXTERN MSTATUS AES_MMO_allocDigest ( MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *  pp_context)

Allocates a new AES-MMO context. Be sure to call AES_MMO_freeDigest in order to free the memory when done with the context.

Parameters
pp_contextPointer to the location of the newly allocated context.
Returns
OK (0) if successful, otherwise a negative number error code from merrors.h.

◆ AES_MMO_completeDigest()

MOC_EXTERN MSTATUS AES_MMO_completeDigest ( MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte *  pData,
ubyte4  dataLen,
ubyte *  pHashOutput 
)

Performs the AES-MMO hash in a context free one-shot style.

Parameters
pDataBuffer of data to be digested.
dataLenThe length of the data in bytes.
pHashOutputBuffer to hold the resulting hash. This must be 16 bytes in length.
Returns
OK (0) if successful, otherwise a negative number error code from merrors.h.

◆ AES_MMO_final()

MOC_EXTERN MSTATUS AES_MMO_final ( MOC_SYM(hwAccelDescr hwAccelCtx) AES_MMO_CTX *  pAesMmoCtx,
ubyte *  pHashOutput 
)

Finalizes an AES-MMO context and outputs the resulting hash.

Parameters
pAesMmoCtxPointer to a previously initialized and updated context.
pHashOutputBuffer to hold the resulting hash. This must be 16 bytes in length.
Returns
OK (0) if successful, otherwise a negative number error code from merrors.h.

◆ AES_MMO_freeDigest()

MOC_EXTERN MSTATUS AES_MMO_freeDigest ( MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *  pp_context)

Deletes a and frees the memory for an AES-MMO context.

Parameters
pp_contextPointer to the location of the context to be deleted.
Returns
OK (0) if successful, otherwise a negative number error code from merrors.h.

◆ AES_MMO_initDigest()

MOC_EXTERN MSTATUS AES_MMO_initDigest ( MOC_SYM(hwAccelDescr hwAccelCtx) AES_MMO_CTX *  pAesMmoCtx)

Initializes an AES-MMO context. This zeroes the context but does not free allocated memory.

Parameters
pAesMmoCtxPointer to the context to be initialized.
Returns
OK (0) if successful, otherwise a negative number error code from merrors.h.

◆ AES_MMO_updateDigest()

MOC_EXTERN MSTATUS AES_MMO_updateDigest ( MOC_SYM(hwAccelDescr hwAccelCtx) AES_MMO_CTX *  pAesMmoCtx,
const ubyte *  pData,
ubyte4  dataLen 
)

Updates an AES-MMO context with a buffer of data. This may be called as many times as necessary.

Parameters
pAesMmoCtxPointer to a previously initialized context.
pDataBuffer of data to be digested.
dataLenThe length of the data in bytes.
Returns
OK (0) if successful, otherwise a negative number error code from merrors.h.