A custom cryptographic hash function algorithm built from scratch in Python, designed to process large files (>1MB) deterministically in blocks with chaining mechanisms, outputting a unique fixed-length 256-bit integrity value.
The decision for the name aguirre_arias_galvis_hash.py was a simple creative process of joining the first surnames of the three authors who developed the idea for the encryption process: Diego Fernando Aguirre Tenjo, Camilo Andres Arias Tenjo, and Katlyn Jennelis Galvis Rodriguez.
- Custom Compression Function: 32-round mixing with XOR operations, bitwise rotations, and modular additions for secure data diffusion.
- Block Processing Architecture: Reads files in 512-bit (64-byte) blocks to handle large files efficiently without memory overflow.
- Merkle-Damgård Padding: Implements length-extension attack prevention with deterministic padding scheme.
- Avalanche Effect Validation: Automatically verifies that 1-bit input changes produce ~50% output bit changes.
- Performance Benchmarking: Compares execution times against Python's native SHA-256 implementation.
- Automated Test Generation: Creates 1MB, 5MB, and 10MB test files with controlled modifications for validation.
git clone https://github.com/CamiloAT/aguirre-arias-galvis-hash.git
cd aguirre-arias-galvis-hash- Python 3.8 or higher
- Standard built-in Python libraries (
os,time,hashlib,struct,json,random) - No external dependencies or
pipinstalls required - Multi-platform (Windows, macOS, Linux)
python aguirre_arias_galvis_hash.pyNote: The program will automatically generate test files, compute hashes, validate the avalanche effect, and benchmark against SHA-256. All results are displayed in the console.
aguirre-arias-galvis-hash/
├── aguirre_arias_galvis_hash.py ← Main algorithm implementation
├── README.md ← Project documentation
└── .gitignore ← Git ignore rules
| Layer | Technology |
|---|---|
| Language | Python 3.8+ |
| Hashing | Custom block cipher (512-bit blocks, 256-bit output) |
| Compression | Davies-Meyer construction with 32-round mixing |
| Padding | Merkle-Damgård compatible scheme |
| Testing | Automated file generation and validation |
| Benchmarking | Python hashlib.sha256 comparison |
| Name | GitHub |
|---|---|
| Diego Fernando Aguirre Tenjo | @elcokiin |
| Camilo Andres Arias Tenjo | @CamiloAT |
| Katlyn Jennelis Galvis Rodriguez | @Katlyng |
Cryptography & Algorithm Development