Tor 0.4.9.0-alpha-dev
aes.h
Go to the documentation of this file.
1/* Copyright (c) 2003, Roger Dingledine
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
4/* See LICENSE for licensing information */
5
6/* Implements a minimal interface to counter-mode AES. */
7
8#ifndef TOR_AES_H
9#define TOR_AES_H
10
11/**
12 * \file aes.h
13 * \brief Headers for aes.c
14 */
15
16#include "lib/cc/torint.h"
17#include "lib/malloc/malloc.h"
18
19typedef struct aes_cnt_cipher_t aes_cnt_cipher_t;
20
21aes_cnt_cipher_t* aes_new_cipher(const uint8_t *key, const uint8_t *iv,
22 int key_bits);
23void aes_cipher_free_(aes_cnt_cipher_t *cipher);
24#define aes_cipher_free(cipher) \
25 FREE_AND_NULL(aes_cnt_cipher_t, aes_cipher_free_, (cipher))
26void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
27
28int evaluate_evp_for_aes(int force_value);
29int evaluate_ctr_for_aes(void);
30
31#endif /* !defined(TOR_AES_H) */
Headers for util_malloc.c.
Integer definitions used throughout Tor.