Giter Site home page Giter Site logo

sequre's Introduction

Sequre Messenger

Welcome to Sequre, the open-source messaging platform that leverages the power of quantum algorithms to provide unmatched security and privacy for all your conversations!

Снимок экрана 2023-02-28 в 4 02 43 PM

Quantum Part

Sequre employs Bell's $\ket{\Phi^+}$ state to generate two random keys for identity verification every time two users want to chat.

Our algorithm features an error-detection mechanism, using the ancilla qubit's state to identify cases where users' qubits were in the same state, ensuring the generation of keys that are impervious to any potential errors.

The quantum circuit below demonstrates the algorithm behind the key-generation process:

image

The Hadamard gate is utilized to start the conversation (it says: “User0 wants to chat!”) CNOT gate identifies that user1 is connected to user0 and the pair of keys should be generated for two persons (it says: “User1 has connected to User0!”) Rotation-X gates with random angles between 0 and π/2 simulate real-system errors, while ancilla qubit is used to determine whether users’ qubits are in the same states. The dynamic circuit element checks whether the ancilla is in |1> state. If it is, the users' qubits are not in |Φ+> due to errors. Applying Pauli X-Gate on user0's qubit fixes the problem so that the users' qubits are maximally entangled again. The results of the final measurements are used to generate a pair of identical keys that ensure the privacy of the conversation.

The following histogram illustrates the probability distribution of states after 1000 runs:

image

States |000> and |011> correspond to errorless experiments (in which ancilla qubit is in |0> state). The counts for |100> and |111> indicate that users' qubits were unentangled due to RX errors but were fixed by the conditional application of X-Gate.

Backend and Frontend

We have developed backend using FastAPI and frontend using Svelte and TailwindCSS. Real-time messaging part is implemented using websockets. When 2 users establish a websocket connection with the server, server generates a chat room with its unique token id after which both parties can exchange messages using the established connection.

Demo

IMG_4728.MP4

Potential Upgrades

To further enhance the security of the messenger, we plan to not only compare the keys generated by the quantum provider but also require users to enter them. In the ideal scenario, both of the users would have qubits next to themselves. Users would first enter passwords to both of their qubits and then send a request with their passwords to establish a three-way websocket connection with the server. Then, the server would compare the passwords using a quantum provider and if they match, create a unique room with its token. Furthermore, the encrypting key would be generated from the passwords. Then, every message would be encrypted with the user's password and decrypted by the user's side so that server cannot access the content of the message.

sequre's People

Contributors

azyzz228 avatar dmitriikhitrin avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.