# aheritianad/bootcamp-blockchain-and-python architecture

> Architecture diagram of the GitHub repository aheritianad/bootcamp-blockchain-and-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aheritianad/bootcamp-blockchain-and-python
- Repository: https://github.com/aheritianad/bootcamp-blockchain-and-python

## Overview

This is an educational Python package for blockchain, cryptography, and related mathematics, accompanied by a tutorial. Its main runtime flow models participants creating signed transaction data, wrapping it in blocks, and maintaining a linked chain. The graph also preserves the package’s independent cryptography and math capabilities. Several relationships are supported only by the SOURCE INDEX import/name references; unsampled implementations are not expanded beyond what those references establish.

Main entry points: [`bcbcpy/node.py`](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/node.py) (Identity and messaging), [`bcbcpy/blockchain/block/block.py`](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/block/block.py) (Blocks and mining), [`bcbcpy/crypto/rsa.py`](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/rsa.py) (RSA keys and cipher), [`bcbcpy/blockchain/block/transaction.py`](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/block/transaction.py) (Transaction data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_participants["Participants"]
  node_node["Identity and messaging<br/>[node.py]"]
end

subgraph group_blockchain["Blockchain"]
  node_transaction["Transaction data<br/>[transaction.py]"]
  node_block["Blocks and mining<br/>[block.py]"]
  node_chain["Chain management<br/>[chain.py]"]
  node_chain_node["Blockchain node<br/>[node.py]"]
end

subgraph group_crypto["Cryptography"]
  node_basekey["Key abstractions<br/>[basekey.py]"]
  node_hash["Hash functions<br/>[hash.py]"]
  node_affine["Affine cipher<br/>[affine.py]"]
  node_permutation["Permutation cipher<br/>[permutation.py]"]
  node_rsa["RSA keys and cipher<br/>[rsa.py]"]
end

subgraph group_math["Math foundations"]
  node_arithmetic["Integer arithmetic<br/>[arithmetic.py]"]
  node_prime["Prime operations<br/>[prime.py]"]
end

subgraph group_learning["Learning materials"]
  node_tutorial["Tutorial notebook<br/>[demo.ipynb]"]
end

node_learner(("Learner"))
node_utils["Encoding utilities<br/>[utils.py]"]

node_learner -->|"studies"| node_tutorial
node_learner -.->|"creates identity"| node_node
node_node -->|"uses keys"| node_basekey
node_node -->|"derives identity"| node_hash
node_node -->|"adds noise"| node_utils
node_node -->|"signs transaction"| node_transaction
node_transaction -->|"requests signature"| node_node
node_transaction -->|"provides data"| node_block
node_chain -->|"creates and validates"| node_block
node_chain_node -->|"uses blocks"| node_block
node_chain_node -->|"uses transactions"| node_transaction
node_chain_node -->|"uses identity"| node_node
node_block -->|"hashes block data"| node_hash
node_block -->|"formats output"| node_utils
node_affine -->|"builds key"| node_basekey
node_affine -->|"uses arithmetic"| node_arithmetic
node_permutation -->|"builds key"| node_basekey
node_rsa -->|"builds key"| node_basekey
node_rsa -->|"uses arithmetic"| node_arithmetic
node_rsa -->|"generates primes"| node_prime
node_rsa -->|"converts text"| node_utils
node_prime -->|"uses decomposition"| node_arithmetic

click node_node "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/node.py"
click node_transaction "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/block/transaction.py"
click node_block "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/block/block.py"
click node_chain "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/chain.py"
click node_chain_node "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/node.py"
click node_basekey "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/basekey.py"
click node_hash "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/hash.py"
click node_affine "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/affine.py"
click node_permutation "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/permutation.py"
click node_rsa "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/rsa.py"
click node_arithmetic "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/math/arithmetic.py"
click node_prime "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/math/prime.py"
click node_utils "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/utils/utils.py"
click node_tutorial "https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/tuto/demo.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_node toneBlue
class node_transaction,node_block,node_chain,node_chain_node toneAmber
class node_basekey,node_hash,node_affine,node_permutation,node_rsa toneMint
class node_arithmetic,node_prime toneRose
class node_tutorial,node_learner toneIndigo
class node_utils toneTeal
```

## Components

### Participants

- [Identity and messaging](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/node.py): `bcbcpy/node.py`

### Blockchain

- [Transaction data](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/block/transaction.py): `bcbcpy/blockchain/block/transaction.py`
- [Blocks and mining](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/block/block.py): `bcbcpy/blockchain/block/block.py`
- [Chain management](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/chain.py): `bcbcpy/blockchain/chain.py`
- [Blockchain node](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/blockchain/node.py): `bcbcpy/blockchain/node.py`

### Cryptography

- [Key abstractions](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/basekey.py): `bcbcpy/crypto/basekey.py`
- [Hash functions](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/hash.py): `bcbcpy/crypto/hash.py`
- [Affine cipher](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/affine.py): `bcbcpy/crypto/affine.py`
- [Permutation cipher](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/permutation.py): `bcbcpy/crypto/permutation.py`
- [RSA keys and cipher](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/crypto/rsa.py): `bcbcpy/crypto/rsa.py`

### Math foundations

- [Integer arithmetic](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/math/arithmetic.py): `bcbcpy/math/arithmetic.py`
- [Prime operations](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/math/prime.py): `bcbcpy/math/prime.py`

### Learning materials

- [Tutorial notebook](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/tuto/demo.ipynb): `tuto/demo.ipynb`

### Other components

- **Learner**
- [Encoding utilities](https://github.com/aheritianad/bootcamp-blockchain-and-python/blob/main/bcbcpy/utils/utils.py): `bcbcpy/utils/utils.py`

## Connections

- Learner → Tutorial notebook: studies (evidence: `readme.md`)
- Learner → Identity and messaging: creates identity
- Identity and messaging → Key abstractions: uses keys (evidence: `bcbcpy/node.py`)
- Identity and messaging → Hash functions: derives identity (evidence: `bcbcpy/node.py`)
- Identity and messaging → Encoding utilities: adds noise (evidence: `bcbcpy/node.py`)
- Identity and messaging → Transaction data: signs transaction (evidence: `bcbcpy/blockchain/block/transaction.py`)
- Transaction data → Identity and messaging: requests signature (evidence: `bcbcpy/blockchain/block/transaction.py`)
- Transaction data → Blocks and mining: provides data (evidence: `bcbcpy/blockchain/block/transaction.py`)
- Chain management → Blocks and mining: creates and validates (evidence: `bcbcpy/blockchain/chain.py`)
- Blockchain node → Blocks and mining: uses blocks (evidence: `bcbcpy/blockchain/node.py`)
- Blockchain node → Transaction data: uses transactions (evidence: `bcbcpy/blockchain/node.py`)
- Blockchain node → Identity and messaging: uses identity (evidence: `bcbcpy/blockchain/node.py`)
- Blocks and mining → Hash functions: hashes block data (evidence: `bcbcpy/blockchain/block/block.py`)
- Blocks and mining → Encoding utilities: formats output (evidence: `bcbcpy/blockchain/block/block.py`)
- Affine cipher → Key abstractions: builds key (evidence: `bcbcpy/crypto/affine.py`)
- Affine cipher → Integer arithmetic: uses arithmetic (evidence: `bcbcpy/crypto/affine.py`)
- Permutation cipher → Key abstractions: builds key (evidence: `bcbcpy/crypto/permutation.py`)
- RSA keys and cipher → Key abstractions: builds key (evidence: `bcbcpy/crypto/rsa.py`)
- RSA keys and cipher → Integer arithmetic: uses arithmetic (evidence: `bcbcpy/crypto/rsa.py`)
- RSA keys and cipher → Prime operations: generates primes (evidence: `bcbcpy/crypto/rsa.py`)
- RSA keys and cipher → Encoding utilities: converts text (evidence: `bcbcpy/crypto/rsa.py`)
- Prime operations → Integer arithmetic: uses decomposition (evidence: `bcbcpy/math/prime.py`)
