Skip to content

Devnet 4#44

Open
TomWambsgans wants to merge 11 commits intomainfrom
devnet4
Open

Devnet 4#44
TomWambsgans wants to merge 11 commits intomainfrom
devnet4

Conversation

@TomWambsgans
Copy link
Copy Markdown
Contributor

Changes:

  • "Replacement" sponge instead of "Addition" sponge
  • Some data reordering (in hash chains + at encoding + in sponge)

type IE = TargetSumEncoding<MH, TARGET_SUM>;

pub type SIGAbortingTargetSumLifetime32Dim64Base8 =
pub type SchemeAbortingTargetSumLifetime32Dim46Base8 =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what's the rationale for renaming SIG to Scheme? Naming convention for cryptographic building blocks in this code base was all upper case letters.

/// Instantiations with Lifetime 2^6. This is for testing purposes only.
/// Instantiations with Lifetime 2^8. This is for testing purposes only.
///
/// Warning: Should not be used in production environments.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with these parameters, I would say this should be changed to "MUST not".


// now, we hash randomness, parameters, epoch, message using PoseidonCompress
let combined_input_vec: Vec<F> = randomness
let combined_input_vec: Vec<F> = message_fe
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the comment above should be changed as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, maybe we can add to the comment that this deviates from the order in the paper and why we do that?

///
/// ### "Replacement"
/// This means we "replace" the rate elements of the state with the input chunk, instead
/// of adding (in the sense of finite field addition).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

similar to the other change: make explicit that this is no longer consistent with the paper, and explain why we do that.

match message {
[single] => {
// we compress parameter, tweak, message
// we compress message, parameter, tweak
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see above. Changes should be highlighted and explained.

Comment thread README.md

## Deviations from the [original paper](https://eprint.iacr.org/2025/055.pdf)

- use of 'overwrite' sponge, instead of 'addition' / 'xor' sponge.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe make a bit more precise. Where exactly, and why?

use crate::MESSAGE_LENGTH;
use crate::serialization::Serializable;

pub use poseidon::encode_message;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this needed? seems to break some abstraction levels, no?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants