This project is a secure messaging application designed to provide robust end-to-end encryption and federated authentication using Google OAuth. The primary objective is to protect users' personal information and ensure secure communication by leveraging advanced encryption techniques and secure authentication methods.
- Encryption and Decryption: All messages are encrypted on the server before being sent to the recipient and decrypted only when the recipient opens the message. Messages are also decrypted for the sender to display a thread of chats, simplifying the user interface.
- Diffie-Hellman and AES: Diffie-Hellman algorithm is used for key exchange, ensuring strong encryption, while AES is used for the actual message encryption, providing robust data protection.
- Google OAuth Integration: Users can log in using their existing Google accounts, simplifying access without compromising security. This minimizes the need for creating and remembering new passwords while leveraging the security of well-established authentication services.
- Intuitive Design: The application features a responsive and easy-to-navigate interface, allowing users to start new conversations and manage existing ones effortlessly. The design focuses on simplicity and efficiency, making it accessible to users with varying technical skills.
- .NET 8
- ASP.NET Core
- Entity Framework Core
- SQLite
- Google OAuth
- C#
- HTML5
- CSS3
- JavaScript
- .NET SDK 8.0.5
- Any IDE that supports .NET development (e.g., Visual Studio, VS Code)
-
Clone the repository:
git clone <repository_url> cd <repository_directory>
-
Configure environment variables: Create a .env file in the root of the project and add the following:
GOOGLE_CLIENT_ID=<your_google_client_id> GOOGLE_CLIENT_SECRET=<your_google_client_secret>
-
Install dependencies:
dotnet restore
-
Update the database:
dotnet ef database update
-
Run the application:
dotnet run
-
Open the application: Open a web browser and navigate to http://localhost:7251/ to access the application.
-
Login: Click on the login link to authenticate using Google OAuth.
-
Send Messages: After authentication, users can send encrypted messages to other registered users.
-
View Messages: Users can view their chat threads with other users, with messages being decrypted securely.
- HTTPS Communication: Ensure all communication with the server is over HTTPS in production environments.
- Secure Storage: Store sensitive information such as client secrets securely using environment variables or secure vault solutions.
- IDataProtectionProvider: Private keys are secured using IDataProtectionProvider, which ensures that even if the database is compromised, the AES key required for decryption remains protected.
- API Documentation: Detailed API documentation for Google OAuth can be found here.
- OAuth 2.0 Documentation: For more information on implementing OAuth 2.0 and OpenID Connect, refer to the official OAuth 2.0 documentation.
- Contributions to this project are welcome. Please fork the repository, make your changes, and submit a pull request.
- This project is open-source and available under the MIT License.