Inspiration
seQure started as a curiosity about how secure P2P communication actually works at the lowest level, into a fully custom encrypted P2P messaging protocol built from scratch.
What it does
seQure is a serverless, end-to-end encrypted peer-to-peer messaging application. Two users connect directly to each other, preventing any MITM attacks. Every message is encrypted before it leaves your machine and decrypted only on the other end.
How we built it
Everything in seQure was built from first principles in Python, using only the standard library and the cryptography package: I essentially designed the wire protocol from the ground up. The peers connect to each other's sockets, and a first intro packet is shared between then, confirming they are both using the seQure protocol (by checking the magic number in the packet). After also exchanging keys, the communication is ready and all text is encrypted with the public keys, and decrypted by the private keys.
Challenges we ran into
The handshake ordering required careful thought, since both peers need to send and receive simultaneously, but a faulty implementation would deadlock the program if both wait to receive before sending. I therefore concluded that we needed to run our sockets on seperate threads.
Accomplishments that we're proud of
I am very proud of going from a simple unencrypted P2P communication, to one that could be viable as a real-world secure messaging foundation, especially since I built it from scratch.
What we learned
I learned using tools like Wireshark for monitoring and trying to attack my protocol. I have also more importantly learned a ton on networking and cryptography.
What's next for seQure
I really want seQure to be able to run on ESP32s and be able to make some form of phone that will be able to communicate to any other ESP32, creating a net that is secure: with no server or central authority to track and harvest the packets.
Built With
- python
- wireshark
Log in or sign up for Devpost to join the conversation.