Skip to content

feat: remove epk sign from message payload#20926

Merged
nventuro merged 2 commits intomerge-train/fairiesfrom
nico/f-368-remove-epk_sign-from-message-ciphertext
Feb 27, 2026
Merged

feat: remove epk sign from message payload#20926
nventuro merged 2 commits intomerge-train/fairiesfrom
nico/f-368-remove-epk_sign-from-message-ciphertext

Conversation

@nventuro
Copy link
Contributor

This frees up one byte of capacity, but more importantly it reduces the leakage in the logs as they'll no longer contain a byte that is either 0 or 1.

@nventuro nventuro requested a review from nchamo February 26, 2026 22:09
@nventuro nventuro changed the title feat: remove epk sign from cmsg feat: remove epk sign from message payload Feb 26, 2026
///
/// This is useful as it means it is possible to just broadcast the x-coordinate as a single `Field` and then
/// reconstruct the original public key using [`crate::utils::point::point_from_x_coord_and_sign`] with `sign: true`.
pub fn generate_positive_ephemeral_key_pair() -> (Scalar, Point) {
Copy link
Contributor Author

@nventuro nventuro Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a new fn to avoid changing the other one, since we want to backport this and minimize breakage. There's a linear task to clean this up later on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a TODO with the linear task id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's done already 🙃

Copy link
Contributor

@nchamo nchamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

///
/// This is useful as it means it is possible to just broadcast the x-coordinate as a single `Field` and then
/// reconstruct the original public key using [`crate::utils::point::point_from_x_coord_and_sign`] with `sign: true`.
pub fn generate_positive_ephemeral_key_pair() -> (Scalar, Point) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a TODO with the linear task id?

@nventuro nventuro enabled auto-merge (squash) February 26, 2026 23:13
@AztecBot
Copy link
Collaborator

AztecBot commented Feb 26, 2026

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/d69afcfb558e96cb�d69afcfb558e96cb8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates previous block with shuffled attestations" (124s) (code: 0) group:e2e-p2p-epoch-flakes

@nventuro nventuro merged commit 2ba3311 into merge-train/fairies Feb 27, 2026
10 checks passed
@nventuro nventuro deleted the nico/f-368-remove-epk_sign-from-message-ciphertext branch February 27, 2026 14:24
@AztecBot
Copy link
Collaborator

❌ Failed to cherry-pick to v4 due to conflicts. Dispatching ClaudeBox to resolve. View backport run.

AztecBot added a commit that referenced this pull request Feb 27, 2026
This frees up one byte of capacity, but more importantly it reduces the
leakage in the logs as they'll no longer contain a byte that is either 0
or 1.

Backport of #20926
AztecBot pushed a commit that referenced this pull request Feb 27, 2026
This frees up one byte of capacity, but more importantly it reduces the
leakage in the logs as they'll no longer contain a byte that is either 0
or 1.
AztecBot added a commit that referenced this pull request Feb 27, 2026
This frees up one byte of capacity, but more importantly it reduces the
leakage in the logs as they'll no longer contain a byte that is either 0
or 1.

Cherry-pick of 2ba3311 with conflict resolution for v4.
Conflicts in encoding.nr and aes128.nr due to different
MESSAGE_CIPHERTEXT_LEN (17 on v4 vs 15 on next) and absence of
AES128_PKCS7_EXPANSION_IN_BYTES on v4.
AztecBot added a commit that referenced this pull request Feb 27, 2026
Adds the detailed docstring for the AES128 encrypt method that was
part of the original PR on next, adapted for v4's constants.
AztecBot added a commit that referenced this pull request Feb 27, 2026
Raw cherry-pick of 2ba3311 onto v4 with unresolved conflict markers
in encoding.nr and aes128.nr.
github-merge-queue bot pushed a commit that referenced this pull request Feb 27, 2026
BEGIN_COMMIT_OVERRIDE
feat: remove epk sign from message payload (#20926)
END_COMMIT_OVERRIDE
AztecBot pushed a commit that referenced this pull request Feb 27, 2026
This frees up one byte of capacity, but more importantly it reduces the leakage in the logs as they'll no longer contain a byte that is either 0 or 1.
@AztecBot
Copy link
Collaborator

✅ Successfully backported to backport-to-v4-staging #20980.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants