17 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun 34fd35bc63 lnwire: add Record() method to lnwire.Sig
We'll use this later on to re-use the normal primitive record to create
a series of new TLV types for the new co-op close protocol.
2024-02-05 16:30:16 -08:00
Olaoluwa Osuntokun 9851a6147b lnwire: TestLightningWireProtocol quick check tests for taproot fields 2023-08-22 16:29:49 -07:00
Olaoluwa Osuntokun b368e476c5 lnwire: update Sig to support both ECDSA and schnorr sigs
In this commit, we update the Sig type to support ECDSA and schnorr
signatures. We need to do this as the HTLC signatures will become
schnorr sigs for taproot channels. The current spec draft opts to
overload this field since both the sigs are actually 64 bytes in length.
The only consideration with this move is that callers need to "coerce" a
sig to the proper type if they need schnorr signatures.
2023-08-22 16:29:19 -07:00
yyforyongyu 19b2236570 lnwire: add length validation in NewSigFromRawSignature 2022-03-11 12:31:49 +08:00
Oliver Gugger 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger e79d59dd4c multi: use key locator for lnwallet.MessageSigner
To simplify the message signing API even further, we refactor the
lnwallet.MessageSigner interface to use a key locator instead of the
public key to identify which key should be signed with.
2021-10-08 12:06:52 +02:00
Conner Fromknecht 0f94b8dc62 multi: return input.Signature from SignOutputRaw 2020-04-10 14:27:35 -07:00
Olaoluwa Osuntokun 6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Olaoluwa Osuntokun 15f812b10f lnwire: don't attempt to decode an empty/nil signature 2018-06-08 13:25:56 -07:00
practicalswift b8e1351cf3 multi: fix some recently introduced typos 2018-02-18 15:27:29 -08:00
Olaoluwa Osuntokun 0d7b8be11b lnwire: add new Sig type to handle conversion to/from btcec.Signature
In this commit, we add a new signature type. We’ll use this type to
avoid fully decoding a signature on the wire into a btcec.Signature.
This type is only really needed when we need to do signature
validation, as a result, always encoding it is a waste. Several helper
methods have been added to the new struct in order to ensure that we
can use it in the existing codebase without substantial issues.
2018-02-06 20:14:26 -08:00
practicalswift a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Johan T. Halseth ff4ca664e3 lnwire: export SerializeSigToWire and DeserializeSigFromWire 2017-09-19 12:05:58 -07:00
Andrey Samokhvalov 9dfaca1632 linter: fix new warnings 2017-03-17 12:53:15 -07:00
Andrey Samokhvalov fd97a4bd19 lnd: partially fix golint warnings 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov 143a6e01bb lnd: fix unconvert warnings 2017-03-13 16:30:23 -07:00
Alex Akselrod a20594b0bf lnwire: switch to using a fixed 64-byte encoding for signatures (#86)
This commit modifies the encoding of signatures on the wire to use 
a fixed-size 64-byte format. This change is required as the current spec
draft dictates that all signatures be encoded as `R` and `S` as 32-byte
big-endian integers. With this, signatures are now always a _fixed_ size 
slice of bytes on the wire, which is nice to have. 

Fixes #83.
2016-12-08 12:56:37 -08:00