Repository navigation
Encrypt and Decrypt Chats in The LocalChat app to prevent non users From listening In #161
Description
Activity
I'd like to be assigned For This Issue
- changed the title
[-]Encrypt and Decrypt Chats in The LocalChat app to prevent non users listening In[/-][+]Encrypt and Decrypt Chats in The LocalChat app to prevent non users From listening In[/+]on Jan 1, 2024 @5enox is this issue still open? I would also like to contribute to it.
Yeah, sure
@5enox Please assign this issue to me. I would like to work on this.
@Shahrayar123 , could you please assign this issue to @Ishpreet01 ? Thank you!
@5enox I am not able to run the command python3 main.py in my system to set up this project. Please help me out.
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.-This is the message that I am getting in the terminal after running the command.@Ishpreet01 try re-installing python, But this time check the box where it says Add to Path
also use onlypython main.pyon windowsor if you're on linux :
sudo apt updateand thensudo apt install python3@5enox I added python to path and used python main.py command to run the project. But the terminal does not display the text Anon Chat and stops working after I run the command. I am attaching the screenshot for your reference. Please tell me how to proceed further with this.
@5enox I used this command to run the Number Guessing game project and it worked perfectly for that.

@5enox is this issue still open? I would also like to contribute to it.
@Harshita1375 Please Go ahead, if you need any assistance Just mention me
@Harshita1375 Please Go ahead, if you need any assistance Just mention me
Which repository do I need to fork as I am not able to find Encrypt and Decrypt project in this repository?.
@5enox can you assign this issue to me, i would like to contribute. I have only one question, are we decrypting the message on client side only, like end to end?
@Shahrayar123 Can Assign You @Sangamesh-RK , and Yes, The encryption Should Be End to end between the clients.
Here is a Starter Sample You Could Look at, using the Signal Protocol in Python ( Used By Whatsapp)
from axolotl import axolotl_curve25519 as curve from axolotl.state import PreKeyBundle, AxolotlState # Sender's identity key pair sender_identity_key_pair = curve.generateIdentityKeyPair() # Sender's pre key pair sender_pre_key_pair = curve.generatePreKey() # Recipient's identity key pair recipient_identity_key_pair = curve.generateIdentityKeyPair() # Recipient's pre key pair recipient_pre_key_pair = curve.generatePreKey() # Sender creates a pre key bundle to send to recipient sender_pre_key_bundle = PreKeyBundle(sender_identity_key_pair.getPublicKey(), sender_pre_key_pair.id(), sender_pre_key_pair.getPublicKey()) # Sender encrypts a message sender_session_builder = AxolotlState(curve.generateSenderKeyDistributionMessage(sender_pre_key_bundle, recipient_identity_key_pair.getPublicKey(), recipient_pre_key_pair.id(), recipient_pre_key_pair.getPublicKey())) sender_session_builder.processPreKey(sender_pre_key_bundle) cipher_text = sender_session_builder.encrypt(b"Hello, recipient!") # Recipient decrypts the message recipient_session_builder = AxolotlState() recipient_session_builder.processPreKey(sender_pre_key_bundle) recipient_session_builder.processSenderKeyDistributionMessage(cipher_text) plain_text = recipient_session_builder.decrypt(cipher_text) print("Decrypted message:", plain_text.decode())Make Sure you have python-axolotl-curve25519 installed (pip install python-axolotl-curve25519) before running this code.
Make Sure you have python-axolotl-curve25519 installed (pip install python-axolotl-curve25519) before running this code.
i looked into the above module, apparently its used for E2E communication between two clients which is different from our use case, i will try to implement it for group chat but i would appreciate if you can guide me
i am having a lot of import issues with axolotl module,

When i googled, i found out that this is a common issue for windows user. i tried following steps but wasn't able to resolve this as this requires python 2.7 but pip doesn't supports older version of Python nowcan i use this module instead https://pypi.org/project/signal-protocol/ ?
@5enox is this issue still open? I would also like to contribute to it.


Encrypt and Decrypt messages between server and client using the private key plus something else to make it more secure.