go-peer/cmd/secpy_chat
2024-07-08 17:01:32 +07:00
..
_images update 2023-12-24 22:25:58 +07:00
.gitignore update 2023-12-27 22:33:16 +07:00
config.yml update 2023-12-24 22:25:58 +07:00
main.py update 2023-12-25 01:32:54 +07:00
README.md update 2024-07-08 17:01:32 +07:00
requirements.txt update 2023-12-27 22:33:16 +07:00

secpy_chat_logo.png

Console messenger with end-to-end encryption

Python Release License Go-Peer

About project

The application secpy_chat allows you to communicate securely (using end-to-end encryption) using HLT and HLE applications. This is an example of how it is possible to write client-safe applications for the Hidden Lake environment without being based on the Go programming language (the main language for writing Hidden Lake applications).

More information about Secpy-Chat in the habr.com/ru/articles/782836/

Dependencies

$ pip3 install -r requirements.txt

Config structure

"hlt_host" address of the HLT service
"hle_host" address of the HLE service
"friends"  map of {"alias_name":"public_key"}
hlt_host: localhost:9582
hle_host: localhost:9551
friends: 
  Alice: PubKey{3082020A02820201...3324D10203010001}

How it works

secpy_chat.gif

Figure 1. Chat node1 with node2.

The application connects to two services at once: HLE and HLT. The first service makes it possible to encrypt and decrypt messages. The second service allows you to send and receive encrypted messages from the network. In this case, the secpy_chat is guided only by the interfaces of the services, representing the frontend component.

Example

Build and run services HLT, HLE

$ cd examples/secpy_chat
$ make

Run client#1

$ cd examples/secpy_chat/node1
$ python3 main.py
> /friend Alice
# waiting client#2
> hello
> [Bob]: world!

Run client#2

$ cd examples/secpy_chat/node2
$ python3 main.py
> /friend Bob
# waiting client#1
> [Alice]: hello
> world!