#include "aes/rijndael.h"
Go to the source code of this file.
|  | 
| long int | dtls_ccm_encrypt_message (rijndael_ctx *ctx, size_t M, size_t L, unsigned char nonce[DTLS_CCM_BLOCKSIZE], unsigned char *msg, size_t lm, const unsigned char *aad, size_t la) | 
|  | 
| long int | dtls_ccm_decrypt_message (rijndael_ctx *ctx, size_t M, size_t L, unsigned char nonce[DTLS_CCM_BLOCKSIZE], unsigned char *msg, size_t lm, const unsigned char *aad, size_t la) | 
|  | 
      
        
          | #define DTLS_CCM_BLOCKSIZE   16 | 
      
 
size of hmac blocks 
Definition at line 33 of file ccm.h.
 
 
max number of bytes in digest 
Definition at line 34 of file ccm.h.
 
 
      
        
          | #define DTLS_CCM_NONCE_SIZE   12 | 
      
 
size of nonce 
Definition at line 35 of file ccm.h.
 
 
      
        
          | long int dtls_ccm_decrypt_message | ( | rijndael_ctx * | ctx, | 
        
          |  |  | size_t | M, | 
        
          |  |  | size_t | L, | 
        
          |  |  | unsigned char | nonce[DTLS_CCM_BLOCKSIZE], | 
        
          |  |  | unsigned char * | msg, | 
        
          |  |  | size_t | lm, | 
        
          |  |  | const unsigned char * | aad, | 
        
          |  |  | size_t | la | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | long int dtls_ccm_encrypt_message | ( | rijndael_ctx * | ctx, | 
        
          |  |  | size_t | M, | 
        
          |  |  | size_t | L, | 
        
          |  |  | unsigned char | nonce[DTLS_CCM_BLOCKSIZE], | 
        
          |  |  | unsigned char * | msg, | 
        
          |  |  | size_t | lm, | 
        
          |  |  | const unsigned char * | aad, | 
        
          |  |  | size_t | la | 
        
          |  | ) |  |  | 
      
 
Authenticates and encrypts a message using AES in CCM mode. Please see also RFC 3610 for the meaning of M, L, lm and la.
- Parameters
- 
  
    | ctx | The initialized rijndael_ctx object to be used for AES operations. |  | M | The number of authentication octets. |  | L | The number of bytes used to encode the message length. |  | N | The nonce value to use. You must provide DTLS_CCM_BLOCKSIZEnonce octets, although only the first16-Lare used. |  | msg | The message to encrypt. The first laoctets are additional authentication data that will be cleartext. Note that the encryption operation modifies the contents ofmsgand addsMbytes MAC. Therefore, the buffer must be at leastlm+Mbytes large. |  | lm | The actual length of msg. |  | aad | A pointer to the additional authentication data (can be NULLiflais zero). |  | la | The number of additional authentication octets (may be zero). |  
 
- Returns
- FIXME 
Definition at line 176 of file ccm.c.