You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/solidity-guides/configure.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ To utilize encrypted computations in Solidity contracts, you must configure the
9
9
## Key components configured automatically
10
10
11
11
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.
13
13
3.**Network-specific settings**: Adapts to local testing, testnets (Sepolia for example), or mainnet deployment.
14
14
15
15
By inheriting these configuration contracts, you ensure seamless initialization and functionality across environments.
@@ -45,9 +45,9 @@ contract MyERC20 is SepoliaZamaFHEVMConfig {
45
45
}
46
46
```
47
47
48
-
## ZamaRela.sol
48
+
## ZamaConfig.sol
49
49
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).
51
51
52
52
**Import based on your environment**
53
53
@@ -59,7 +59,7 @@ import { SepoliaConfig } from "@fhevm/solidity/config/ZamaConfig.sol";
59
59
**Purpose**
60
60
61
61
- Configures the relayer for secure cryptographic operations.
62
-
- Facilitates reencryption and decryption requests.
62
+
- Facilitates public and user decryption requests.
63
63
64
64
**Example: Configuring the relayer with Sepolia settings**
Copy file name to clipboardExpand all lines: docs/solidity-guides/decryption/public-decryption.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
# Decryption
1
+
# Public decryption
2
2
3
3
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.
4
4
5
5
{% 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).
7
7
{% endhint %}
8
8
9
9
Decryption is essential in two primary cases:
10
10
11
11
1.**Smart contract logic**: A contract requires plaintext values for computations or decision-making.
12
12
2.**User interaction**: Plaintext data needs to be revealed to all users, such as revealing the decision of the vote.
13
13
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).
15
15
16
16
## Overview
17
17
@@ -60,7 +60,7 @@ contract TestAsyncDecrypt is SepoliaConfig {
60
60
61
61
### Next steps
62
62
63
-
Explore advanced decryption techniques and learn more about re-encryption:
63
+
Explore advanced decryption techniques and learn more about user decryption:
Copy file name to clipboardExpand all lines: docs/solidity-guides/decryption/user-decryption.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
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.
4
4
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.
6
6
7
7
{% 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).
9
9
{% endhint %}
10
10
11
11
## When to use user decryption
@@ -14,11 +14,11 @@ User decryption is particularly useful for **allowing individual users to secure
14
14
15
15
## Overview
16
16
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.
18
18
19
19
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.
20
20
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:
22
22
23
23
1. Retrieving the ciphertext from the blockchain using a contract’s view function.
24
24
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 {
41
41
42
42
Here, `balanceOf` allows retrieval of the user’s encrypted balance stored on the blockchain.
43
43
44
-
## Step 2: re-encrypt the ciphertext
44
+
## Step 2: decrypt the ciphertext
45
45
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:
0 commit comments