Split ccm_auth function.
Move logic to ccm_starts, ccm_set_lengths, ccm_update_ad, ccm_update and ccm_finish Use separate variable to track context state. Encode first block only if both mbedtls_ccm_starts() and mbedtls_ccm_set_lengths() were called. Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
89d469cdb4
commit
793692cbcb
2 changed files with 178 additions and 50 deletions
|
@ -87,6 +87,9 @@ typedef struct mbedtls_ccm_context
|
|||
#MBEDTLS_CCM_DECRYPT or
|
||||
#MBEDTLS_CCM_STAR_ENCRYPT or
|
||||
#MBEDTLS_CCM_STAR_DECRYPT. */
|
||||
int MBEDTLS_PRIVATE(state); /*!< Working value holding context's
|
||||
state. Used for chunked data
|
||||
input */
|
||||
}
|
||||
mbedtls_ccm_context;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue