Commit Graph

53 Commits

Author SHA1 Message Date
Thomas Eizinger
ddddc4d1ac
Move code so it stays with the pre-computed things 2021-05-11 15:09:33 +10:00
Thomas Eizinger
fbf9d456ae
Use a closure to not duplicate the common parts of ring element 2021-05-11 15:08:20 +10:00
Thomas Eizinger
c0f4b566c4
Impl Sub for Ring to pre-compute adjusted commitment ring 2021-05-11 15:03:30 +10:00
Thomas Eizinger
5342eb5564
Make Ring an implementation detail of clsag 2021-05-11 14:53:35 +10:00
Thomas Eizinger
c6b36449dc
Deconstruct signature in parameter
This removes the intermediary variable I.
2021-05-11 14:51:15 +10:00
Thomas Eizinger
87ca636ddb
Use Cow to compress EdwardsPoint on the fly in hash function
This allows us to pass EdwardsPoint to hash_to_scalar without compressing
them a priori. As a result, we can remove a bunch of intermediary variables.
2021-05-11 14:48:37 +10:00
Thomas Eizinger
06f1ada2b1
Import tiny_keccak inside hash function 2021-05-11 14:39:48 +10:00
Thomas Eizinger
bf8bc68816
Inline AggregationHashes 2021-05-11 14:38:31 +10:00
Thomas Eizinger
e62c67753a
Inline clsag_round_hash_prefix fn 2021-05-11 14:30:35 +10:00
Thomas Eizinger
52939ad217
Redesign macro to use || as separator 2021-05-11 14:21:28 +10:00
Thomas Eizinger
cf32828739
Make hash_to_scalar a macro so we can pass different types 2021-05-11 14:14:08 +10:00
Thomas Eizinger
53916aab6b
Make Ring an implementation detail of clsag module 2021-05-11 12:47:20 +10:00
Thomas Eizinger
f9cac4b6c9
Don't take Rings by value if we don't consume them 2021-05-11 12:40:37 +10:00
Thomas Eizinger
6a4961a472
Add missing arguments to verify fn 2021-05-11 12:39:31 +10:00
Thomas Eizinger
9255cc8f68
Add dedicated test to clsag module 2021-05-11 12:34:58 +10:00
Thomas Eizinger
1bd8eb83d1
Move Signature::verify to clsag::verify 2021-05-11 12:32:47 +10:00
Thomas Eizinger
874179685a
Move Signature::verify under sign 2021-05-11 12:31:37 +10:00
Thomas Eizinger
07d544adde
Reorder and rename for clarification 2021-05-11 12:25:56 +10:00
Thomas Eizinger
4933d7f1b7
Extract INV_EIGHT constant 2021-05-11 12:21:10 +10:00
Thomas Eizinger
a73024ccfc
Inline AggregationHashes::hash 2021-05-11 12:17:22 +10:00
Thomas Eizinger
a4077d13e5
Inline challenge function 2021-05-11 12:13:14 +10:00
Thomas Eizinger
fb36b7fe4f
Extract hasher utility function 2021-05-11 12:09:15 +10:00
Thomas Eizinger
be7cdb23c3
Re-order arguments of clsag::sign 2021-05-11 12:00:51 +10:00
Thomas Eizinger
c68fe77211
Remove Result return value because we can never fail 2021-05-11 11:57:36 +10:00
Thomas Eizinger
a9e60515a1
Inline const's that are only used once 2021-05-11 11:56:27 +10:00
Thomas Eizinger
0658520ad6
Re-order clsag module to have pub fns first 2021-05-11 11:54:39 +10:00
Thomas Eizinger
ec3c358795
Extract clsag module 2021-05-11 11:51:29 +10:00
Thomas Eizinger
2abc7799e1
Return Signature from sign function 2021-05-11 11:47:20 +10:00
Thomas Eizinger
f4b9f11fef
Pass z and H_p_pk back in because we need z inside for a signature 2021-05-11 11:23:18 +10:00
Thomas Eizinger
cfb05994a6
Remove warning, fmt and make things compile 2021-05-11 11:15:27 +10:00
Thomas Eizinger
41310d860c
Invert D where necessary 2021-05-11 11:15:00 +10:00
Thomas Eizinger
345154ab3e
Multiply BF by 8 because 2021-05-11 11:00:15 +10:00
Thomas Eizinger
799ae7db3e
Pass D into clsag instead of I 2021-05-11 10:43:19 +10:00
Lucas Soriano del Pino
b7fa6edd10
We're almost there (I think) 2021-05-10 19:30:47 +10:00
Thomas Eizinger
b944f0f989
Fix TODO by instructing Vec 2021-05-10 17:45:31 +10:00
Lucas Soriano del Pino
38123a324f
Use Ring type 2021-05-10 17:37:56 +10:00
Thomas Eizinger
80165ba91b
Add ring newtype for easy access of bytes and elements 2021-05-10 17:28:03 +10:00
Lucas Soriano del Pino
05c1b63aa2
[WIP] Conform to Monero CLSAG 2021-05-10 17:25:58 +10:00
Lucas Soriano del Pino
cbdda9b9c4
Document differences with Monero CLSAG 2021-05-10 15:34:19 +10:00
Lucas Soriano del Pino
64cd618aea
[WIP] Make test self-contained 2021-05-10 13:21:40 +10:00
Lucas Soriano del Pino
46d0eaedea
Compute I earlier 2021-05-07 17:48:56 +10:00
Thomas Eizinger
22ff99b65f
Compute s_prime_a properly and make rng configurable 2021-05-07 17:48:07 +10:00
Thomas Eizinger
d9e30b903e
Must have two outputs and upper bound was too low 2021-05-07 15:25:38 +10:00
Thomas Eizinger
ce3134c86a
More debugging 2021-05-07 14:53:32 +10:00
Thomas Eizinger
2b581d0122
Debugging ... 2021-05-07 12:12:24 +10:00
Thomas Eizinger
a04d6efb39
Choose correct lock output automatically 2021-05-06 17:54:50 +10:00
Lucas Soriano del Pino
134287d195
[WIP] More done 2021-05-06 17:25:53 +10:00
Lucas Soriano del Pino
64a0bd7f8a
[WIP] Almost done 2021-05-06 13:39:05 +10:00
Thomas Eizinger
be9c2c7d6b
Fill in some TODOs 2021-05-04 17:58:54 +10:00
Lucas Soriano del Pino
21f31ccb8d
[WIP] More transaction stuff 2021-05-04 16:59:44 +10:00