A role-based, secure hostel visitor management system designed to demonstrate authentication, authorization, encryption, hashing, digital signatures, and encoding as per Cyber Security Lab requirements and NIST SP 800-63-2 E-Authentication guidelines.
Hostel visitor information is highly sensitive and vulnerable to unauthorized access and data tampering when handled manually.
This project implements a secure, application-level security model that ensures:
- Confidentiality
- Integrity
- Authentication
- Authorization
- Non-repudiation
All security mechanisms are handled at the application layer, while Firebase is used only as a secure cloud datastore.
- 🔑 Single-Factor Authentication (Username + Password)
- 🔐 Multi-Factor Authentication (OTP-based)
- 🧾 Role-Based Access Control (ACL)
- 🔒 AES Encryption for visitor data
- 🔑 RSA-based secure AES key exchange
- ✍️ Digital Signature for approval authenticity
- 🧬 Password hashing with salt
- 🧾 Base64 encoding for encrypted data storage
- 🚫 Unauthorized access prevention
- Python 3
- Flask
- Firebase Firestore
(Used strictly for secure data storage — no auth logic in Firebase rules)
- HTML
- Minimal CSS
- Flask
render_template()
hashlib– Password hashing with saltsecrets– Secure OTP & salt generationcryptography– AES, RSA, Digital Signaturesbase64– Encoding & decoding encrypted data
| Role | Description |
|---|---|
| Student | Requests visitor entry |
| Security | Approves or rejects visitor requests |
| Warden | Verifies authenticity of approvals |
| Resource | Description |
|---|---|
| Visitor Request | Student-submitted entry request |
| Approval Record | Security approval with signature |
| Verification Log | Warden verification record |
- User registers with username, password, and role
- Password is salted and hashed before storage
- User logs in using Single-Factor Authentication
- OTP is generated and verified (Multi-Factor Authentication)
- Student submits visitor request
- Visitor data is encrypted using AES
- AES key is secured using RSA encryption
- Encrypted data is Base64 encoded and stored in Firebase
- Security approves request and digitally signs it
- Warden verifies the digital signature
- Access control prevents unauthorized actions
| Role ↓ / Resource → | Visitor Request | Approval Record | Verification Log |
|---|---|---|---|
| Student | Create / View | View | ❌ |
| Security | View | Create | ❌ |
| Warden | View | View | Verify |
✔ Enforced programmatically in Flask routes