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.
501void AES128_encrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16) {502while (blocks--) {503AES_encrypt(ctx->rk, 10, cipher16, plain16);504cipher16 += 16;505plain16 += 16;506}507}509void AES128_decrypt(const AES128_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16) {510while (blocks--) {511AES_decrypt(ctx->rk, 10, plain16, cipher16);512cipher16 += 16;513plain16 += 16;514}515}517void AES192_init(AES192_ctx* ctx, const unsigned char* key24) {518AES_setup(ctx->rk, key24, 6, 12);519}521void AES192_encrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16) {522while (blocks--) {523AES_encrypt(ctx->rk, 12, cipher16, plain16);524cipher16 += 16;525plain16 += 16;526}528}530void AES192_decrypt(const AES192_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16) {531while (blocks--) {532AES_decrypt(ctx->rk, 12, plain16, cipher16);533cipher16 += 16;534plain16 += 16;535}536}538void AES256_init(AES256_ctx* ctx, const unsigned char* key32) {539AES_setup(ctx->rk, key32, 8, 14);540}542void AES256_encrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* cipher16, const unsigned char* plain16) {543while (blocks--) {544AES_encrypt(ctx->rk, 14, cipher16, plain16);545cipher16 += 16;546plain16 += 16;547}548}550void AES256_decrypt(const AES256_ctx* ctx, size_t blocks, unsigned char* plain16, const unsigned char* cipher16) {551while (blocks--) {552AES_decrypt(ctx->rk, 14, plain16, cipher16);553cipher16 += 16;554plain16 += 16;555}556}
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.