MCCI TweetNaCl
TweetNaCl library adapted for embedded use
+ Collaboration diagram for Authentication:

Data Structures

struct  mcci_tweetnacl_auth_authenticator_t
 abstract type for authenticators More...
 
struct  mcci_tweetnacl_auth_key_t
 abstract type for auth keys More...
 

Functions

static void mcci_tweetnacl_auth (mcci_tweetnacl_auth_authenticator_t *pAuth, const unsigned char *pMessage, size_t nMessage, const mcci_tweetnacl_auth_key_t *pKey)
 Secret-key message authentication: generate authenticator (HMAC) More...
 
static mcci_tweetnacl_result_t mcci_tweetnacl_auth_verify (const mcci_tweetnacl_auth_authenticator_t *pAuth, const unsigned char *pMessage, size_t nMessage, const mcci_tweetnacl_auth_key_t *pKey)
 Secret-key message authentication: verify authenticity (HMAC) More...
 

Detailed Description

Function Documentation

◆ mcci_tweetnacl_auth()

static void mcci_tweetnacl_auth ( mcci_tweetnacl_auth_authenticator_t pAuth,
const unsigned char *  pMessage,
size_t  nMessage,
const mcci_tweetnacl_auth_key_t *  pKey 
)
inlinestatic

Secret-key message authentication: generate authenticator (HMAC)

Parameters
[out]pAuthis set to the authenticator
[in]pMessageis the message to be hashed
[in]nMessageis the length of the message in bytes
[in]pKeyis the secret key to be used for generating the authenticator.
See also
https://nacl.cr.yp.to/auth.html

Definition at line 83 of file mcci_tweetnacl_auth.h.

References mcci_tweetnacl_auth_authenticator_t::bytes.

◆ mcci_tweetnacl_auth_verify()

static mcci_tweetnacl_result_t mcci_tweetnacl_auth_verify ( const mcci_tweetnacl_auth_authenticator_t pAuth,
const unsigned char *  pMessage,
size_t  nMessage,
const mcci_tweetnacl_auth_key_t *  pKey 
)
inlinestatic

Secret-key message authentication: verify authenticity (HMAC)

Parameters
[in]pAuthis the authenticator
[in]pMessageis the message to be checked
[in]nMessageis the length of the message in bytes
[in]pKeyis the secret key that was used to generate the authenticator.
Returns
zero if message passes the test, -1 otherwise.
See also
https://nacl.cr.yp.to/auth.html

Definition at line 112 of file mcci_tweetnacl_auth.h.

References mcci_tweetnacl_auth_authenticator_t::bytes.