Files
tea3-py/README.md
T

61 lines
2.1 KiB
Markdown

# tea3-py
More documentation available [here](https://hadow.fr/articles/tea3.pdf)
## install
```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .
```
## run tests
```bash
pip install pytest
pytest
```
## run linear and differential bias empirical tests
in the venv
```bash
tea3-linear-bias
tea3-differential-bias
```
## derive lookup tables
```bash
lookup-tables
```
## run sagemath script
`deactivate` the venv first, then with sagemath installed:
```bash
./run_sage.sh
```
Modes are:
| Mode | Explanation |
| ---------------------------------------------- | ----------- |
| 1. Classic inspection | run n steps |
| 2. Advanced inspection with forced 0 or 1 bits | run n steps but with bits forced to 0 or 1 |
| 3. Exhaustive variable-change search | - |
| 4. S box analysis | - |
| 5. Variable XOR | XOR chosen bits inside a register and check the evolution during n steps |
| 6. F31, F32 analysis | - |
| 7. Exhaustive XOR search | XOR bits inside a register, returns the best combination (least number of monomials)|
| 8. Cube attack search (symbolic) | offline part of the cube attack (a precomputed model can be used) |
| 9. Cube attack search (oracle) | offline part of the cube attack (uses TEA-3 cipher as an oracle) |
| 10. Precompute and save model | precompute n steps and save the model |
| 11. Load model | load a saved model |
n steps can be precomputed and then loaded for the offline part of the cube attack with the menu entries 10 and 11.