Skip to content

Commit

Permalink
docs: prettier and adressing some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
poppyseedDev committed Nov 25, 2024
1 parent bfb34e6 commit 5668f1d
Show file tree
Hide file tree
Showing 24 changed files with 643 additions and 489 deletions.
27 changes: 13 additions & 14 deletions docs/developer/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@

## Features

| name | description | ETA |
| -------------------- | ------------------------------------------------------------ | ------ |
| Foundry template | [ Forge ](https://book.getfoundry.sh/reference/forge/forge) | Q1 '25 |
| name | description | ETA |
| ---------------- | ----------------------------------------------------------- | ------ |
| Foundry template | [ Forge ](https://book.getfoundry.sh/reference/forge/forge) | Q1 '25 |

## Operations

| name | function name | type | ETA |
| --------------------- | ------------------- | ------------------ | --------------- |
| Signed Integers | `eintX` | | Coming soon |
| Add w/ overflow check | `TFHE.safeAdd` | Binary, Decryption | Coming soon |
| Sub w/ overflow check | `TFHE.safeSub` | Binary, Decryption | Coming soon |
| Mul w/ overflow check | `TFHE.safeMul` | Binary, Decryption | Coming soon |
| Random signed int | `TFHE.randEintX()` | Random | - |
| Div | `TFHE.div` | Binary | - |
| Rem | `TFHE.rem` | Binary | - |
| Set inclusion | `TFHE.isIn()` | Binary | - |

| name | function name | type | ETA |
| --------------------- | ------------------ | ------------------ | ----------- |
| Signed Integers | `eintX` | | Coming soon |
| Add w/ overflow check | `TFHE.safeAdd` | Binary, Decryption | Coming soon |
| Sub w/ overflow check | `TFHE.safeSub` | Binary, Decryption | Coming soon |
| Mul w/ overflow check | `TFHE.safeMul` | Binary, Decryption | Coming soon |
| Random signed int | `TFHE.randEintX()` | Random | - |
| Div | `TFHE.div` | Binary | - |
| Rem | `TFHE.rem` | Binary | - |
| Set inclusion | `TFHE.isIn()` | Binary | - |

> **_NOTE 1:_** Random encrypted integers that are generated fully on-chain. Currently, implemented as a mockup by using a PRNG in the plain.
> Not for use in production!
23 changes: 11 additions & 12 deletions docs/fundamentals/acl.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ Encrypted data in fhEVM is entirely confidential, meaning that without proper ac
- **Secure Computations**: Ensure that only authorized entities can manipulate or decrypt encrypted data.
- **Gas Efficiency**: Optimize permissions using transient access for temporary needs, reducing storage and gas costs.


## How does the ACL work?

### Types of access

1. **Permanent Allowance**:
- Configured using `TFHE.allow(ciphertext, address)`.
- Grants long-term access to the ciphertext for a specific address.
1. **Permanent Allowance**:

- Configured using `TFHE.allow(ciphertext, address)`.
- Grants long-term access to the ciphertext for a specific address.
- Stored in a dedicated contract for persistent storage.

2. **Transient Allowance**:
- Configured using `TFHE.allowTransient(ciphertext, address)`.
- Grants access to the ciphertext only for the duration of the current transaction.
- Stored in transient storage, reducing gas costs.
2. **Transient Allowance**:
- Configured using `TFHE.allowTransient(ciphertext, address)`.
- Grants access to the ciphertext only for the duration of the current transaction.
- Stored in transient storage, reducing gas costs.
- Ideal for temporary operations like passing ciphertexts to external functions.

**Syntactic sugar**:
- `TFHE.allowThis(ciphertext)` is shorthand for `TFHE.allow(ciphertext, address(this))`. It authorizes the current contract to reuse a ciphertext handle in future transactions.
**Syntactic sugar**:

- `TFHE.allowThis(ciphertext)` is shorthand for `TFHE.allow(ciphertext, address(this))`. It authorizes the current contract to reuse a ciphertext handle in future transactions.

### Transient vs. permanent allowance

Expand All @@ -41,7 +41,6 @@ Encrypted data in fhEVM is entirely confidential, meaning that without proper ac
| **Transient** | Temporary access during a transaction. | [Transient storage](https://eips.ethereum.org/EIPS/eip-1153) (EIP-1153) | Calling external functions or computations with ciphertexts. Use when wanting to save on gas costs. |
| **Permanent** | Long-term access across multiple transactions. | Dedicated contract storage | Persistent ciphertexts for contracts or users requiring ongoing access. |


## Granting and verifying access

### Granting access
Expand Down Expand Up @@ -69,4 +68,4 @@ To check if an entity has permission to access a ciphertext, use functions like

---

For a detailed explanation of the ACL's functionality, including code examples and advanced configurations, see [working with the acl](./first_step/acl_examples.md).
For a detailed explanation of the ACL's functionality, including code examples and advanced configurations, see [working with the acl](./first_step/acl_examples.md).
Loading

0 comments on commit 5668f1d

Please sign in to comment.