ctr.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef CRYPTO_MODES_CTR_H
21 #define CRYPTO_MODES_CTR_H
22 
23 #include "crypto/ciphers.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
44 int cipher_encrypt_ctr(cipher_t* cipher, uint8_t nonce_counter[16],
45  uint8_t nonce_len, uint8_t* input, size_t length,
46  uint8_t* output);
47 
48 
65 int cipher_decrypt_ctr(cipher_t* cipher, uint8_t nonce_counter[16],
66  uint8_t nonce_len, uint8_t* input, size_t length,
67  uint8_t* output);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* CRYPTO_MODES_CTR_H */
int cipher_decrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16], uint8_t nonce_len, uint8_t *input, size_t length, uint8_t *output)
Decrypt data of arbitrary length in counter mode.
int cipher_encrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16], uint8_t nonce_len, uint8_t *input, size_t length, uint8_t *output)
Encrypt data of arbitrary length in counter mode.
basic struct for using block ciphers contains the cipher interface and the context ...
Definition: ciphers.h:112
Headers for the packet encryption class.