Skip to content

Add new assumptions and move the DDH #81

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

ErVinuelas
Copy link
Collaborator

Added some assumptions needed for the polynomial/KZG commitments. Moved all the assumptions I am aware of to a new folder.

@ErVinuelas ErVinuelas requested review from 4ever2 and cmester0 and removed request for 4ever2 and cmester0 June 3, 2025 11:45
@spitters
Copy link
Contributor

spitters commented Jun 3, 2025

I like the idea. Could you add some minimal documentation? A README in the directory with an explanation of the abbreviations, although they are fairly standard...

@ErVinuelas
Copy link
Collaborator Author

I have added the README, let me know what you think @spitters.

### Overview

The t-Strong Diffie-Hellman assumption posits that given a randomly chosen \( α \in \mathbb{Z}_p^*\)
and a \((t + 1)\)-tuple \((g, g^α, g^{α^2}, ..., g^{α^t})\in \mathbb{G}^{t+1} \), it is computationally infeasible for an adversary to find a \( c \in \mathbb{Z}_p - \{-α \}\) such that \( g^{1/(α + c)}\).
Copy link
Collaborator

Choose a reason for hiding this comment

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

The math in the readme doesn't render correctly. You can fix this by adding $ around the equations instead of "\( \)".

Copy link
Contributor

@spitters spitters Jun 4, 2025

Choose a reason for hiding this comment

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

such that ( g^{1/(α + c)}).

This is not a proposition. Something seems to be missing here.

@@ -0,0 +1,158 @@
From SSProve.Relational Require Import OrderEnrichedCategory GenericRulesSimple.
Copy link
Collaborator

Choose a reason for hiding this comment

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

A small header in each file would be good. It doesn't have to be super detailed since you added the README, but it would be good to at least mention in the header what the file formalizes.

Comment on lines +153 to +156
Definition tSDH b : game tSDH_E :=
if b then tSDH_tt else tSDH_ff.

Definition ϵ_tSDH := Advantage tSDH.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The indentation is off here.

@spitters
Copy link
Contributor

spitters commented Jun 4, 2025

I made some minor suggestions.
General question: It would be good to factor out all the uses of these assumptions to avoid duplication.
I.e. have the other files depend on these assumption files.

Comment on lines +42 to +45
Parameter positive_order : Positive #[g].
Parameter order_gr_two : (#[g] > 2)%N.

Parameter t : nat.
Copy link
Contributor

Choose a reason for hiding this comment

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

These parameters look odd to me. From the other assumptions it is provable that #[g] > 1 like here in Schnorr.v where it is also used to work with inverse exponents. It looks like you are also trying to do that here, unless I am missing something?
positive_order is also provable from the other assumptions and t seems like it belongs as a separate parameter in tSDH.


#def #[ guess ] (y: 'group) : 'bool
{
x ← get secret_loc ;;
Copy link
Contributor

Choose a reason for hiding this comment

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

Watch out for the implicit initialization of locations. secret_loc is initialized with a known value (0), so an adversary that calls guess with y^0 before calling set_up will distinguish DL_real and DL_ideal.

You can compare to my definition here, which prevents this by using an option value:
https://github.com/MarkusKL/nominal-ssprove/blob/dev-std/theories/Std/Assumptions/DL.v#L38

Copy link
Contributor

Choose a reason for hiding this comment

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

The tSDH definition has the same problem.

@MarkusKL
Copy link
Contributor

Overall this looks good. Thanks.

This may not be for you to solve now, but I wanted to note that at this point many files define their own Module Type GroupParams and re-establish a few lemmas. Ideally, there would be one CyclicGroup setup that each file depends on. I have something like that already here and we could work to move it and extend it with a better interface for fractions in the exponent.

@4ever2 4ever2 mentioned this pull request Jun 10, 2025
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.

4 participants