1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

doc updates

This commit is contained in:
sdeml 2019-03-29 09:06:29 +01:00
parent 727f1b572f
commit 5cc19c3ca9
3 changed files with 8 additions and 3 deletions

View file

@ -51,7 +51,7 @@ where `G` is the chosen base point of the subgroup and `*` denotes scalar multip
import "signatures/verifyEddsa.code"
```
Verifies an EdDSA Signature. Checks the correctness of a given EdDSA Signature `(R,S)` for the provided public key `A` and message `(M0, M1)`.
Verifies an EdDSA Signature. Checks the correctness of a given EdDSA Signature `(R,S)` for the provided public key `A` and message `(M0, M1)`. Check out this [python repository](https://github.com/Zokrates/pycrypto) for tooling to create valid signatures.
### Packing / Unpacking

View file

@ -1,9 +1,11 @@
import "ecc/edwardsAdd.code" as add
import "ecc/edwardsOnCurve.code" as assertOnCurve
// Function that implements scalar multiplication for a given base point
// Function that implements scalar multiplication for a fixed base point
// Curve parameters are defined with the last argument
// The exponent is hard-coded to a 256bit scalar, hence we allow wrapping around the group for certain
// curve parameters.
// Note that the exponent array is not check to be boolean in this gadget
// https://github.com/zcash-hackworks/sapling-crypto/blob/master/src/jubjub/fs.rs#L555
// Reference: https://github.com/zcash-hackworks/sapling-crypto/blob/master/src/jubjub/fs.rs#L555
def main(field[256] exponent, field[2] pt, field[10] context) -> (field[2]):
field[2] infinity = [context[2], context[3]]

View file

@ -9,6 +9,9 @@ import "ecc/edwardsOrderCheck.code" as orderCheck
///
/// Checks the correctness of a given EdDSA Signature (R,S) for the provided
/// public key A and message (M0, M1).
/// This python repo provides the tooling for creating valid signatures:
/// https://github.com/Zokrates/pycrypto
///
/// For more information see:
/// https://en.wikipedia.org/wiki/EdDSA
/// https://eprint.iacr.org/2015/677.pdf