Biometric Fingerprint Enhancement and Segmentation Using an AES-256-GCM Cryptographic Vault.
AES256GCM_CodeMorph is an end-to-end biometric processing and security suite that enhances raw fingerprint images into standardized square templates and encrypts them using AES-256-GCM with PBKDF2-HMAC-SHA256 (600k rounds) key derivation.
- Computer Vision Pipeline (
testing.py): Automatic polarity detection, CLAHE contrast enhancement, bilateral ridge filtering, texture variance ROI segmentation, and clean square box formatting. - Dual Outputs: Generates a clean binary template
(a)(black ridges on white canvas) and an enhanced grayscale template(b). - AES-256-GCM Cryptographic Vault (
crypto_vault.py): Secures biometric templates into encrypted binary.vaultpackages and self-contained zero-install.htmlweb vaults. - Standalone Decryptor (
unlock.py): GUI and CLI tool to authenticate and view encrypted vaults offline.
- Input: Load optical sensor image, photo, scan, or generate synthetic fingerprint.
- Enhance & Segment: Normalize illumination, enhance contrast, segment ROI, and crop centered square template.
- Export & Encrypt: Save templates
(a)and(b), derive 256-bit key via PBKDF2-HMAC-SHA256 from an 8-digit PIN, and generate.vault,.html, and_PIN.txtfiles. - Decrypt: View offline via
unlock.pyor double-click.htmlto open in any web browser.
git clone https://github.com/hasheramin5-cyber/AES256GCM_CodeMorph.git
cd AES256GCM_CodeMorph
pip install opencv-python numpy cryptography# Interactive GUI file picker
python testing.py
# Direct file execution
python testing.py "Assets/fp -2.png"Outputs generated in the same directory: <name>(a).png, <name>(b).png, <name>(b).vault, <name>(b)_secure.html, <name>(b)_PIN.txt.
- Browser (Zero-Install): Double-click
<name>(b)_secure.htmlin any web browser and enter the PIN. - Python Tool: Run
python unlock.py(orpython unlock.py "<name>(b).vault").
Secured using AES-256-GCM authenticated encryption (128-bit integrity tag) combined with PBKDF2-HMAC-SHA256 (600,000 rounds) key derivation. Browser decryption is executed entirely offline on the client side using the WebCrypto API (crypto.subtle).
Hasher Amin