Skip to content
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

Add security estimate in unique decoding regime #356

Merged
merged 6 commits into from
Jan 29, 2025

Conversation

Al-Kindi-0
Copy link
Contributor

As the title says.
It also simplifies the estimate in LDR and moreover gives the round-by-round (knowledge) soundness error now.

Copy link

@WizardOfMenlo WizardOfMenlo left a comment

Choose a reason for hiding this comment

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

Did a pass, apart from some small minor docs improvements looks good to me.
One comment, it might be interesting to have an intermediate conjecture setting, such as Conjecture 8.4 in proximity gaps. This sits between the Toy problem and the provable in terms of strenght.

H::COLLISION_RESISTANCE,
)
}
/// This is Conjecture 1 in https://eprint.iacr.org/2021/582.

Choose a reason for hiding this comment

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

Maybe mention this is re the "Toy problem".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

/// Computes conjectured security level for the specified proof parameters.
fn get_conjectured_security(
options: &ProofOptions,
base_field_bits: u32,
trace_domain_size: usize,
collision_resistance: u32,
) -> u32 {
) -> ConjecturedSecurityBits {
// compute max security we can get for a given field size
let field_size = base_field_bits * options.field_extension().degree();
let field_security = field_size - (trace_domain_size * options.blowup_factor()).ilog2();

Choose a reason for hiding this comment

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

As far as I can tell, Conjecture 1 in ethSTARK does not include the trace domain size? Might be good to add a reference to where that comes from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, this is a sort of hybrid between the conjecture on the toy problem (or more succinctly toy conjecture) and conjecture 8.4 in the proximity gaps paper.
As you suggest, it might make more sense to remove the domain size from the above so as to match the toy conjecture exactly and then add an additional "security mode" to capture Conjecture 8.4 with the exponents therein equal to 1.

@@ -241,7 +261,7 @@ fn get_proven_security(
base_field_bits: u32,
trace_domain_size: usize,
collision_resistance: u32,
) -> u32 {
) -> ProvenSecurityBits {
let m_min: usize = 3;

Choose a reason for hiding this comment

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

Maybe add a comment re the strategy used to compute m?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

) as u32
) as u32;

let unique_decoding = cmp::min(

Choose a reason for hiding this comment

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

Move to before list_decoding as it does not depend on m?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

/// Computes the largest proximity parameter m needed for Theorem 8
/// in <https://eprint.iacr.org/2022/1216.pdf> to work.
/// Computes the largest proximity parameter m such that eta is greater than 0 in Theorem 1 in
/// https://eprint.iacr.org/2021/582.

Choose a reason for hiding this comment

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

Thm 1 in ethSTARK is the Johnson bound, which does not mention m at all. Maybe we should refer to the definition of eta here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, it is hidden in the proof. Expanded the comment in order to make it easier to get the point

@Al-Kindi-0
Copy link
Contributor Author

@irakliyk can you do a pass on this PR? This way I can build the next PR on the changes in this one.

Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! (and sorry for such a delay with the review). I left a couple of comments inline - they are mostly about getting the API to be more ergonomic.

Also, did these changes affect security estimates for any of our common parameter sets?

air/src/proof/mod.rs Outdated Show resolved Hide resolved
air/src/proof/mod.rs Outdated Show resolved Hide resolved
@Al-Kindi-0
Copy link
Contributor Author

Also, did these changes affect security estimates for any of our common parameter sets?

Nothing changed, but due to not using multiple calls to cmp::min in LDR, we have regained 2 bits of security.

Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left some more comments inline - mostly related to doc comments.

One question: how long does computing security (both conjectured and proven) now take?

air/src/proof/mod.rs Outdated Show resolved Hide resolved
air/src/proof/mod.rs Outdated Show resolved Hide resolved
examples/src/main.rs Show resolved Hide resolved
air/src/proof/security.rs Show resolved Hide resolved
air/src/proof/security.rs Outdated Show resolved Hide resolved
air/src/proof/security.rs Show resolved Hide resolved
air/src/proof/security.rs Outdated Show resolved Hide resolved
air/src/proof/security.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@irakliyk irakliyk merged commit fb28289 into facebook:main Jan 29, 2025
8 checks passed
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.

4 participants