-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xmrswap: Remove C deps for signature encryption and dleq #2936
base: master
Are you sure you want to change the base?
Conversation
Add a c library that has some primitive cryptographic functions needed for working with adaptor signatures.
Glad to see this! I did notice the dependency has various inefficiencies looking through it, but given that it won't be used in any type of hot paths, that is unlikely to matter much. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow.
closes #2918
get transaction development details from monerod including tx lock time; which is different from 'locked'/'unlocked' which refer to when a tx has 10 confirmations. Tx locktime can be any number of blocks in the future.
- Rename monero_functions.inc -> monero_functions - Tidy extra whitespace at eol for harness.sh & monero_functions.
New monero-wallet-rpc server with no attached wallet. This is for programmatically creating/generating and using a new wallet. The wallet will be generated in "own" dir but can be named what- ever you need: "alice", "Bob", etc.
a14385a
to
b16275a
Compare
@davecgh Thanks for the review! |
1d0b008
to
c0e9f55
Compare
@JoeGruffins since these adaptor signatures use schnorr signatures rather than ecdsa as was in the C library, I've updated the tx scripts to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the DLEQ dep for correctness, but aside from the last nit in my most recent comment, the adaptor sig code looks accurate and reasonably efficient.
|
||
import "github.com/decred/dcrd/txscript/v4" | ||
|
||
func LockRefundTxScript(kal, kaf []byte, locktime int64) ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since probably nothing other than the internal code will use it, I'm sure you guys probably aren't worried about it, but I'd point out that with no function comment and variables named kal
and kaf
, it's pretty unclear what they are here without looking at the code to determine they're Schnorr sigs over secp256k1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @JoeGruffins will do some refactor regarding variable names throughout after this one is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
OK thanks for the reviews! I think DLEQ dep will have to be audited before we release anything, but I think it is fine for this POC currently. |
I followed up a bit on this comment, but it's resolved, so I figured I'd post a link to it here so it doesn't get missed. |
@martonp is on vacay, we'll pick up when they're back |
3dea188
to
134d9ce
Compare
134d9ce
to
4fdfbb8
Compare
Adds functions for encrypting / decrypting Schnorr signatures, and uses the athanorlabs/go-dleq library for discrete log equivalence.