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

Header file for the NanoCrypto NIST Pseudo Random Function constructions. More...

Go to the source code of this file.

Data Structures

struct  PRF_NIST_108
 Structure that holds a trio of function pointers to the PRF implementations. More...
 

Typedefs

typedef MSTATUS(* PRFFinalFunc) (MOC_SYM(hwAccelDescr hwAccelCtx) void *ctx, ubyte *result)
 Function pointer type for a method that finalizes a PRF context and outputs a result. More...
 
typedef MSTATUS(* PRFOutputSizeFunc) (MOC_SYM(hwAccelDescr hwAccelCtx) void *ctx, ubyte4 *size)
 Function pointer type for a method that gets the output size of a PRF. More...
 
typedef MSTATUS(* PRFUpdateFunc) (MOC_SYM(hwAccelDescr hwAccelCtx) void *ctx, const ubyte *data, ubyte4 dataLen)
 Function pointer type for a method that updates a PRF context with data. More...
 

Variables

MOC_EXTERN_NIST_PRF_H const PRF_NIST_108 NIST_PRF_AesCmac
 
MOC_EXTERN_NIST_PRF_H const PRF_NIST_108 NIST_PRF_Hmac
 

Detailed Description

This header file contains definitions, enumerations, structures, and function declarations used for NIST PRF constructions as described in NIST 800-108.

nist_prf.h

Typedef Documentation

◆ PRFFinalFunc

typedef MSTATUS(* PRFFinalFunc) (MOC_SYM(hwAccelDescr hwAccelCtx) void *ctx, ubyte *result)

Function pointer type for a method that finalizes a PRF context and outputs a result.

nist_prf.h

Parameters
ctxPointer to a PRF context that has been previously initialized and updated.
resultBuffer that will hold the resulting output. This can not write more bytes than the output size determined by your PRFOutputSizeFunc.
Returns
Must return OK (0) if successful and non-zero if unsuccessful.

nist_prf.h

◆ PRFOutputSizeFunc

typedef MSTATUS(* PRFOutputSizeFunc) (MOC_SYM(hwAccelDescr hwAccelCtx) void *ctx, ubyte4 *size)

Function pointer type for a method that gets the output size of a Pseudo Random Function (PRF).

nist_prf.h

Parameters
ctxPointer to a PRF context.
sizeContents should be set to the output size in bytes of the PRF associated with that context.
Returns
Must return OK (0) if successful and non-zero if unsuccessful.

nist_prf.h

◆ PRFUpdateFunc

typedef MSTATUS(* PRFUpdateFunc) (MOC_SYM(hwAccelDescr hwAccelCtx) void *ctx, const ubyte *data, ubyte4 dataLen)

Function pointer type for a method that updates a PRF context with data.

nist_prf.h

Parameters
ctxPointer to a PRF context that has been previously initialized.
dataBuffer holding the input data.
dataLenThe length of the data in bytes.
Returns
Must return OK (0) if successful and non-zero if unsuccessful.

nist_prf.h