Header file for declaring AES-XCBC functions.
More...
Go to the source code of this file.
|
MOC_EXTERN MSTATUS | AES_XCBC_clear (MOC_SYM(hwAccelDescr hwAccelCtx) AES_XCBC_MAC_96_Ctx *pCtx) |
| Clears a AES_XCBC_MAC_96_Ctx or AES_XCBC_PRF_128_Ctx context. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_MAC_96_final (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte cmac[AES_XCBC_MAC_96_RESULT_SIZE], AES_XCBC_MAC_96_Ctx *pCtx) |
| Finalizes an AES_XCBC_MAC_96_Ctx and outputs the resulting 96 bit (12 byte) MAC. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_MAC_96_init (MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte keyMaterial[AES_BLOCK_SIZE], AES_XCBC_MAC_96_Ctx *pCtx) |
| Initializes an AES_XCBC_MAC_96_Ctx context. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_MAC_96_reset (MOC_SYM(hwAccelDescr hwAccelCtx) AES_XCBC_MAC_96_Ctx *pCtx) |
| Resets an AES_XCBC_MAC_96_Ctx context. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_MAC_96_update (MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte *data, sbyte4 dataLength, AES_XCBC_MAC_96_Ctx *pCtx) |
| Updates the state of an AES_XCBC_MAC_96_Ctx context with data. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_PRF_128_final (MOC_SYM(hwAccelDescr hwAccelCtx) ubyte cmac[AES_XCBC_PRF_128_RESULT_SIZE], AES_XCBC_PRF_128_Ctx *pCtx) |
| Finalizes an AES_XCBC_PRF_128_Ctx and outputs the resulting 128 bit (16 byte) MAC. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_PRF_128_init (MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte keyMaterial[], sbyte4 keyLength, AES_XCBC_PRF_128_Ctx *pCtx) |
| Initializes an AES_XCBC_PRF_128_Ctx context. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_PRF_128_reset (MOC_SYM(hwAccelDescr hwAccelCtx) AES_XCBC_PRF_128_Ctx *pCtx) |
| Resets an AES_XCBC_PRF_128_Ctx context. More...
|
|
MOC_EXTERN MSTATUS | AES_XCBC_PRF_128_update (MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte *data, sbyte4 dataLength, AES_XCBC_PRF_128_Ctx *pCtx) |
| Updates the state of an AES_XCBC_PRF_128_Ctx context with data. More...
|
|
Header file for declaring AES-XCBC functions.
aes_xcbc_mac_96.h
◆ AES_XCBC_clear()
MOC_EXTERN MSTATUS AES_XCBC_clear |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) AES_XCBC_MAC_96_Ctx * |
pCtx | ) |
|
Clears a AES_XCBC_MAC_96_Ctx or AES_XCBC_PRF_128_Ctx context. This does free internally allocated AES contexts.
- Parameters
-
pCtx | Pointer to the context to be cleared. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_MAC_96_final()
MOC_EXTERN MSTATUS AES_XCBC_MAC_96_final |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) ubyte |
cmac[AES_XCBC_MAC_96_RESULT_SIZE], |
|
|
AES_XCBC_MAC_96_Ctx * |
pCtx |
|
) |
| |
Finalizes an AES_XCBC_MAC_96_Ctx and outputs the resulting 96 bit (12 byte) MAC.
- Parameters
-
cmac | Buffer that will hold the resulting MAC. It must be at least 12 bytes in length. |
pCtx | The already initialized and updated context to be finalized. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_MAC_96_init()
MOC_EXTERN MSTATUS AES_XCBC_MAC_96_init |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte |
keyMaterial[AES_BLOCK_SIZE], |
|
|
AES_XCBC_MAC_96_Ctx * |
pCtx |
|
) |
| |
Initializes an AES_XCBC_MAC_96_Ctx
context. Note this includes allocations of internal AES contexts. Note it is the callers responsibility to clear this object, and free its internals, by calling AES_XCBC_clear
.
- Parameters
-
keyMaterial | Key material to be used for the mac operation. This must be 16 bytes. |
pCtx | Pointer to the context to be initialized. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_MAC_96_reset()
MOC_EXTERN MSTATUS AES_XCBC_MAC_96_reset |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) AES_XCBC_MAC_96_Ctx * |
pCtx | ) |
|
Resets an AES_XCBC_MAC_96_Ctx context. The internal buffer is cleared but the AES context and key are not cleared.
- Parameters
-
pCtx | Pointer to the context to be reset. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_MAC_96_update()
MOC_EXTERN MSTATUS AES_XCBC_MAC_96_update |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte * |
data, |
|
|
sbyte4 |
dataLength, |
|
|
AES_XCBC_MAC_96_Ctx * |
pCtx |
|
) |
| |
Updates the state of an AES_XCBC_MAC_96_Ctx context with data.
- Parameters
-
data | The buffer of input data. |
dataLength | The length of pData in bytes. |
pCtx | The already initialized context to be updated. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_PRF_128_final()
MOC_EXTERN MSTATUS AES_XCBC_PRF_128_final |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) ubyte |
cmac[AES_XCBC_PRF_128_RESULT_SIZE], |
|
|
AES_XCBC_PRF_128_Ctx * |
pCtx |
|
) |
| |
Finalizes an AES_XCBC_PRF_128_Ctx and outputs the resulting 128 bit (16 byte) MAC.
- Parameters
-
cmac | Buffer that will hold the resulting MAC. It must be at least 16 bytes in length. |
pCtx | The already initialized and updated context to be finalized. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_PRF_128_init()
MOC_EXTERN MSTATUS AES_XCBC_PRF_128_init |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte |
keyMaterial[], |
|
|
sbyte4 |
keyLength, |
|
|
AES_XCBC_PRF_128_Ctx * |
pCtx |
|
) |
| |
Initializes an AES_XCBC_PRF_128_Ctx context. Note it is the callers responsibility to clear this object after use by calling AES_XCBC_clear.
- Parameters
-
keyMaterial | Key material to be used for the mac operation. |
keyLength | The length of the buffer pKeyMaterial in bytes. This may be any size. |
pCtx | Pointer to the context to be initialized. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_PRF_128_reset()
MOC_EXTERN MSTATUS AES_XCBC_PRF_128_reset |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) AES_XCBC_PRF_128_Ctx * |
pCtx | ) |
|
Resets an AES_XCBC_PRF_128_Ctx context. The internal buffer is cleared but the AES context and key are not cleared. This method is a macro which is expanded to AES_XCBC_MAC_96_reset
.
- Parameters
-
pCtx | Pointer to the context to be reset. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.
◆ AES_XCBC_PRF_128_update()
MOC_EXTERN MSTATUS AES_XCBC_PRF_128_update |
( |
MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte * |
data, |
|
|
sbyte4 |
dataLength, |
|
|
AES_XCBC_PRF_128_Ctx * |
pCtx |
|
) |
| |
Updates the state of an AES_XCBC_PRF_128_Ctx context with data. This method is a macro which is expanded to AES_XCBC_MAC_96_update
.
- Parameters
-
data | The buffer of input data. |
dataLength | The length of pData in bytes. |
pCtx | The already initialized context to be updated. |
- Returns
OK
(0) if successful, otherwise a negative number error code from merrors.h.