https://github.com/atharvbyadav/hashgate-authentication-system
A secure, file-based user authentication system in C++ with SHA-256 password hashing, root-protected user management, and hidden password input. Serves as the front-end login module for a larger application.
https://github.com/atharvbyadav/hashgate-authentication-system
authentication authentication-system cpp login-system security sha256 terminal-app
Last synced: 5 months ago
JSON representation
A secure, file-based user authentication system in C++ with SHA-256 password hashing, root-protected user management, and hidden password input. Serves as the front-end login module for a larger application.
- Host: GitHub
- URL: https://github.com/atharvbyadav/hashgate-authentication-system
- Owner: atharvbyadav
- License: mit
- Created: 2025-03-02T16:38:37.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-07T12:18:36.000Z (7 months ago)
- Last Synced: 2025-06-07T12:29:53.638Z (7 months ago)
- Topics: authentication, authentication-system, cpp, login-system, security, sha256, terminal-app
- Language: C++
- Homepage: https://atharvbyadav.github.io/HashGate-Authentication-System/
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π HashGate Authentication System (Stage 1)
---
## π Overview
The **HashGate Authentication System** is a secure, file-based user authentication program written in C++. It provides a simple yet effective way to manage user authentication with the following features:
- **π User Login** with SHA-256 hashed passwords.
- **π€ User Creation** (requires root password verification).
- **ποΈ User Deletion** (requires root password verification and confirmation).
- **π Secure Root Password Setup** on the first run.
- **π Hidden Password Input** for security during login and root password prompts.
This system ensures that user credentials are stored securely using hashing techniques and provides a basic but effective local authentication mechanism.
π **Note:** This program is just a part of a bigger project I am working on. It serves as the **front-end login system** for a larger application currently under development.
## π Features
- **SHA-256 Hashing**: Ensures passwords are stored securely.
- **Root Password Protection**: Required for adding and deleting users.
- **Hidden Password Input**: Conceals passwords while typing.
- **File-Based Storage**: User credentials are stored safely in local files (`users.dat` and `root.dat`).
## π οΈ How It Works
1. **First Run Setup**: The system prompts the user to set a **root password** (this cannot be changed later).
2. Users can:
- **π Login** with a username and password.
- **β Create a new user** (requires root password verification).
- **ποΈ Delete a user** (requires root password verification and confirmation).
- **β Exit** the program.
3. Passwords are stored **securely as SHA-256 hashes** to prevent unauthorized access.
## βοΈ Setup and Compilation
### **Requirements**
- C++ compiler (e.g., `g++` for Linux or MinGW for Windows)
- OpenSSL library for SHA-256 hashing
### **Compilation on Linux**
```sh
g++ authentication.cpp -o hashgate -lssl -lcrypto
```
### **Compilation on Windows (MinGW)**
```sh
g++ authentication.cpp -o hashgate.exe -lssl -lcrypto
```
## π Usage
1. Run the compiled executable:
```sh
./hashgate # Linux
hashgate.exe # Windows
```
2. **First Run**:
- The program will prompt for a **root password**.
- This password is required to create or delete users.
3. **π Login**:
- Enter a valid username and password.
- If correct, access is granted; otherwise, an error is shown.
4. **β Create a User**:
- Enter the root password.
- Provide a new username and password.
5. **ποΈ Delete a User**:
- Enter the root password.
- Provide the username to delete.
- Confirm deletion.
6. **β Exit** the program by selecting option `4`.
## π Security Considerations
- **Root Password Security**: The root password is stored as a SHA-256 hash and cannot be changed after setup.
- **User Passwords**: Stored securely using SHA-256 hashing.
- **File Storage**:
- `root.dat`: Contains the hashed root password.
- `users.dat`: Stores user credentials in `username:hashed_password` format.
## π License
This project is open-source and free to use under the MIT License.
Contributions and suggestions are welcome! π
## π€ Collaboration & Contributions
I am open to collaboration if you have great ideas to implement! Feel free to **open issues**, **submit pull requests** or discuss enhancements. Let's make **HashGate Authentication System** even better together! π‘π§
## π¬ Contact
- **π¨βπ» Author**: Atharv Yadav
- **π Website**: [atharvbyadav.github.io](https://atharvbyadav.github.io)
- **π GitHub**: [@atharvbyadav](https://github.com/atharvbyadav)
- **π§ Email**: [uuwr5t1s@duck.com](mailto:uuwr5t1s@duck.com)
_Looks suspicious? Good. Itβs mine. The ducks work for me. π¦π»_