Greetings, Lightning devs
This mail serves as an introduction to one of the two specs
that we want to propose to the community.
The scope of these specs is transmitting data over the Lightning
Network (over HTLC custom records). This is a use-case already used
by a few projects (1, 2, 3, 4), and in this context
we do not intend to debate the validity of it.
As mentioned, DataSig is one of the two specs we aim in proposing:
We seek feedback on the two specs as we want to improve and tweak
them before proceeding with a BLIP proposal.
This spec's aim is to describe the format of a structure representing
a signature over some arbitrary data.
Before proceeding, a few clarifications must be made:
The main scope of DataSig is assisting with data verification
independently of what medium one chooses for data transmission.
Nevertheless, for simplicity, in the follow-up DataStruct spec
we assume the data to be transmitted over custom TLV records as well.
We consider a compact encoding to be used for representing the
DataSig structure over a TLV, so it is expressed as the following
protobuf message:
message DataSig {
uint32 version = 1;
bytes sig = 2;
bytes senderPK = 3;
}
version
: The version of DataSig spec used.sig
: The bytes of the signature.senderPK
: The sender's public key.In order to instantiate a DataSig signing the data D
, one needs
to follow these steps:
version
with the version that is going to be used.A
) to D
,AD
).AD
, generating a signature encoded insig
field with the generated signature.senderPK
with own address.S
).Assuming that the destination node has retrieved:
D
S
The data should be verified against the signature
by following the below procedure:
S
according to DataSig protobuf message definition.version
is not supported or unknown, consider dataA
) to byte array D
, generating the byteAD
.sig
field against the messageAD
and sender public key senderPK
.The scope of this spec is to deal with the verification
of the author and intended recipient of transmitted data.
We do not intend to solve the issue of associating a DataSig
to the corresponding data (signed by it), in case they are
not transmitted in pairs.
For now, we assume that data and signature are transmitted
over an HTLC's custom records in pairs.
You can find a formatted version of this document on
hackmd.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing