-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Current `Transcript` assumes that its commitment type is an affine point. This commit breaks this assumption and it differentiates cases. 1. Commitment and Scalar are same types, such as FRI commitment cases. 2. Commitment and Scalar are different types, such as KZG commitment cases. Also `TranscriptReader` and `TranscriptWriter` child classes uses `Curve` type as a template parameter which is different from `Commitment` type from a parent class. This commit unifies template parameter for consistency as well. Other than above, it does as follows. - move halo2 specific things to `zk/plonk/halo2`. - remove `Challenge255` which leads to removing `SqueezeChallengeAsScalar()`. - rename `ReadScalar()` and `ReadPoint()` to `ReadFromProof()` for consistency with `WriteToProof()` and `WriteToTranscript()`. - remove unused headers from transcript implementation.
- Loading branch information
Showing
22 changed files
with
481 additions
and
431 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
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,59 +1,22 @@ | ||
load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_cc_unittest") | ||
load("//bazel:tachyon_cc.bzl", "tachyon_cc_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
tachyon_cc_library( | ||
name = "blake2b_transcript", | ||
hdrs = ["blake2b_transcript.h"], | ||
deps = [ | ||
":transcript", | ||
"//tachyon/math/elliptic_curves:points", | ||
"@com_google_boringssl//:crypto", | ||
], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "poseidon_transcript", | ||
hdrs = ["poseidon_transcript.h"], | ||
deps = [ | ||
":transcript", | ||
"//tachyon/crypto/hashes/sponge/poseidon:halo2_poseidon", | ||
"//tachyon/math/elliptic_curves:points", | ||
], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "sha256_transcript", | ||
hdrs = ["sha256_transcript.h"], | ||
deps = [ | ||
":transcript", | ||
"//tachyon/base/ranges:algorithm", | ||
"//tachyon/base/types:always_false", | ||
"//tachyon/math/elliptic_curves:points", | ||
"@com_google_boringssl//:crypto", | ||
], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "transcript", | ||
hdrs = ["transcript.h"], | ||
deps = [ | ||
":transcript_traits", | ||
"//tachyon/base/buffer:vector_buffer", | ||
"//tachyon/math/base:big_int", | ||
], | ||
) | ||
|
||
tachyon_cc_unittest( | ||
name = "transcript_unittests", | ||
srcs = [ | ||
"blake2b_transcript_unittest.cc", | ||
"poseidon_transcript_unittest.cc", | ||
"sha256_transcript_unittest.cc", | ||
], | ||
tachyon_cc_library( | ||
name = "transcript_traits", | ||
hdrs = ["transcript_traits.h"], | ||
deps = [ | ||
":blake2b_transcript", | ||
":poseidon_transcript", | ||
":sha256_transcript", | ||
"//tachyon/math/elliptic_curves/bn/bn254:g1", | ||
"//tachyon/math/elliptic_curves:points", | ||
"//tachyon/math/finite_fields:prime_field_base", | ||
], | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.