ContriHUB / Just-Share

Android app that enables quick transfer of photos, videos, documents, and audio files using WiFiDirect and Bluetooth.
MIT License
0 stars 5 forks source link

Implement Encryption with Hash Digest for Secure Data Transfer #3

Open SaiDheerajPeketi opened 5 days ago

SaiDheerajPeketi commented 5 days ago

🚀Feature Request

Description

The requested feature is to implement a mechanism that encrypts data in chunks before transfer, and then decrypts it after the transfer is complete. This system should include the generation of a hash digest to ensure the data’s integrity during transmission. By implementing this, data transfer becomes more secure and prevents tampering or corruption during transit.

Expected behavior

  1. Each chunk should be encrypted using the encryption logic.
  2. A hash digest should be generated for each chunk or the entire data set to verify integrity.
  3. Upon receiving the chunks, the app should verify them against the hash digest.
  4. After successful verification, the chunks should be decrypted and reassembled into the original file.

Current behavior

Currently, there is no encryption or verification process for data transfer, which leaves the transfer vulnerable to security issues like interception, tampering, or corruption.

Steps to reproduce

  1. Attempt a file transfer through the current system.
  2. Observe the lack of encryption or verification in the current implementation.

Possible Solution

  1. Encryption: Use the existing AES implementation to encrypt each chunk separately before transferring. Ensure that encryption keys are securely managed.

  2. Hash Digest: Compute a cryptographic hash (e.g., SHA-256) of each chunk before transfer. This hash will serve as a digest to verify that the data hasn’t been altered during transfer.

  3. Decryption and Verification: After the transfer, use the hash digest to verify each chunk or the complete data. If the data passes verification, proceed to decrypt each chunk and reconstruct the original file.

Why is this feature important to you?

This feature is critical to ensuring data security during transfer, especially when dealing with sensitive information. Encrypting the data adds a layer of security, while using a hash digest ensures that the data hasn’t been tampered with or corrupted during the transfer. This will increase user trust and prevent potential security breaches or data loss.

anushkaVerma1007 commented 1 day ago

Thank you sir for assigning the issue. I have started to work on it.