-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specification: file organization in protocol spec #4485
Changes from 8 commits
005af10
0d0fe45
5f388f6
8ffa1ba
17f1e6c
92da23a
ae06b2f
5cac6c2
a643141
3c0a999
f3d0866
984405c
edc8281
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,14 @@ attaches a *detection key* to each address, allowing a user to outsource | |
probabilistic transaction detection to a relatively untrusted third-party | ||
scanning service. | ||
|
||
## Privacy Implications | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added privacy implications associated with detection keys based on comments made in component Y. |
||
|
||
While diversified addresses are described as *publicly unlinkable*, a detection entity given multiple detection keys can empirically link the corresponding diversified addresses via the clue keys $\mathsf{ck_d}$ contained within them. This is because the detection entity, by reporting detected transactions to the same user, empirically knows that the detection keys $\mathsf{dtk_d}$ are linked. If the detection entity observes two addresses belonging to the user, they can link them because the clue key appears in each address and is derived solely from the detection key. | ||
|
||
In a simplified scenerio, a user with diversified addresses ${addr_1}$ and ${addr_2}$ gives the associated detection keys ${dtk_{d_1}}$ and ${dtk_{d_2}}$ to the detection entity. The detection entity detects relevant transactions using the clue keys ${ck_{d_1}}$ and ${ck_{d_2}}$, and reports the detected transactions for ${dtk_{d_1}}$ and ${dtk_{d_2}}$ back to the user. The detection entity can naively observe that transactions related to ${ck_{d_1}}$ and ${ck_{d_2}}$ are reported back to the same user, and therefore the addresses linked to these detection keys belong to the same user. There's a notion of linkability here since the diversified addresses can be linked by the detection entity through the detection keys, from which the clue keys are derived. | ||
|
||
To mitigate the linkability of diversified addresses when using detection keys, a user should consider using multiple third parties: distribute detection keys to different detection entities instead of a single one, reducing the risk that any single entity has enough keys to link diversified addresses. | ||
|
||
## Diversifiers | ||
|
||
Addresses are parameterized by *diversifiers*, 16-byte tags used to derive up to | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Flow Encryption and Consensus | ||
|
||
Flow encryption is marked for the next version of the protocol. The documentation will be expanded to include detailed information on flow encryption and its implementation, reflecting the ongoing enhancements in the core protocol. |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
# Note Ciphertexts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note encryption was previously unspecified. |
||
|
||
TK. | ||
Encrypting a note plaintext involves the following steps: | ||
|
||
1. Derive Ephemeral Secret Key: Use [decaf377-ka](https://github.com/penumbra-zone/decaf377-ka) to derive an ephemeral secret key *esk*. | ||
|
||
2. Derive Diversified Public Key: Generate a diversified public key from the secret key *epk*. | ||
|
||
3. Shared Secret Derivation: Perform a secure Diffie-Hellman key exchange to derive the shared secret between the sender and recipient. | ||
|
||
4. Symmetric Key Generation: Generate a symmetric [ChaCha20-Poly1305](https://protocol.penumbra.zone/main/addresses_keys/transaction_crypto.html#random-memo-key) payload key from the shared secret and ephemeral public key. | ||
|
||
5. Encryption: Encrypt with note plaintext, represented as a vector of bytes, using the ChaCha20-Poly1305 encryption algorithm. | ||
|
||
6. Construct the encrypted note ciphertext object. | ||
|
||
The note ciphertext is **176** bytes in length. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ The note commitment is generated using rate-5 Poseidon hashing with domain separ | |
The note commitment is then constructed using the above domain separator and | ||
hashing together the above contents along with the note blinding factor $rcm$: | ||
|
||
`note_commitment = hash_5(ds, (rcm, v, ID, B_d, pk_d))` | ||
`note_commitment = hash_6(ds, (rcm, v, ID, B_d, pk_d, ck_d))` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
The note blinding factor $rcm$ is derived from the `rseed` 32-byte value in the | ||
note. Define `prf_expand(label, key, input)` as BLAKE2b-512 with | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ Plaintext notes contain: | |
* the value to be transmitted which consists of an integer amount $v$ along with a scalar (32 bytes) $ID$ identifying the asset. | ||
* $rseed$, a 32-byte random value, which will later be used to derive the note blinding factor used for the | ||
note commitment and an ephemeral secret key. | ||
* the destination address, described in more detail in the [Addresses](../addresses_keys/addresses.md) section. | ||
* the destination address controlling the note, described in more detail in the [Addresses](../addresses_keys/addresses.md) section. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the note plaintext section of the audit, there was some confusion about
|
||
|
||
The note can only be spent by the holder of the spend key that corresponds to the diversified transmission key $pk_d$ in the note. |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should actually keep this section and link to the implementation