-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Janis Erdmanis
committed
Sep 8, 2024
1 parent
f9fb0e1
commit 734c50e
Showing
23 changed files
with
142 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Workflow for Codecov example-julia | ||
on: [push, pull_request] | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Julia 1.10.0 | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1.10.0" | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/julia-processcoverage@v1 | ||
- uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.3.1" | ||
version = "0.3.2" | ||
|
||
[deps] | ||
CryptoGroups = "bc997328-bedd-407e-bcd3-5758e064a52d" | ||
|
@@ -13,13 +13,14 @@ SigmaProofs = "f8559b4c-f045-44a2-8db2-503e40bb7416" | |
SigmaProofs = {path = "SigmaProofs"} | ||
|
||
[compat] | ||
CryptoGroups = "0.4" | ||
CryptoPRG = "0.1.0" | ||
CryptoGroups = "0.5" | ||
CryptoPRG = "0.1" | ||
julia = "1" | ||
|
||
[extras] | ||
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
XMLDict = "228000da-037f-5747-90a9-8195ccbf91a5" | ||
|
||
[targets] | ||
test = ["Test", "XMLDict"] | ||
test = ["Test", "SafeTestsets", "XMLDict"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module ShamirLagrange | ||
|
||
# Shamir secret sharing via Lagrange interpolation offers a natural way to split a secret generated by a dealer | ||
# among multiple participants in a verifiable manner. The verifiability enables to everyone participate in the | ||
# protocol as a dealer; | ||
|
||
# 1) The protocol starts by generating a list of coordinates x_i at which polynomial is to be evaluated on a buletin board; they | ||
# can be choosen as independent generators for convinience | ||
# 2) The protocol starts by a dealer generating a polynomial coeficients f(x) = \sum_i a_i x^i (over a field of integers of order q) | ||
# 3) The dealer genreates a commitment for each polynom coefficient Com(a_j) = g^{a_j} h^{r_j} | ||
# 4) The dealer evaluates d_i = f(x_i) and forms commitment for each value Com(d_i) (randomness is reaused from previous steps); Everyone can verify that commitment for d_i to be consistent for its evaluation with polynomial as Com(d_i) = Com(f(x_i)) = \prod (Com(a_j))^{x_i^j}; | ||
# 5) The participant receives secret d_i from the dealer confidnetially and can verify it to be consistent with pulbic commitment | ||
# also knowing publicallly listed h^{r_i} and g^d_i; At this point participants are equiped to particpate in decryption ceremony | ||
|
||
|
||
# Threshold decryption | ||
|
||
# 1) Coordinates at which polynomial evaluations happen are published on the buletin board as well as g^d_i | ||
# 2) Every participant simultanously receives cyphertexts and performs decryption P_i = C_2^d_i and provides | ||
# coresponding logarithmic equality proofs; The partial decryptions are published on the buletin board | ||
# 3) At the end the shares can be combined via lagrange interpolation l_i = prod x_j/(x_j - x_i) and computed decryption as M = C_1 * \prod_i P_i^l_i | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
using Test | ||
using SafeTestsets | ||
|
||
@testset "Testing ElGamal" begin | ||
@safetestset "Testing ElGamal" begin | ||
include("elgamal.jl") | ||
end | ||
|
||
@testset "Testing Generator Basis" begin | ||
@safetestset "Testing PGroup Generator Basis" begin | ||
include("gbasis.jl") | ||
end | ||
|
||
@safetestset "Testing ECGroup Generator Basis" begin | ||
include("gecbasis.jl") | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.