Skip to content

Encrypt and Decrypt Chats in The LocalChat app to prevent non users From listening In #161

Description

@5enox

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

Activity

  1. 5enox commented on Jan 1, 2024

    @5enox
    Author

    I'd like to be assigned For This Issue

  2. 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
  3. Ishpreet01 commented on Jan 18, 2024

    @Ishpreet01

    @5enox is this issue still open? I would also like to contribute to it.

  4. 5enox commented on Jan 19, 2024

    @5enox
    Author

    Yeah, sure

  5. Ishpreet01 commented on Jan 20, 2024

    @Ishpreet01

    @5enox Please assign this issue to me. I would like to work on this.

  6. 5enox commented on Jan 20, 2024

    @5enox
    Author

    @Shahrayar123 , could you please assign this issue to @Ishpreet01 ? Thank you!

  7. Ishpreet01 commented on Jan 23, 2024

    @Ishpreet01

    @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.

  8. 5enox commented on Jan 24, 2024

    @5enox
    Author

    @Ishpreet01 try re-installing python, But this time check the box where it says Add to Path
    also use only python main.py on windows

    0_7nOyowsPsGI19pZT

    or if you're on linux :
    sudo apt update and then sudo apt install python3

  9. Ishpreet01 commented on Jan 25, 2024

    @Ishpreet01

    @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.

    image

  10. Ishpreet01 commented on Jan 25, 2024

    @Ishpreet01

    @5enox I used this command to run the Number Guessing game project and it worked perfectly for that.
    image

  11. Harshita1375 commented on Mar 23, 2024

    @Harshita1375

    @5enox is this issue still open? I would also like to contribute to it.

  12. 5enox commented on Mar 26, 2024

    @5enox
    Author

    @Harshita1375 Please Go ahead, if you need any assistance Just mention me

  13. Harshita1375 commented on Mar 27, 2024

    @Harshita1375

    @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?.

  14. 5enox commented on Mar 27, 2024

    @5enox
    Author
  15. Sangamesh-RK commented on Apr 30, 2024

    @Sangamesh-RK

    @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?

  16. 5enox commented on May 1, 2024

    @5enox
    Author

    @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.

  17. Sangamesh-RK commented on May 2, 2024

    @Sangamesh-RK

    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

  18. Sangamesh-RK commented on May 2, 2024

    @Sangamesh-RK

    i am having a lot of import issues with axolotl module,
    image
    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 now

    can i use this module instead https://pypi.org/project/signal-protocol/ ?

  19. shoaibatmaca commented on Aug 23, 2025

    @shoaibatmaca

    @5enox is this issue still open? I would also like to contribute to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions