Skip to content

Commit f64b19b

Browse files
authored
docs(common): fix update addresses (#291)
* docs(common): fix update addresses * docs(common): user decrypt * fix(common): fix * docs(common): updates
1 parent caa14d5 commit f64b19b

File tree

12 files changed

+36
-36
lines changed

12 files changed

+36
-36
lines changed

docs/introductions/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- [Overview](architecture_overview.md)
1010
- [FHE on blockchain](fhe-on-blockchain.md)
1111
- [FHEVM components](fhevm-components.md)
12-
- [Encryption, decryption, re-encryption, and computation](d_re_ecrypt_compute.md)
12+
- [Encryption, decryption, and computation](d_re_ecrypt_compute.md)
1313

1414
## References
1515

docs/introductions/architecture_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The FHEVM architecture provides the foundation for confidential smart contracts
44
core is FHE, a cryptographic technique enabling computations directly on encrypted data, ensuring privacy at every
55
stage. 
66

7-
This system relies on three key types: 
7+
This system relies on three key types:
88

99
- The **public key:** used by users to encrypt their inputs locally.
1010
- The **private key:** required for decryption, securely distributed and managed through a threshold MPC-based Key

docs/introductions/d_re_ecrypt_compute.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ transmitted or processed.
3737
- **Source**: Frontend.
3838
- **Destination**: Coprocessor (for processing).
3939

40-
<figure><img src="../.gitbook/assets/encrypt.png" alt="re-encryption" width="600"><figcaption></figcaption></figure>
40+
<figure><img src="../.gitbook/assets/encrypt.png" alt="decryption" width="600"><figcaption></figcaption></figure>
4141

4242
You can read about the implementation details in [our encryption guide](solidity-guides/inputs.md).
4343

@@ -74,13 +74,13 @@ There are two kinds of decryption supported in the FHEVM system:
7474

7575
<figure><img src="../.gitbook/assets/decryption.png" alt="decryption"><figcaption></figcaption></figure>
7676

77-
<figure><img src="../.gitbook/assets/asyncDecrypt.png" alt="re-encryption"><figcaption><p>re-encryption</p></figcaption></figure>
77+
<figure><img src="../.gitbook/assets/asyncDecrypt.png" alt="decryption"><figcaption><p>decryption</p></figcaption></figure>
7878
You can read about the implementation details in [our decryption guide](solidity-guides/decryption/decrypt.md).
7979

8080
#### What is “User Decryption”?
8181

8282
User Decryption is the mechanism that allows users or applications to request private access to decrypted data — without
83-
exposing the plaintext on-chain. Instead of simply decrypting, the KMS securely decrypts and re-encrypts the result with
83+
exposing the plaintext on-chain. Instead of simply decrypting, the KMS securely decrypts the result with
8484
the user’s public key, allowing the user to decrypt it client-side only.
8585

8686
This guarantees:
@@ -89,7 +89,7 @@ This guarantees:
8989
- The KMS never reveals the decrypted value
9090
- The decrypted result is not written to the blockchain
9191

92-
<figure><img src="../.gitbook/assets/reencryption.png" alt="re-encryption"><figcaption><p>re-encryption process</p></figcaption></figure>
92+
<figure><img src="../.gitbook/assets/reencryption.png" alt="decryption"><figcaption><p>decryption process</p></figcaption></figure>
9393

9494
#### Client-side implementation
9595

@@ -98,7 +98,7 @@ User decryption is initiated on the client side using the
9898

9999
1. **Retrieve the ciphertext**:
100100
- The dApp calls a view function (e.g., `balanceOf`) on the smart contract to get the handle of the ciphertext to be
101-
re-encrypted.
101+
decrypted.
102102
2. **Generate and sign a keypair**:
103103
- The dApp generates a keypair for the user.
104104
- The user signs the public key to ensure authenticity.
@@ -115,7 +115,7 @@ User decryption is initiated on the client side using the
115115
- The dApp receives the encrypted ciphertext under the user's public key from the Gateway/Relayer.
116116
- The dApp decrypts the ciphertext locally using the user's private key.
117117

118-
You can read [our re-encryption guide explaining how to use it](solidity-guides/decryption/reencryption.md).
118+
You can read [our user decryption guide explaining how to use it](solidity-guides/decryption/user-decryption.md).
119119

120120
## **Tying It All Together**
121121

docs/introductions/fhevm-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ The KMS is a decentralized threshold-MPC-based service that manages the FHE key
8787

8888
The KMS ensures robust cryptographic security, preventing single points of failure and maintaining public verifiability.
8989

90-
In the next section, we will dive deeper into encryption, re-encryption, and decryption processes, including how they
91-
interact with the KMS and Gateway services. For more details, see
90+
In the next section, we will dive deeper into encryption and decryption processes, including how they
91+
interact with the KMS and relayer services. For more details, see
9292
[Encryption, decryption, and computation](./d_re_ecrypt_compute.md).

docs/introductions/table_of_addresses.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ These are Sepolia addresses.
1212
| KMS_VERIFIER_CONTRACT | 0x1364cBBf2cDF5032C47d8226a6f6FBD2AFCDacAC |
1313
| INPUT_VERIFIER_CONTRACT | 0xbc91f3daD1A5F19F8390c400196e58073B6a0BC4 |
1414
| DECRYPTION_ORACLE_CONTRACT | 0xa02Cda4Ca3a71D7C46997716F4283aa851C28812 |
15-
| PUBLIC_KEY_ID | 0301c5dd3e2702992b7c12930b7d4defeaaa52cf |
1615
| RELAYER_URL | `https://relayer.testnet.zama.cloud/v1/keyurl` |

docs/solidity-guides/SUMMARY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Get Started
22

3-
- [Overview](overview.md)
3+
- [Overview](solidity-overview.md)
4+
- [Quick Start guide](overview.md)
45
- [Quick Start - Hardhat](hardhat/README.md)
56
- [Prerequisites](hardhat/prerequisites.md)
67
- [1. Setting up Hardhat](hardhat/1.-setting-up-hardhat.md)
@@ -18,11 +19,11 @@
1819
- [Access Control List](acl/README.md)
1920
- [ACL examples](acl/acl_examples.md)
2021

21-
## Decryption & Re-encryption
22+
## Public Decryption & User Decryption
2223

23-
- [Decryption](decryption/decrypt.md)
24+
- [User Decryption](decryption/user-decryption.md)
25+
- [Public Decryption](decryption/public-decryption.md)
2426
- [Decryption in depth](decryption/decrypt_details.md)
25-
- [Re-encryption](decryption/reencryption.md)
2627

2728
## Control Flow & Logic
2829

docs/solidity-guides/configure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To utilize encrypted computations in Solidity contracts, you must configure the
99
## Key components configured automatically
1010

1111
1. **FHE library**: Sets up encryption parameters and cryptographic keys.
12-
2. **Relayer**: Manages secure cryptographic operations, including reencryption and decryption.
12+
2. **Relayer**: Manages secure cryptographic operations, including user decryption and public decryption.
1313
3. **Network-specific settings**: Adapts to local testing, testnets (Sepolia for example), or mainnet deployment.
1414

1515
By inheriting these configuration contracts, you ensure seamless initialization and functionality across environments.
@@ -45,9 +45,9 @@ contract MyERC20 is SepoliaZamaFHEVMConfig {
4545
}
4646
```
4747

48-
## ZamaRela.sol
48+
## ZamaConfig.sol
4949

50-
To perform decryption or reencryption, your contract must interact with the **Relayer**, which acts as a secure bridge between the blockchain, coprocessor, and Key Management System (KMS).
50+
To perform public decryption or user decryption, your contract must interact with the **Relayer**, which acts as a secure bridge between the blockchain, coprocessor, and Key Management System (KMS).
5151

5252
**Import based on your environment**
5353

@@ -59,7 +59,7 @@ import { SepoliaConfig } from "@fhevm/solidity/config/ZamaConfig.sol";
5959
**Purpose**
6060

6161
- Configures the relayer for secure cryptographic operations.
62-
- Facilitates reencryption and decryption requests.
62+
- Facilitates public and user decryption requests.
6363

6464
**Example: Configuring the relayer with Sepolia settings**
6565

docs/solidity-guides/decryption/decrypt_details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ You can call the function `FHE.checkSignatures` as such:
6262
The first argument, `requestID`, is the value that was returned in the `requestDecryption`function.
6363
The second argument, `signatures`, is an array of signatures from the KMS signers.
6464

65-
This function reverts if the signatures are invalid.
65+
This function reverts if the signatures are invalid.

docs/solidity-guides/decryption/decrypt.md renamed to docs/solidity-guides/decryption/public-decryption.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Decryption
1+
# Public decryption
22

33
This section explains how to handle decryption in fhevm. Decryption allows plaintext data to be accessed when required for contract logic or user presentation, ensuring confidentiality is maintained throughout the process.
44

55
{% hint style="info" %}
6-
Understanding how encryption, decryption and reencryption works is a prerequisite before implementation, see [Encryption, Decryption, Re-encryption, and Computation](../../introductions/d_re_ecrypt_compute.md).
6+
Understanding how encryption, user decryption, and public decryption works is a prerequisite before implementation, see [Encryption, User Decryption, Public Decryption, and Computation](../../introductions/d_re_ecrypt_compute.md).
77
{% endhint %}
88

99
Decryption is essential in two primary cases:
1010

1111
1. **Smart contract logic**: A contract requires plaintext values for computations or decision-making.
1212
2. **User interaction**: Plaintext data needs to be revealed to all users, such as revealing the decision of the vote.
1313

14-
To learn how decryption works see [Encryption, Decryption, Re-encryption, and Computation](../../introductions/d_re_ecrypt_compute.md).
14+
To learn how decryption works see [Encryption, User decryption, Public decryption, and Computation](../../introductions/d_re_ecrypt_compute.md).
1515

1616
## Overview
1717

@@ -60,7 +60,7 @@ contract TestAsyncDecrypt is SepoliaConfig {
6060

6161
### Next steps
6262

63-
Explore advanced decryption techniques and learn more about re-encryption:
63+
Explore advanced decryption techniques and learn more about user decryption:
6464

6565
- [Decryption in depth](decrypt_details.md)
66-
- [Re-encryption](reencryption.md)
66+
- [User decryption](user-decryption.md)

docs/solidity-guides/decryption/reencryption.md renamed to docs/solidity-guides/decryption/user-decryption.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
This document explains how to perform user decryption. User decryption required when you want a user to access their private data without it being exposed to the blockchain.
44

5-
Re-encryption in FHEVM enables the secure sharing or reuse of encrypted data under a new public key without exposing the plaintext. This feature is essential for scenarios where encrypted data must be transferred between contracts, dApps, or users while maintaining its confidentiality.
5+
User decryption in FHEVM enables the secure sharing or reuse of encrypted data under a new public key without exposing the plaintext. This feature is essential for scenarios where encrypted data must be transferred between contracts, dApps, or users while maintaining its confidentiality.
66

77
{% hint style="info" %}
8-
Before implementing re-encryption, ensure you are familiar with the foundational concepts of encryption, re-encryption and computation. Refer to [Encryption, Decryption, Re-encryption, and Computation](../introductions/d_re_ecrypt_compute.md).
8+
Before implementing user decryption ensure you are familiar with the foundational concepts of encryption, decryption, and computation. Refer to [Encryption, Decryption, and Computation](../introductions/d_re_ecrypt_compute.md).
99
{% endhint %}
1010

1111
## When to use user decryption
@@ -14,11 +14,11 @@ User decryption is particularly useful for **allowing individual users to secure
1414

1515
## Overview
1616

17-
The re-encryption process involves retrieving ciphertext from the blockchain and performing re-encryption on the client-side. In other words we take the data that has been encrypted by the KMS, decrypt it and encrypt it with the users private key, so only he can access the information.
17+
The user decryption process involves retrieving ciphertext from the blockchain and performing user-decryption on the client-side. In other words we take the data that has been encrypted by the KMS, decrypt it and encrypt it with the users private key, so only he can access the information.
1818

1919
This ensures that the data remains encrypted under the blockchain’s FHE key but can be securely shared with a user by re-encrypting it under the user’s NaCl public key.
2020

21-
Re-encryption is facilitated by the **Relayer** and the **Key Management System (KMS)**. The workflow consists of the following:
21+
User decryption is facilitated by the **Relayer** and the **Key Management System (KMS)**. The workflow consists of the following:
2222

2323
1. Retrieving the ciphertext from the blockchain using a contract’s view function.
2424
2. Re-encrypting the ciphertext client-side with the user’s public key, ensuring only the user can decrypt it.
@@ -41,10 +41,10 @@ contract ConfidentialERC20 {
4141

4242
Here, `balanceOf` allows retrieval of the user’s encrypted balance stored on the blockchain.
4343

44-
## Step 2: re-encrypt the ciphertext
44+
## Step 2: decrypt the ciphertext
4545

46-
Re-encryption is performed client-side using the `@fhevm/sdk` library. [Refer to the guide](../../frontend/webapp.md) to learn how to include `@fhevm/sdk` in your project.
47-
Below is an example of how to implement reencryption in a dApp:
46+
User decryption is performed client-side using the `@fhevm/sdk` library. [Refer to the guide](../../frontend/webapp.md) to learn how to include `@fhevm/sdk` in your project.
47+
Below is an example of how to implement user decryption in a dApp:
4848

4949
```ts
5050
import { createInstances } from "../instance";
@@ -63,7 +63,7 @@ await initSigners(); // Initialize signers
6363
const signers = await getSigners();
6464

6565
const instance = await createInstances(this.signers);
66-
// Generate the private and public key, used for the reencryption
66+
// Generate the private and public key, used for the user decryption
6767
const { publicKey, privateKey } = instance.generateKeypair();
6868

6969
// Create an EIP712 object for the user to sign.
@@ -96,4 +96,4 @@ This code retrieves the user’s encrypted balance, re-encrypts it with their pu
9696

9797
- **`instance.generateKeypair()`**: Generates a public-private keypair for the user.
9898
- **`instance.createEIP712(publicKey, CONTRACT_ADDRESS)`**: Creates an EIP712 object for signing the user’s public key.
99-
- **`instance.reencrypt()`**: Facilitates the re-encryption process by contacting the relayer and decrypting the data locally with the private key.
99+
- **`instance.reencrypt()`**: Facilitates the user decryption process by contacting the relayer and decrypting the data locally with the private key.

0 commit comments

Comments
 (0)