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!
Sequre employs Bell's
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](https://private-user-images.githubusercontent.com/122756262/243406459-c2bf1b4c-1d36-491f-8895-665de4ec7e54.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NjMxMTUsIm5iZiI6MTcyMzk2MjgxNSwicGF0aCI6Ii8xMjI3NTYyNjIvMjQzNDA2NDU5LWMyYmYxYjRjLTFkMzYtNDkxZi04ODk1LTY2NWRlNGVjN2U1NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxOFQwNjMzMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYzQzNjI1Mjk2ZDM5NDllODZkYmQ2MDI3ZTJkYjNhYzk1NjkzMTlkYWVlM2IzNzI5ZGMzYjc0NWJmNTUxYzRkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.l4tr8BM7ybtILUwdkzi8Td9mzKXSh7rdo26v09wzkSs)
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](https://private-user-images.githubusercontent.com/122756262/243409054-74b84cf8-acb0-4901-9a96-7f3c363c3a45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NjMxMTUsIm5iZiI6MTcyMzk2MjgxNSwicGF0aCI6Ii8xMjI3NTYyNjIvMjQzNDA5MDU0LTc0Yjg0Y2Y4LWFjYjAtNDkwMS05YTk2LTdmM2MzNjNjM2E0NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxOFQwNjMzMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04YmI4ZDUzNTQ4MzI5ZDUxNWE0MGQzM2U4OWRmMTI4M2Y3OTk2OWMxM2MyMTliNWYxNjU2NWNiN2E5NDY5MWFkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.RJkUicKpCcp5Kse7rss29WPCc1KzGb_8U7WjyJ48-f8)
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.
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.
IMG_4728.MP4
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.