Skip to content

Commit

Permalink
enforcing width at call signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
Janis Erdmanis committed Jan 4, 2025
1 parent acdf620 commit 9133ed0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ShuffleProofs"
uuid = "31a120cc-b3cb-4d07-bbdb-d498660ddfd8"
authors = ["Janis Erdmanis <[email protected]>"]
version = "0.4.3"
version = "0.4.4"

[deps]
CryptoGroups = "bc997328-bedd-407e-bcd3-5758e064a52d"
Expand Down
4 changes: 2 additions & 2 deletions src/prover.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function prove(proposition::Shuffle{G}, verifier::Verifier, 𝐫′::Matrix{<:In
end


function verify(proposition::Shuffle{G}, proof::PoSProof{G}, verifier::Verifier) where G <: Group
function verify(proposition::Shuffle{G, N}, proof::PoSProof{G, N}, verifier::Verifier) where {G <: Group, N}

#ρ = ro_prefix(verifier) # can be efficiently recomputed
𝐡 = generator_basis(verifier, G, length(proposition))
Expand All @@ -232,7 +232,7 @@ function verify(proposition::Shuffle{G}, proof::PoSProof{G}, verifier::Verifier)
end


function verify(proposition::Shuffle, proof::PoSProof, challenge::PoSChallenge; verbose=false)
function verify(proposition::Shuffle{G, W}, proof::PoSProof{G, W}, challenge::PoSChallenge{G}; verbose=false) where {G <: Group, W}

(; g, pk, 𝐞, 𝐞′) = proposition
(; 𝐜, 𝐜̂, t, s) = proof
Expand Down
10 changes: 5 additions & 5 deletions src/verifier.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function challenge_perm(spec::ProtocolSpec, proposition, 𝐮;
return 𝐞
end

function verify(proposition::Shuffle{G}, proof::PoSProof{G}, verifier::ProtocolSpec{G}) where G <: Group
function verify(proposition::Shuffle{G, N}, proof::PoSProof{G, N}, verifier::ProtocolSpec{G}) where {G <: Group, N}


ρ = ro_prefix(verifier)
Expand All @@ -149,7 +149,7 @@ function verify(proposition::Shuffle{G}, proof::PoSProof{G}, verifier::ProtocolS
end


function challenge_reenc(spec::ProtocolSpec{G}, proposition::Shuffle{G}, 𝐮, τ::Tuple{Vector{G}, G, Vector{G}, G, G, ElGamalRow{G, N}};
function challenge_reenc(spec::ProtocolSpec{G}, proposition::Shuffle{G, N}, 𝐮, τ::Tuple{Vector{G}, G, Vector{G}, G, G, ElGamalRow{G, N}};
ρ = ro_prefix(spec),
s = seed(spec, proposition, 𝐮; ρ)
) where {G <: Group, N}
Expand All @@ -172,7 +172,7 @@ function challenge_reenc(spec::ProtocolSpec{G}, proposition::Shuffle{G}, 𝐮,
return 𝓿
end

function challenge_reenc(spec::ProtocolSpec{G}, proposition::Shuffle{G}, 𝐜, 𝐜̂::Vector{G}, t::Tuple{G, G, G, ElGamalRow{G, N}, Vector{G}};
function challenge_reenc(spec::ProtocolSpec{G}, proposition::Shuffle{G, N}, 𝐜, 𝐜̂::Vector{G}, t::Tuple{G, G, G, ElGamalRow{G, N}, Vector{G}};
ρ = ro_prefix(spec),
s = seed(spec, proposition, 𝐜; ρ)
) where {G <: Group, N}
Expand All @@ -191,7 +191,7 @@ function challenge_reenc(spec::ProtocolSpec{G}, proposition::Shuffle{G}, 𝐜,
return challenge_reenc(spec, proposition, 𝐜, τ; ρ, s)
end

function verify(proposition::Shuffle{G}, proof::VShuffleProof{G}, challenge::PoSChallenge{G}; verbose=false) where G <: Group
function verify(proposition::Shuffle{G, W}, proof::VShuffleProof{G, W}, challenge::PoSChallenge{G}; verbose=false) where {G <: Group, W}

𝐡, 𝐞, 𝓿 = challenge.𝐡, challenge.𝐮, challenge.c

Expand Down Expand Up @@ -235,7 +235,7 @@ function verify(proposition::Shuffle{G}, proof::VShuffleProof{G}, challenge::PoS
end


function verify(proposition::Shuffle{G}, vproof::VShuffleProof{G}, verifier::Verifier) where G <: Group
function verify(proposition::Shuffle{G, N}, vproof::VShuffleProof{G, N}, verifier::Verifier) where {G <: Group, N}

ρ = ro_prefix(verifier)
𝐡 = generator_basis(verifier, G, length(proposition.𝐞); ρ)
Expand Down

2 comments on commit 9133ed0

@JanisErdmanis
Copy link
Member

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/122405

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.4 -m "<description of version>" 9133ed01b683ae4161a3558e87f72d40d68a6238
git push origin v0.4.4

Please sign in to comment.