18 #ifndef __CRYPTO_INTERFACE_CHACHA20_HEADER__ 19 #define __CRYPTO_INTERFACE_CHACHA20_HEADER__ 44 MOC_SYM(hwAccelDescr hwAccelCtx)
74 MOC_SYM(hwAccelDescr hwAccelCtx)
91 MOC_SYM(hwAccelDescr hwAccelCtx)
123 MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx ctx,
146 MOC_SYM(hwAccelDescr hwAccelCtx)
161 MOC_SYM(hwAccelDescr hwAccelCtx)
202 ubyte *pNonce, ubyte4 nlen,
203 ubyte *pAdata, ubyte4 alen,
204 ubyte *pData, ubyte4 dlen,
205 ubyte4 verifyLen, sbyte4 encrypt);
226 MOC_SYM(hwAccelDescr hwAccelCtx)
259 MOC_SYM(hwAccelDescr hwAccelCtx)
286 MOC_SYM(hwAccelDescr hwAccelCtx)
313 MOC_SYM(hwAccelDescr hwAccelCtx)
349 MOC_SYM(hwAccelDescr hwAccelCtx)
366 MOC_SYM(hwAccelDescr hwAccelCtx)
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_cipherSSH(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx ctx, ubyte *pNonce, ubyte4 nlen, ubyte *pAdata, ubyte4 alen, ubyte *pData, ubyte4 dlen, ubyte4 verifyLen, sbyte4 encrypt)
Performs the ChaCha20poly1305 AEAD algorithm as specified for SSH authentication protocol.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_update_aad(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pAadData, ubyte4 aadDataLen)
Updates a ChaCha20Ctx context with additional authenticated data.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DeleteChaCha20Ctx(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppBulkCtx)
Delete a ChaCha20 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_CHACHA20_setNonceAndCounterSSH(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx ctx, ubyte *pNonce, ubyte4 nonceLength, ubyte *pCounter, ubyte counterLength)
Set values for the nonce and counter blocks for ChaCha20 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_cipher(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pNonce, ubyte4 noncelen, ubyte *pAad, ubyte4 aadLen, ubyte *pData, ubyte4 dataLen, ubyte4 verifyLen, sbyte4 encrypt)
Performs the ChaCha20 Poly1305 AEAD operation.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_update_nonce(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pNonce, ubyte4 nonceLen)
Adds the nonce value to a ChaCha20Ctx context data structure for use with the Poly1305 MAC algorithm...
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_update_data(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pData, ubyte4 dataLen)
Updates a ChaCha20Ctx context with data to be encrypted or decrypted.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_deleteCtx(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx *ppCtx)
Deletes a ChaCha20Poly1305 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_DoChaCha20(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pBulkCtx, ubyte *pData, sbyte4 dataLen, sbyte4 mode, ubyte *pIv)
Encrypt or decrypt data using the provided ChaCha20 context.
MOC_EXTERN BulkCtx CRYPTO_INTERFACE_ChaCha20Poly1305_createCtx(MOC_SYM(hwAccelDescr hwAccelCtx) ubyte *pKey, sbyte4 keyLen, sbyte4 encrypt)
Create a new ChaCha20Poly1305 context for use in the ChaCha20 Poly1305 AEAD.
MOC_EXTERN BulkCtx CRYPTO_INTERFACE_CreateChaCha20Ctx(MOC_SYM(hwAccelDescr hwAccelCtx) const ubyte pKey[48], sbyte4 keyLen, sbyte4 mode)
Create a new ChaCha20 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_cloneCtx(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, BulkCtx *ppNewCtx)
Clone a ChaCha20Poly1305 context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_ChaCha20Poly1305_final(MOC_SYM(hwAccelDescr hwAccelCtx) BulkCtx pCtx, ubyte *pTag, ubyte4 tagLen)
Finalizes a previously initialized context and computes or verifies the MAC.