Commit Graph

1368 Commits

Author SHA1 Message Date
Daniel Karzel
d3e5bdcb59
Spend from wallet that does not pick up transactions
The code on this branch was used to publish a transaction that spends from a wallet that was created during a swap using `generate_from_keys` but did not pick up the lock transaction of the swap correctly. The transaction could be decoded properly with the view-key, so for now we assume there must be a problem in the `monero-wallet-rpc` when handling certain wallets. Further investigation is needed to reproduce this problem.
This branch was used to spend them the lock transaction, to validate that the transaction can be spent. This was successfully achieved, however, the spending transaction that was published is unfortunately faulty (there is a problem with the outputs). The monero daemon accepted and included the transaction, but the monero wallet (through `monero-wallet-rpc`) is unable to process the transaction properly.

Original Monero Stagenet lock transaction ID: `09e361acb3e6e71d627a945a30672776a6f8fec7c97f4cae5e09b0780b75c158`
Stagenet Transaction ID that spends from the lock tx (the tx published through the integration test on this branch): `f111e906fd4ea3c25ae34d5c8ec68342bbed258c546ce74a839e14f34b591641`
2021-05-27 10:22:30 +10:00
Thomas Eizinger
60de1846c9
Make adaptor signature protocol pass 2021-05-20 16:39:09 +10:00
Thomas Eizinger
0c0acaad9e
Restructure workspace so monero-adaptor only contains the protocol 2021-05-19 17:14:54 +10:00
Thomas Eizinger
1447242fa6
Make use of serde-with for monero-rpc 2021-05-19 14:37:00 +10:00
Thomas Eizinger
ec1916161e
Update to latest monero-rs 2021-05-19 14:36:59 +10:00
Thomas Eizinger
642f1d8318
Update Rust toolchain to get cargo fmt back 2021-05-19 13:54:55 +10:00
Thomas Eizinger
07dd12abf6
Add more error cases 2021-05-17 19:32:02 +10:00
Thomas Eizinger
949dbcaed2
Less mutation, more expressions 2021-05-17 19:24:12 +10:00
Thomas Eizinger
25c4a5a9b9
Sketch initial type-level state machine for signing Monero transactions 2021-05-17 19:08:26 +10:00
Thomas Eizinger
702e1767c7
Update to latest monero-rs 2021-05-17 18:03:43 +10:00
Thomas Eizinger
1af0116cac
Appease clippy 2021-05-17 17:20:33 +10:00
Thomas Eizinger
e35e5c7939
Update to latest monero-rs version 2021-05-17 17:18:02 +10:00
Thomas Eizinger
d1b00f6ee2
Answer TODO 2021-05-14 18:36:02 +10:00
Thomas Eizinger
19efd376da
Introduce ConfidentialTransactionBuilder 2021-05-14 18:14:39 +10:00
Thomas Eizinger
3f0f97b9ba
Use correct amount in EcdhInfo 2021-05-14 14:54:10 +10:00
Thomas Eizinger
523ee6088c
Extract blinding factor and key recovery into functions on Transaction 2021-05-14 13:00:25 +10:00
Thomas Eizinger
91f54bf6b5
Use upstreamed functionality for clsag and signature hash 2021-05-14 12:59:17 +10:00
Thomas Eizinger
04e7d1c111
Use recover_key function to compute actual signing key 2021-05-14 10:57:11 +10:00
Thomas Eizinger
507e2670ac
Change sign API back to taking signing key separately 2021-05-13 17:32:54 +10:00
Thomas Eizinger
7d3633e3ac
WIP sign2 2021-05-13 16:13:32 +10:00
Thomas Eizinger
ced4daedf9
Test sign and verify clsag for every index 2021-05-13 15:57:26 +10:00
Thomas Eizinger
e63ced6a22
Print C++ test code in static-assert test 2021-05-13 14:21:59 +10:00
Thomas Eizinger
de1830f825
Add TODO to be resolved 2021-05-13 14:21:16 +10:00
Thomas Eizinger
558cc3492a
Use key-image variable 2021-05-13 13:53:20 +10:00
Thomas Eizinger
6b026efc7a
Compute actual_signing_key as early as possible 2021-05-13 13:49:39 +10:00
Thomas Eizinger
0a04b9a55c
Fix unit tests to not pass zero z 2021-05-13 13:12:57 +10:00
Lucas Soriano del Pino
83042c4148
OMG Monero transactions!!!!!!!! 2021-05-13 12:35:34 +10:00
Lucas Soriano del Pino
56128bb3a8
Some fixes
- Use correct key image for both signing and constructing transaction.
- Sort ring and commitment ring according to key offset order.
- Given the new order of items in the ring, allow asigning index
  values different to 0. This breaks signature verification, both
  locally and against Monero!
2021-05-13 11:34:58 +10:00
Thomas Eizinger
1e973e5bbd
Rewrite verify to use izip! 2021-05-12 20:47:58 +10:00
Thomas Eizinger
2c6e917554
Compute message to be signed differently 2021-05-12 20:47:57 +10:00
Thomas Eizinger
370718ab66
Put correct key-image into transaction prefix 2021-05-12 20:34:13 +10:00
Thomas Eizinger
fd783846cf
Don't spend anything in the last 100 blocks 2021-05-12 20:34:13 +10:00
Thomas Eizinger
58074fc083
ONLY PARTIALLY WORKING: Allow signing algorithm to be given signing key index
At the moment this works only if the index is 0.
2021-05-12 19:01:30 +10:00
Thomas Eizinger
3d9aee932c
Remove Ring datatype
We no longer need it now that we do this within hash_to_scalar
2021-05-12 12:02:42 +10:00
Thomas Eizinger
16d7094df0
Fix signature creation to output correct h_0 and s_0 2021-05-12 00:42:30 +10:00
Thomas Eizinger
e5b59ee67e
Make it typesafe to hash only slices of 32 bytes 2021-05-11 21:21:07 +10:00
Lucas Soriano del Pino
32cb801fc7
Add 0 bytes to end of domain tags (and other debugging) 2021-05-11 21:14:13 +10:00
Thomas Eizinger
7f2bc9d0bf
Use clsag module in integration test 2021-05-11 17:47:59 +10:00
Thomas Eizinger
08e591f54c
IT WORKS 2021-05-11 17:27:25 +10:00
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