luminaryphi / blackboxfront

Front end for Blackbox
0 stars 0 forks source link

Weekly Progress #1

Open luminaryphi opened 3 years ago

luminaryphi commented 3 years ago

JULY 20th

Msg Encryption system is built:

  1. A function in the contract will gather entropy from user input until a set amount of time has expired. Once expired a key pair will be created from the entropy and be stored. The entropy function will no longer be able to be called after the keypair is made.

  2. Built a query function for the contract to send it's public key to the front end

  3. Encrypt button functionality. When pressed the front end will call the contract pubkey query. It will then generate it's own keypair. Then it takes it's own private key and the contracts public key and combines them with x25519 encryption for the key to encrypt the destination address entered by the user using AES-SIV.

ROADBLOCK: Reviewed the bridge code and clarified with Reuven, the current version of the bridge DOES NOT support data transfer to send an msg across. This will be solved by developing an independent operator to handle the data, while the coins themselves go over the bridge as normal. It will work this way:

  1. Upon making the transaction the data will be formatted into an msg sent to a solidity smart contract for storage.
  2. The Operator will call a query function that contacts the bridges isExecuted() function to confirm if the transfer went through.
  3. If confirmed the contract will release the data to the operator, and the operator will send it to the secret contract.

After this roadblock is dealt with, remaining steps are:

Already accomlished:

luminaryphi commented 3 years ago

JULY 27th

The Solidity contract to receive the Tokens / Ciphertext and public key has been made. Contract will split the two and send the tokens over the Eth bridge, and emit the associated data with an event for the Operator to pickup for transfer to the Secret Contract when the transaction is confirmed.

Operator has been planned out after speaking with Cashmaney about how it's done for the Eth bridge. To prevent data from being lost if the server hosting the operator goes down a database must be made to store the blockheight of the last Solidity event picked up so it can begin again where it left off. Operator will be JS using Web3.JS and SecretJS, and it will communicate with the database using SQL.

luminaryphi commented 3 years ago

AUGUST 10th

Added the Secret contract calls to the Operator. Handed to Xiphiar to proofread it, he affirmed the SecretJS was done correctly, and also took a look at the MySQL portions of the operator and was able to point out flaws. Those flaws were corrected. Secondary SecretJS review was given by FeedYourAddiction, who also confirmed it was done correctly.

Keymaker contract to generate the encryption Keys for Blackbox went live on testnet. Baedrik has noted a security flaw which has since been fixed.

IN PROGRESS: Adding Query to Blackbox to take the Keymaker keypair on initialization. Publishing the Eth Bridge to testnet since it is currently not setup there, so that the blackbox contract can be tested. Finding frontend designers to make a better looking site.