Tor 0.4.9.8
Loading...
Searching...
No Matches
aes_nss.c File Reference

Use NSS to implement AES_CTR. More...

#include "orconfig.h"
#include "lib/crypt_ops/aes.h"
#include "lib/crypt_ops/crypto_nss_mgt.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/log/util_bug.h"
#include <pk11pub.h>
#include <secerr.h>

Go to the source code of this file.

Data Structures

struct  crypto_cipher_t
 

Functions

static PK11Context * aes_new_cipher_internal (const uint8_t *key, const uint8_t *iv, int key_bits)
 
aes_cnt_cipher_taes_new_cipher (const uint8_t *key, const uint8_t *iv, int key_bits)
 
void aes_cipher_free_ (aes_cnt_cipher_t *cipher)
 
void aes_cipher_set_iv_aligned (aes_cnt_cipher_t *cipher, const uint8_t *iv)
 
void aes_cipher_set_key (aes_cnt_cipher_t *cipher, const uint8_t *key, int key_bits)
 
void aes_crypt_inplace (aes_cnt_cipher_t *cipher, char *data_, size_t len_)
 
aes_raw_t * aes_raw_new (const uint8_t *key, int key_bits, bool encrypt)
 
void aes_raw_free_ (aes_raw_t *cipher_)
 
void aes_raw_set_key (aes_raw_t **cipher, const uint8_t *key, int key_bits, bool encrypt)
 
void aes_raw_encrypt (const aes_raw_t *cipher, uint8_t *block)
 
void aes_raw_decrypt (const aes_raw_t *cipher, uint8_t *block)
 

Detailed Description

Use NSS to implement AES_CTR.

Definition in file aes_nss.c.

Macro Definition Documentation

◆ TOR_AES_PRIVATE

#define TOR_AES_PRIVATE

Definition at line 13 of file aes_nss.c.

◆ USE_AES_RAW

#define USE_AES_RAW

Definition at line 12 of file aes_nss.c.

Function Documentation

◆ aes_cipher_free_()

void aes_cipher_free_ ( aes_cnt_cipher_t * cipher)

Definition at line 95 of file aes_nss.c.

◆ aes_cipher_set_iv_aligned()

void aes_cipher_set_iv_aligned ( aes_cnt_cipher_t * cipher,
const uint8_t * iv )

Definition at line 105 of file aes_nss.c.

◆ aes_cipher_set_key()

void aes_cipher_set_key ( aes_cnt_cipher_t * cipher,
const uint8_t * key,
int key_bits )

Definition at line 115 of file aes_nss.c.

◆ aes_crypt_inplace()

void aes_crypt_inplace ( aes_cnt_cipher_t * cipher,
char * data_,
size_t len_ )

Definition at line 130 of file aes_nss.c.

◆ aes_new_cipher()

aes_cnt_cipher_t * aes_new_cipher ( const uint8_t * key,
const uint8_t * iv,
int key_bits )

Definition at line 84 of file aes_nss.c.

◆ aes_new_cipher_internal()

static PK11Context * aes_new_cipher_internal ( const uint8_t * key,
const uint8_t * iv,
int key_bits )
static

Definition at line 36 of file aes_nss.c.

◆ aes_raw_decrypt()

void aes_raw_decrypt ( const aes_raw_t * cipher,
uint8_t * block )

Definition at line 217 of file aes_nss.c.

◆ aes_raw_encrypt()

void aes_raw_encrypt ( const aes_raw_t * cipher,
uint8_t * block )

Definition at line 207 of file aes_nss.c.

◆ aes_raw_free_()

void aes_raw_free_ ( aes_raw_t * cipher_)

Definition at line 190 of file aes_nss.c.

◆ aes_raw_new()

aes_raw_t * aes_raw_new ( const uint8_t * key,
int key_bits,
bool encrypt )

Definition at line 145 of file aes_nss.c.

◆ aes_raw_set_key()

void aes_raw_set_key ( aes_raw_t ** cipher,
const uint8_t * key,
int key_bits,
bool encrypt )

Definition at line 198 of file aes_nss.c.