mirror of
https://github.com/arnaucube/ark-ec-blind-signatures.git
synced 2026-01-12 00:21:29 +01:00
Add GHA test checks & clippy
This commit is contained in:
11
.github/workflows/clippy.yml
vendored
Normal file
11
.github/workflows/clippy.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: Clippy
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
clippy_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- run: rustup component add clippy
|
||||||
|
- uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
14
.github/workflows/test.yml
vendored
Normal file
14
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cargo test --verbose
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# ark-ec-blind-signatures
|
# ark-ec-blind-signatures [](https://github.com/aragonzkresearch/ark-ec-blind-signatures/actions?query=workflow%3ATest) [](https://github.com/aragonzkresearch/ark-ec-blind-signatures/actions?query=workflow%3AClippy)
|
||||||
Blind signatures over elliptic curve implementation (native & r1cs gadgets) using arkworks.
|
|
||||||
|
Blind signatures over elliptic curve implementation (native & r1cs constraints) using arkworks.
|
||||||
|
|
||||||
[Blind signature](https://en.wikipedia.org/wiki/Blind_signature) over elliptic curves, based on *"[New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem](https://sci-hub.st/10.1109/iccke.2013.6682844)"* paper by Hamid Mala & Nafiseh Nezhadansari.
|
[Blind signature](https://en.wikipedia.org/wiki/Blind_signature) over elliptic curves, based on *"[New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem](https://sci-hub.st/10.1109/iccke.2013.6682844)"* paper by Hamid Mala & Nafiseh Nezhadansari.
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ where
|
|||||||
// let s = val.borrow().s;
|
// let s = val.borrow().s;
|
||||||
let mut s = Vec::<UInt8<ConstraintF<C>>>::new();
|
let mut s = Vec::<UInt8<ConstraintF<C>>>::new();
|
||||||
let s_bytes = to_bytes![val.borrow().s].unwrap();
|
let s_bytes = to_bytes![val.borrow().s].unwrap();
|
||||||
|
#[allow(clippy::needless_range_loop)]
|
||||||
for i in 0..s_bytes.len() {
|
for i in 0..s_bytes.len() {
|
||||||
s.push(UInt8::<ConstraintF<C>>::new_variable(
|
s.push(UInt8::<ConstraintF<C>>::new_variable(
|
||||||
cs.clone(),
|
cs.clone(),
|
||||||
@@ -236,6 +237,7 @@ where
|
|||||||
SignatureVar::<C, GC>::new_witness(ark_relations::ns!(cs, "signature"), || {
|
SignatureVar::<C, GC>::new_witness(ark_relations::ns!(cs, "signature"), || {
|
||||||
self.signature.ok_or(SynthesisError::AssignmentMissing)
|
self.signature.ok_or(SynthesisError::AssignmentMissing)
|
||||||
})?;
|
})?;
|
||||||
|
#[allow(clippy::redundant_clone)]
|
||||||
let poseidon_hash = PoseidonGadget::<ConstraintF<C>>::from_native(
|
let poseidon_hash = PoseidonGadget::<ConstraintF<C>>::from_native(
|
||||||
&mut cs.clone(),
|
&mut cs.clone(),
|
||||||
self.poseidon_hash_native,
|
self.poseidon_hash_native,
|
||||||
|
|||||||
@@ -136,8 +136,9 @@ where
|
|||||||
<C as ProjectiveCurve>::ScalarField: From<BigInteger256>,
|
<C as ProjectiveCurve>::ScalarField: From<BigInteger256>,
|
||||||
{
|
{
|
||||||
let u = Self::new_blind_params(parameters, rng, signer_r);
|
let u = Self::new_blind_params(parameters, rng, signer_r);
|
||||||
|
|
||||||
// get X coordinate, as in new_blind_params we already checked that R.x is inside Fr and
|
// get X coordinate, as in new_blind_params we already checked that R.x is inside Fr and
|
||||||
// will not give None
|
// will not overflow (giving None)
|
||||||
let r = EdwardsAffine::from(u.r); // WIP
|
let r = EdwardsAffine::from(u.r); // WIP
|
||||||
let x_fr = C::ScalarField::from(r.x.into_repr());
|
let x_fr = C::ScalarField::from(r.x.into_repr());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user