2007-12-12 22:09:01 +01:00
|
|
|
/* Copyright (c) 2003, Roger Dingledine
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2011-01-03 17:50:39 +01:00
|
|
|
* Copyright (c) 2007-2011, The Tor Project, Inc. */
|
2003-06-30 21:18:12 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/* Implements a minimal interface to counter-mode AES. */
|
|
|
|
|
2008-12-29 03:21:02 +01:00
|
|
|
#ifndef _TOR_AES_H
|
|
|
|
#define _TOR_AES_H
|
2003-06-30 21:18:12 +02:00
|
|
|
|
2004-05-10 09:54:13 +02:00
|
|
|
/**
|
|
|
|
* \file aes.h
|
|
|
|
* \brief Headers for aes.c
|
|
|
|
*/
|
|
|
|
|
2003-06-30 21:18:12 +02:00
|
|
|
struct aes_cnt_cipher;
|
|
|
|
typedef struct aes_cnt_cipher aes_cnt_cipher_t;
|
|
|
|
|
2004-10-27 20:16:37 +02:00
|
|
|
aes_cnt_cipher_t* aes_new_cipher(void);
|
2012-01-18 21:53:30 +01:00
|
|
|
void aes_cipher_free(aes_cnt_cipher_t *cipher);
|
2005-05-07 07:55:06 +02:00
|
|
|
void aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits);
|
2005-12-14 21:40:40 +01:00
|
|
|
void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len,
|
|
|
|
char *output);
|
2008-02-07 17:10:33 +01:00
|
|
|
void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
|
2007-09-19 17:53:38 +02:00
|
|
|
void aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv);
|
2003-06-30 21:18:12 +02:00
|
|
|
|
2011-11-21 03:20:31 +01:00
|
|
|
int evaluate_evp_for_aes(int force_value);
|
2012-01-09 23:40:11 +01:00
|
|
|
int evaluate_ctr_for_aes(void);
|
2011-11-21 03:20:31 +01:00
|
|
|
|
2003-06-30 21:18:12 +02:00
|
|
|
#endif
|
2005-06-09 21:03:31 +02:00
|
|
|
|