Joseph Poon [ARCHIVE] on Nostr: 📅 Original date posted:2016-08-11 📝 Original message: On Thu, Aug 11, 2016 at ...
📅 Original date posted:2016-08-11
📝 Original message:
On Thu, Aug 11, 2016 at 11:25:36AM +0930, Rusty Russell wrote:
> Tadge Dryja <tadge at lightning.network> writes:
> > The method of using a revocation key is compatible with shachain/elkrem so
> > has log(n) storage; I'll describe what I developed which omits hashing in
> > the commit script and uses only signature verification. If Laolu has made
> > a different key revocation scheme I'm not aware, but please do post if so.
>
> Oh, I blamed Laolu because he told me about it; sorry for misattribution.
I came up with it a long time ago, and worked out the
details/optimizations /w Laolu more recently (I think he told you that
night when everything was finalized). I mentioned the general
construction to you a LONG time ago too when you were in the Bay Area,
but I probably didn't explain it properly (I was comparing with
Vanitygen, if that helps). I think Tadge was the first to implement it
though, not sure.
> The property I was *hoping* for was the ability for Alice (and Bob) to
> independently predict each others' future revocation hashes/pubkeys.
> That would neatly allow an arbitrary number of commitment transactions
> in flight each way at once. Naively, seems like that should be
> possible.
I'm not inclined to think an increase in complexity is helpful (if this
is necessary), but there are probably some things you can do if you're
looking down these paths.
It's possible to get the same *bandwidth* optimization you want, except
opposite. The idea with "predicting the future revocation
hashes/pubkeys" is you only need to send revocations. Instead, it's
possible to only send revocation hashes/pubkeys and not send
revocations. In other words, instead of predicting each others' future
revocation hashes/pubkeys, it's possible to revoke as *part of* giving
the next revocation hash/pubkey.
You can arrange something similar to a hashchain (shachain/elkrem is an
optimization of this, ignore optimizations for a second). We treat
privkey->pubkey as an elaborate hash function. I think if you
pre-compute it so that privkey -> pubkey, and then take the pubkey
output to create a privkey, you have a reversed list of items (let's say
you do this 100,000 times). The final privkey -> pubkey computation is
the first "revocation keypair" used. The pubkey->privkey step can do
anything you want, including hash functions if it makes you feel better
(this is the point where one can optimize).
(Note: I really mean EC point here, but it's simpler to understand it as
a pubkey)
If you want multiple in-flight, just have multiple parallel chains
(minor increase in permanent storage of counterparty's revocations). I
don't see any need for more than a handful in-flight. Note that this
explicitly breaks doing multiple in-flight on a single chain, since
disclosure of a pubkey is disclosure of all prior revocation states.
Essentially, what happens is when you disclose a pubkey, you are
providing the next pubkey AND revoking the prior one at the same time.
This construction is also possible using hashtree like structures if
you're using revocation hashes instead of revocation pubkeys.
For the pubkey revocation, a nested chain of privkey->pubkeys are needed
instead of hashes since you can't have a usable pubkey point without
also getting the corresponding private key.
Not sure how useful this is, though. Seems a lot of complexity for some
small bandwidth savings, not really that interested in doing all that,
but it's the closest I can get to what you want. This is off the top of
my head/memory, I didn't write any notes on this, so parts of this (or
entirety) might be wrong...
--
Joseph Poon
Published at
2023-06-09 12:46:36Event JSON
{
"id": "4ca59cd3cc3894a4fc508181f53982bc0314c7461e383bacb7aa0a025a420e03",
"pubkey": "ccb4cc87c455b74febaee5929cfd0726421b2eea64ad2b16440b68e8c7433211",
"created_at": 1686314796,
"kind": 1,
"tags": [
[
"e",
"ccc2d459792b926854b04bc74e6ea324d2314fff88991806647cc195016ae9ae",
"",
"root"
],
[
"e",
"32e87b88be72e1aa5eef0c9c2c49ca62c004ba52c44b8029501ae409051d63b6",
"",
"reply"
],
[
"p",
"650f4d21ea171bfb75c6bd78ba5b1aeace2a658bf7bee367bde3736055bf4e2d"
]
],
"content": "📅 Original date posted:2016-08-11\n📝 Original message:\nOn Thu, Aug 11, 2016 at 11:25:36AM +0930, Rusty Russell wrote:\n\u003e Tadge Dryja \u003ctadge at lightning.network\u003e writes:\n\u003e \u003e The method of using a revocation key is compatible with shachain/elkrem so\n\u003e \u003e has log(n) storage; I'll describe what I developed which omits hashing in\n\u003e \u003e the commit script and uses only signature verification. If Laolu has made\n\u003e \u003e a different key revocation scheme I'm not aware, but please do post if so.\n\u003e \n\u003e Oh, I blamed Laolu because he told me about it; sorry for misattribution.\n\nI came up with it a long time ago, and worked out the\ndetails/optimizations /w Laolu more recently (I think he told you that\nnight when everything was finalized). I mentioned the general\nconstruction to you a LONG time ago too when you were in the Bay Area,\nbut I probably didn't explain it properly (I was comparing with\nVanitygen, if that helps). I think Tadge was the first to implement it\nthough, not sure.\n\n\u003e The property I was *hoping* for was the ability for Alice (and Bob) to\n\u003e independently predict each others' future revocation hashes/pubkeys.\n\u003e That would neatly allow an arbitrary number of commitment transactions\n\u003e in flight each way at once. Naively, seems like that should be\n\u003e possible.\n\nI'm not inclined to think an increase in complexity is helpful (if this\nis necessary), but there are probably some things you can do if you're\nlooking down these paths.\n\nIt's possible to get the same *bandwidth* optimization you want, except\nopposite. The idea with \"predicting the future revocation\nhashes/pubkeys\" is you only need to send revocations. Instead, it's\npossible to only send revocation hashes/pubkeys and not send\nrevocations. In other words, instead of predicting each others' future\nrevocation hashes/pubkeys, it's possible to revoke as *part of* giving\nthe next revocation hash/pubkey.\n\nYou can arrange something similar to a hashchain (shachain/elkrem is an\noptimization of this, ignore optimizations for a second). We treat\nprivkey-\u003epubkey as an elaborate hash function. I think if you\npre-compute it so that privkey -\u003e pubkey, and then take the pubkey\noutput to create a privkey, you have a reversed list of items (let's say\nyou do this 100,000 times). The final privkey -\u003e pubkey computation is\nthe first \"revocation keypair\" used. The pubkey-\u003eprivkey step can do\nanything you want, including hash functions if it makes you feel better\n(this is the point where one can optimize).\n\n(Note: I really mean EC point here, but it's simpler to understand it as\na pubkey)\n\nIf you want multiple in-flight, just have multiple parallel chains\n(minor increase in permanent storage of counterparty's revocations). I\ndon't see any need for more than a handful in-flight. Note that this\nexplicitly breaks doing multiple in-flight on a single chain, since\ndisclosure of a pubkey is disclosure of all prior revocation states.\n\nEssentially, what happens is when you disclose a pubkey, you are\nproviding the next pubkey AND revoking the prior one at the same time.\nThis construction is also possible using hashtree like structures if\nyou're using revocation hashes instead of revocation pubkeys.\n\nFor the pubkey revocation, a nested chain of privkey-\u003epubkeys are needed\ninstead of hashes since you can't have a usable pubkey point without\nalso getting the corresponding private key.\n\nNot sure how useful this is, though. Seems a lot of complexity for some\nsmall bandwidth savings, not really that interested in doing all that,\nbut it's the closest I can get to what you want. This is off the top of\nmy head/memory, I didn't write any notes on this, so parts of this (or\nentirety) might be wrong...\n\n-- \nJoseph Poon",
"sig": "b42d09ec3f0662a71efb58d74c65015a8b9db430572a0d472137672eaff93d42a5ca34b64914d53cbf82b9e298301513170c8bae3ed79577a506320087084e85"
}