Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
morkeltry authored Oct 13, 2024
1 parent 40218e6 commit 868ce5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

There are only two main state elements in the secret contract.

They use three types for their keys and values: authOut, ref and u__.
They use three types for their keys and values: `authOut`, `ref` and `u__`.
(we may change the name of authOut as it is confusing)

##### `balances`
A mapping from each user's authOout to their balance (u___)
A mapping from each user's `authOut` to their balance (`u___`)

##### `paymentRefs`
A mapping from every payment ref that every user has created, to the authOut of the user that created it.
A mapping from every payment ref that every user has created, to the `authOut` of the user that created it.

###### the `ref` type
This may be extended in future work.

The underlying type should be something we can compare easily in secret contracts. For simpilcity we should limit it to 32 bytes. I propose string (but if something else is easier, we could choose any 32 byte type and cast it in Solidity and the frontend).
The underlying type should be something we can compare easily in secret contracts. For simpilcity we should limit it to 32 bytes. I propose `string` (but if something else is easier, we could choose any 32 byte type and cast it in Solidity and the frontend).

###### the `authOut` type
will be exentded in future work to include different types of auth.
for now, an `authOut` will represent a password. The password does not even need to be encrypted since it will be encypted for transport from the frontend, and encrypted in storage in the secret contract transparently due to the TEE.
for now, an `authOut` will represent a password. The password does not even need to be encrypted since it will be encrypted for transport from the frontend, and encrypted in storage in the secret contract transparently due to the TEE.
However, for appearances sake, it would be nice to encrypt it ourselves in storage,
Therefore the type of `authOut` could be `string`, but may be better being `bytes32` - so that we can cast various different types of auth into it now and later.

Expand Down

0 comments on commit 868ce5d

Please sign in to comment.