Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
crypto
ctaes
ctaes.h
Go to the documentation of this file.
1
/*********************************************************************
2
* Copyright (c) 2016 Pieter Wuille *
3
* Distributed under the MIT software license, see the accompanying *
4
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
5
**********************************************************************/
6
7
#ifndef _CTAES_H_
8
#define _CTAES_H_ 1
9
10
#include <stdint.h>
11
#include <stdlib.h>
12
13
typedef
struct
{
14
uint16_t
slice
[8];
15
}
AES_state
;
16
17
typedef
struct
{
18
AES_state
rk
[11];
19
}
AES128_ctx
;
20
21
typedef
struct
{
22
AES_state
rk
[13];
23
}
AES192_ctx
;
24
25
typedef
struct
{
26
AES_state
rk
[15];
27
}
AES256_ctx
;
28
29
void
AES128_init
(
AES128_ctx
* ctx,
const
unsigned
char
* key16);
30
void
AES128_encrypt
(
const
AES128_ctx
* ctx,
size_t
blocks,
unsigned
char
* cipher16,
const
unsigned
char
* plain16);
31
void
AES128_decrypt
(
const
AES128_ctx
* ctx,
size_t
blocks,
unsigned
char
* plain16,
const
unsigned
char
* cipher16);
32
33
void
AES192_init
(
AES192_ctx
* ctx,
const
unsigned
char
* key24);
34
void
AES192_encrypt
(
const
AES192_ctx
* ctx,
size_t
blocks,
unsigned
char
* cipher16,
const
unsigned
char
* plain16);
35
void
AES192_decrypt
(
const
AES192_ctx
* ctx,
size_t
blocks,
unsigned
char
* plain16,
const
unsigned
char
* cipher16);
36
37
void
AES256_init
(
AES256_ctx
* ctx,
const
unsigned
char
* key32);
38
void
AES256_encrypt
(
const
AES256_ctx
* ctx,
size_t
blocks,
unsigned
char
* cipher16,
const
unsigned
char
* plain16);
39
void
AES256_decrypt
(
const
AES256_ctx
* ctx,
size_t
blocks,
unsigned
char
* plain16,
const
unsigned
char
* cipher16);
40
41
#endif
AES128_encrypt
void AES128_encrypt(const AES128_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
Definition
ctaes.c:501
AES256_encrypt
void AES256_encrypt(const AES256_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
Definition
ctaes.c:542
AES192_decrypt
void AES192_decrypt(const AES192_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
Definition
ctaes.c:530
AES256_init
void AES256_init(AES256_ctx *ctx, const unsigned char *key32)
Definition
ctaes.c:538
AES256_decrypt
void AES256_decrypt(const AES256_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
Definition
ctaes.c:550
AES192_encrypt
void AES192_encrypt(const AES192_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
Definition
ctaes.c:521
AES128_decrypt
void AES128_decrypt(const AES128_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
Definition
ctaes.c:509
AES128_init
void AES128_init(AES128_ctx *ctx, const unsigned char *key16)
Definition
ctaes.c:497
AES192_init
void AES192_init(AES192_ctx *ctx, const unsigned char *key24)
Definition
ctaes.c:517
AES128_ctx
Definition
ctaes.h:17
AES128_ctx::rk
AES_state rk[11]
Definition
ctaes.h:18
AES192_ctx
Definition
ctaes.h:21
AES192_ctx::rk
AES_state rk[13]
Definition
ctaes.h:22
AES256_ctx
Definition
ctaes.h:25
AES256_ctx::rk
AES_state rk[15]
Definition
ctaes.h:26
AES_state
Definition
ctaes.h:13
AES_state::slice
uint16_t slice[8]
Definition
ctaes.h:14
Generated on
for Bitcoin Core by
1.17.0