1
0
mirror of https://github.com/lightning/bolts.git synced 2024-11-19 01:50:03 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
Rusty Russell
2800f12025 BOLT 8: fix trivial typo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
7ee9619c0c BOLT 8: typo fixes
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Christian Decker
bf815005ec BOLT08: Renumbering references
We dropped reference 1 and 2 during the split, and the offset
numbering is causing a bit of head-scratching. This renumbers the
reference.

Closes #117
2017-02-28 13:48:54 +10:30
Rusty Russell
fc4846a27b BOLT 8: fix broken test vectors (keys backwards), annotate encryption more.
Reported-by: Olaoluwa Osuntokun <laolu32@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-16 10:55:15 -08:00
Delo
7f6560e253 typo in byte count 2017-01-11 20:15:21 +10:30
Delo
258ef42c1e typos in message parsing bytes 2017-01-11 20:15:21 +10:30
Olaoluwa Osuntokun
7e067bd0d9
BOLT 8: specify that chacha nonces are 96-bit little-endian
This commit fixes an oversight within the spec that details the
encryption nonces as being encoded in a big-endian form rather an a
little-endian for as is intended.

Since our internal nonces are 64-bit in order to match with the Noise
spec, we encoded the 96-bit nonce as 32-bits of leading zeroes followed
by the 64-bit little-endian value.
2017-01-06 13:57:32 -08:00
Rusty Russell
ad5e629cb4 BOLT 8: Test vectors for transport / key rotation.
Note that we increment nonce twice every message, meaning we rotate at
msg 500.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-05 11:36:16 +10:30
Rusty Russell
6be5857021 BOLT 8: Add test vectors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-22 11:33:14 +10:30
Rusty Russell
fcc93d480a BOLT 8: Nonces should be little-endian, 64 bit.
This follows the Noise spec.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-22 11:33:14 +10:30
Rusty Russell
9f979bae5b BOLT 8: clarify the hkdf args. (#57)
They're salt and ikm respectively (using language from RFC5869).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-13 10:46:54 -08:00
Rusty Russell
3f1948ec12 BOLT 4, BOLT 8: use libsecp256k1-style ECDH.
You should probably be using this library anyway, so let's use their
ECDH style.

Closes: #49
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-13 10:25:25 +10:30
Christopher Jämthagen
c5ca57b853 [trivial] Some spelling and language fixes in BOLTs 6,7,8 (#41)
* Some spelling and language fixes in BOLTs 6,7,8
2016-12-09 10:32:23 +10:30
Rusty Russell
2c91aa869f BOLT 8: make temporary handshake keys explicit.
This makes it clear that we do reuse the second one (and hence must
increment the nonce there).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-08 10:58:03 +10:30
Rusty Russell
1da044eb06 BOLT 8: clarify handshake nonces.
Spell out the send/receive nonces for the normal message transport;
they're 0 except in one place where Act3 re-uses temp_k from Act2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


Header from folded patch 'typo-fixes.patch':

Typo fixes to squash.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-08 10:58:03 +10:30
Rusty Russell
15bda3eedd BOLT 8: explicit sn and rn nonces.
Spells it out that they are two separate nonces.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-08 10:58:03 +10:30
Rusty Russell
d251c7eef3 BOLT 8: fix sk,rk definition for responder.
Cut & paste and insufficiently mangled from initiator wording...

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-08 10:58:03 +10:30
Rusty Russell
df871d659e BOLT 8: fix handshake Act 3 receiver hash calculation.
We always hash in the ciphertext.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-08 10:58:03 +10:30
Rusty Russell
eb49bf3a17 BOLT 8: More minor clarifications.
1. Note that we're using the IETF chachapoly variant, which has 96 bit nonces.
2. Note that we send over the serialization of the pubkey on the wire.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-06 13:39:31 +10:30
Rusty Russell
ffed58f1a5 BOLT 8: minor clarifications and fixes.
1. More than three variables.
2. Make nonce encoding explicit (Big-endian, like everything else).
3. `e` is a keypair in this context; use `re` for their pubkey.
4. Explicitly note `re` and `le` notation.
5. Fix RFC reference.
6. Close `` around HKDF.
7. Use `ss` for the shared secret; `s` is already taken.
8. Use `re` for their pubkey.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-06 13:39:11 +10:30
Christian Decker
e7b029805d reorg: Deduplication and pointing to bolt08
Further separating the two specs by pointing to bolt08 for transport
details and deduplicating some of the information. Also fixed some
markup while I'm at it :-)
2016-11-30 19:40:55 -08:00
Christian Decker
e47c1af720 moveonly: Splitting BOLT 01 into two
So far we had both the transport layer, with its initialization details,
and part of the base protocol, with some generic messages like `init`
and `error` in a single spec. I propose we split the spec into two, one
for the transport layer and one for the communication on top of that
layer. This should make the independence of the two layers even clearer.

This commit is the first step towards that goal and simply moves blocks
of text into the new spec file. It should not change any semantics.
2016-11-30 19:40:55 -08:00