2005-04-01 22:15:56 +02:00
|
|
|
/* Copyright 2003 Roger Dingledine
|
2006-02-09 06:46:49 +01:00
|
|
|
* Copyright 2004-2006 Roger Dingledine, Nick Mathewson */
|
2003-06-30 21:18:12 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/* Implements a minimal interface to counter-mode AES. */
|
|
|
|
|
|
|
|
#ifndef __AES_H
|
|
|
|
#define __AES_H
|
2004-11-29 23:25:31 +01:00
|
|
|
#define AES_H_ID "$Id$"
|
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-08-11 22:40:21 +02:00
|
|
|
#include "../common/torint.h"
|
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);
|
2003-06-30 21:18:12 +02:00
|
|
|
void aes_free_cipher(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);
|
2003-06-30 21:18:12 +02:00
|
|
|
uint64_t aes_get_counter(aes_cnt_cipher_t *cipher);
|
|
|
|
void aes_set_counter(aes_cnt_cipher_t *cipher, uint64_t counter);
|
|
|
|
void aes_adjust_counter(aes_cnt_cipher_t *cipher, long delta);
|
|
|
|
|
|
|
|
#endif
|
2005-06-09 21:03:31 +02:00
|
|
|
|