Digitally signs and verifies files using RSA and SHA-256 to ensure file authenticity, integrity, and tamper detection.
Developed by ยฉ 2026 Syed Shaheer Hussain
The Digital SignatureโBased File Authentication System is a Python-based desktop application designed to ensure file integrity, authenticity, and non-repudiation using modern cryptographic techniques.
This system allows users to digitally sign files using RSA private keys and later verify those files using corresponding public keys or X.509 certificates. Any modification to the file after signing is immediately detected during verification.
This project demonstrates a real-world implementation of cryptography, commonly used in secure communications, legal documents, banking systems, and cybersecurity applications.
- Ensure file integrity and tamper detection
- Authenticate the file owner using cryptographic keys
- Implement RSA-based digital signatures
- Support X.509 digital certificates
- Provide an easy-to-use graphical interface
- Demonstrate practical cybersecurity concepts
- Enable secure file exchange and verification
A digital signature is a cryptographic mechanism that validates the authenticity and integrity of digital data.
A digital signature is like a digital fingerprint and lock attached to a file.
It proves:
- Who signed the file
- That the file was not altered
- That the signer cannot deny signing it
- โ Data Integrity
- โ Authentication
- โ Non-Repudiation
- โ Legal Validity
- โ Cybersecurity Assurance
- โ Used in banking, blockchain, government, and legal systems
- Python 3.10+ (Tested on Python 3.14)
- RSA (2048 / 3072 / 4096 bit)
- SHA-256 Hashing
- PSS Padding
- X.509 Certificates
- Tkinter
- ttk Widgets
- TkinterDnD (optional drag & drop)
cryptographyhashlibbase64datetimetkintertkinterdnd2(optional)
pip install cryptography
pip install tkinterdnd2
Tkinter comes pre-installed with Python.
Digital Signature-Based File Authentication/
โโโ README.md
โโโ main.py
โโโ screenshots/
โ โโโ 1.png
โ โโโ 2.png
โ โโโ 3.png
โ โโโ 4.png
โ โโโ 5.png
- GUI Layer (Tkinter)
- Cryptographic Engine
- Certificate Engine
- Audit Logger
- File System
- Application starts
- GUI loads
- User generates or loads RSA keys
- File is selected
- File hash (SHA-256) is generated
- Hash is signed using private key
- Signature is saved or embedded
- Verification uses public key
- Result is displayed
- Events are logged
START
|
v
Launch Application
|
v
Generate / Load RSA Keys
|
v
Select File
|
v
Generate SHA-256 Hash
|
v
Sign Hash with Private Key
|
v
Save / Embed Signature
|
v
Verify Using Public Key
|
v
Display Result
|
v
END
- File is read in binary mode
- SHA-256 hash is generated
- Hash is encrypted with private key
- Signature is saved or embedded
- File hash is recalculated
- Signature is decrypted using public key
- Hashes are compared
- Match โ Valid
- Mismatch โ Invalid
- Install Python
- Extract project folder
- Open terminal in project directory
- Install required packages
- Run
main.py
python main.py
โ A GUI window will open.
- Select key size
- Enter optional password
- Generate RSA key pair
- Generate X.509 certificate
- Select private key
- Select file
- Enter password
- Sign file or embed signature
- Select public key
- Select original file
- Select signature
- Verify authenticity
- View file hash and signature details
- Toggle dark/light mode
- RSA key generation
- X.509 certificate support
- Digital file signing
- Embedded signature support
- Signature verification
- GUI-based interface
- Dark / Light mode
- Audit logging
CryptoEngineCertificateEngineAuditLoggerDigitalSignatureAppSHA-256 hashingRSA signing & verification
Caution
- Do not share private keys
- Losing password makes key unusable
- Modified files will fail verification
- Embedded signatures increase file size
Important
- Designed for educational use
- Production use requires enhancements
- Legal systems require trusted CA certificates
Note
This project is developed for educational and learning purposes only. The developer is not responsible for misuse.
- Cryptography fundamentals
- RSA & hashing algorithms
- Digital certificates
- GUI application design
- Secure file handling
- Cybersecurity principles
- Cybersecurity
- Digital forensics
- Secure systems
- Ethical hacking
- Python GUI development
- Elliptic Curve Cryptography (ECC)
- Cloud-based verification
- Mobile application version
- Database integration
- Hardware security modules
- Verification reports
- Blockchain anchoring
- E-Government portals
- Legal documentation systems
- Banking & finance systems
- Software licensing
- Secure email systems
- Object-Oriented Programming
- Cryptography
- Hashing
- File I/O
- GUI architecture
- Exception handling
ยฉ 2026 Syed Shaheer Hussain Digital SignatureโBased File Authentication System




