|
MCCI TweetNaCl
TweetNaCl library adapted for embedded use
|
Collaboration diagram for Authenticated encryptions:Data Structures | |
| struct | mcci_tweetnacl_secretbox_cipherzero_t |
| Reference structure for bytes required to be zero at front of cihper text. More... | |
| struct | mcci_tweetnacl_secretbox_key_t |
| Reference structure for key bytes for secretbox. More... | |
| struct | mcci_tweetnacl_secretbox_messagezero_t |
| Reference structure for bytes requried to be zero at front of plaintext. More... | |
| struct | mcci_tweetnacl_secretbox_nonce_t |
| Reference structure for nonce bytes for secretbox. More... | |
Functions | |
| static mcci_tweetnacl_result_t | mcci_tweetnacl_secretbox (unsigned char *pCipherText, const unsigned char *pPlainText, size_t sizeText, const mcci_tweetnacl_secretbox_nonce_t *pNonce, const mcci_tweetnacl_secretbox_key_t *pKey) |
| Secret-key authenticated encryption (using xsalsa20) More... | |
| static mcci_tweetnacl_result_t | mcci_tweetnacl_secretbox_open (unsigned char *pPlainText, const unsigned char *pCipherText, size_t sizeText, const mcci_tweetnacl_secretbox_nonce_t *pNonce, const mcci_tweetnacl_secretbox_key_t *pKey) |
| Secret-key authenticated decryption (using xsalsa20) More... | |
|
inlinestatic |
Secret-key authenticated encryption (using xsalsa20)
| [out] | pCipherText | pointer to buffer of size sizeText bytes. |
| [in] | pPlainText | pointer to buffer of size sizeText bytes. |
| [in] | sizeText | size of the output text buffer |
| [in] | pNonce | pointer to 24-byte nonce |
| [in] | pKey | pointer to 32-byte key buffer. |
pPlainText must start with a string of sizeof(mcci_tweetnacl_secretbox_messagezero_t::bytes) bytes of zero. The first sizeof(mcci_tweetnacl_secretbox_cipherzero_t::bytes) bytes of pCipherText will be zero. Thus, the real ciphertext data is from pCipherText + sizeof(mcci_tweetnacl_secretbox_cipherzero_t::bytes) to pCihperText + sizeText - 1.Definition at line 100 of file mcci_tweetnacl_secretbox.h.
References mcci_tweetnacl_secretbox_nonce_t::bytes, and mcci_tweetnacl_secretbox_key_t::bytes.
|
inlinestatic |
Secret-key authenticated decryption (using xsalsa20)
| [out] | pPlainText | pointer to buffer of size sizeText bytes. |
| [in] | pCipherText | pointer to buffer of size sizeText bytes. |
| [in] | sizeText | size of the output text buffer |
| [in] | pNonce | pointer to 24-byte nonce |
| [in] | pKey | pointer to 32-byte key buffer. |
pCipherText must start with a string of sizeof(mcci_tweetnacl_secretbox_cipherzero_t::bytes) bytes of zero. The first sizeof(mcci_tweetnacl_secretbox_messagezero_t::bytes) bytes of pPlainText will be zero. Thus, the real plaintext data is from pPlainText + sizeof(mcci_tweetnacl_secretbox_messagezero_t::bytes) to pPlainText + sizeText - 1.Definition at line 140 of file mcci_tweetnacl_secretbox.h.
References mcci_tweetnacl_secretbox_nonce_t::bytes, and mcci_tweetnacl_secretbox_key_t::bytes.