Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Block Hashing for Large Files

Python License: MIT Status

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.


Main Features

  • 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.

Execution and Development Guide

1. Clone the Repository

git clone https://github.com/CamiloAT/aguirre-arias-galvis-hash.git
cd aguirre-arias-galvis-hash

2. Requirements

  • Python 3.8 or higher
  • Standard built-in Python libraries (os, time, hashlib, struct, json, random)
  • No external dependencies or pip installs required
  • Multi-platform (Windows, macOS, Linux)

3. Run the Program

python aguirre_arias_galvis_hash.py

Note: 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.


Project Structure

aguirre-arias-galvis-hash/
├── aguirre_arias_galvis_hash.py  ← Main algorithm implementation
├── README.md                     ← Project documentation
└── .gitignore                    ← Git ignore rules

Tech Stack

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

Authors

Name GitHub
Diego Fernando Aguirre Tenjo @elcokiin
Camilo Andres Arias Tenjo @CamiloAT
Katlyn Jennelis Galvis Rodriguez @Katlyng

Cryptography & Algorithm Development

About

Custom 256-bit block hash for large files (512-bit blocks) - Python implementation & benchmarks

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages