Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Implement Message Encryption Using AES Algorithm #171

Closed
Alpha17-2 opened this issue Jun 13, 2024 · 0 comments · Fixed by #178
Closed

Feature Request: Implement Message Encryption Using AES Algorithm #171

Alpha17-2 opened this issue Jun 13, 2024 · 0 comments · Fixed by #178
Labels
good first issue Good for newcomers security Functions related to privacy and security

Comments

@Alpha17-2
Copy link
Collaborator

Description

Implement a feature to encrypt messages using the AES algorithm (or the encrypt library) before storing them in the Firebase database. This will ensure that the messages are stored securely and can only be decrypted by authorized users.

Requirements

  1. Encryption Method:

    • Create a method to encrypt messages using the AES algorithm.
    • Use the encrypt library to facilitate encryption and decryption.
  2. Message Storage:

    • Ensure that encrypted messages are stored in the Firebase database.
    • Modify existing message storage methods to include encryption.
  3. Decryption Method:

    • Create a method to decrypt messages when they are retrieved from the database.
    • Ensure only authorized users can decrypt and view the messages.
  4. Key Management:

    • Implement a secure way to manage and store encryption keys.
    • Ensure keys are not hard-coded or exposed in the source code.

Implementation Details

  1. Encryption Library:

    • Use the encrypt library for Dart/Flutter to handle AES encryption.
    • Ensure the library is added to the project's dependencies.
  2. Method Definitions:

    • Define a method encryptMessage that takes a plain text message and returns an encrypted message.
    • Define a method decryptMessage that takes an encrypted message and returns the plain text message.
  3. Integration with Firebase:

    • Modify the existing message sending method to encrypt messages before storing them in the Firebase database.
    • Modify the existing message retrieval method to decrypt messages after retrieving them from the Firebase database.
  4. Testing:

    • Ensure both encryption and decryption methods are thoroughly tested.
    • Validate that messages are correctly encrypted before storage and decrypted after retrieval.

Steps to Reproduce

  1. Send a message in a chat.
  2. Verify that the message stored in the Firebase database is encrypted.
  3. Retrieve the message from the Firebase database and verify it is decrypted correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers security Functions related to privacy and security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant