Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
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**********************************************************************/7#ifndef _CTAES_H_8#define _CTAES_H_ 110#include <stdint.h>11#include <stdlib.h>13typedef struct {14uint16_t slice[8];15} AES_state;17typedef struct {18AES_state rk[11];19} AES128_ctx;21typedef struct {22AES_state rk[13];23} AES192_ctx;25typedef struct {26AES_state rk[15];27} AES256_ctx;29void AES128_init(AES128_ctx* ctx, const unsigned char* key16);30void AES128_encrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16);31void AES128_decrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16);33void AES192_init(AES192_ctx* ctx, const unsigned char* key24);34void AES192_encrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16);35void AES192_decrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16);37void AES256_init(AES256_ctx* ctx, const unsigned char* key32);38void AES256_encrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16);39void AES256_decrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16);41#endif
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.