Tom [ARCHIVE] on Nostr: š
Original date posted:2016-03-25 š Original message:On Wednesday 23 Mar 2016 ...
š
Original date posted:2016-03-25
š Original message:On Wednesday 23 Mar 2016 22:55:34 Jonas Schnelli via bitcoin-dev wrote:
> >> I have just PRed a draft version of two BIPs I recently wrote.
> > * why would you not allow encryption on non-pre-approved connections?
>
> The encryption should be optional.
> The proposed authentication scheme does take care of the
> identity-management and therefor prevent MITM attacks.
> Without the identity management, you might not detect sending/receiving
> encrypted data from/to a MITM.
If you want to extend the Bitcoin protocol itself, you will have to resolve
that. Which many other solutions do (ssh for instance).
It would not be Ok to have an peer-to-peer encryption system that doesn't
allow non-pre-approved connections.
> > * What is the reason for using the p2p code to connect a wallet to a node?
> > I suggest using one of the other connection methods to connect to the
> > node.
> > This avoids a change in the bitcoin protocol for a very specific usecase.
>
> Most known use-case: SPV.
You didn't answer the question.
> > * Why do you want to do a per-message encryption (wrapping the original)?
> > Smaller messages that contain predictable content and are able to be
> > matched to the unencrypted versions on the wire send to other nodes will
> > open this scheme up to various old statistical attacks.
>
> It's probably extremely inefficient to create a constant time stream.
Your use of "probably" makes me wonder if you already have an implementation.
Doing any encryption and handshaking design *without* actually having it coded
and gone though testing yet makes no sense.
I do not belief Bitcoin will benefit from "design by committee" where a
specification is drawn before an implementation is written.
Also, you didn't actually address the attack-vector.
> >> Responding peers must ignore (banning would lead to fingerprinting) the
> >
> > requesting peer after 5 unsuccessfully authentication tries to avoid
> > resource attacks.
> >
> > Any implementation of that kind would itself again be open to resource
> > attacks.
> > Why 5? Do you want to allow a node to make a typo?
>
> Good point. Maybe one false try should lead to ignoring the peer.
That doesn't take away the resource attack at all.
> >> To ensure that no message was dropped or blocked, the complete
> >> communication>
> > must be hashed (sha256). Both peers keep the SHA256 context of the
> > encryption session. The complete <code>enc</code> message (leaving out
> > the hash itself) must be added to the hash-context by both parties.
> > Before sending a <code>enc</code> command, the sha256 context will be
> > copied and finalized.
> >
> > You write "the complete communication must be hashed" and every message
> > has a hash of the state until it is at that point.
> > I think you need to explain how that works specifically.
>
> This is a relative simple concept and does not require rehashing the
> whole communication.
Apologies, I should have been more clear; the BIP should specify the actual
algorithm, otherwise you can't create an implementation from just reading the
BIP.
Also, this may be a good time to ask why you want to have a per-message
encryption?
Practically every single popular end-to-end encryption uses one approach or
another were it just encrypts as another layer. (the L in ssl). You are
mixing layers, and unless you do that for a very good reason, or have a very
good reason why everyone else is doing it wrong, I suggest using a layered
encryption approach.
Published at
2023-06-07 17:49:57Event JSON
{
"id": "3c682b75c1736a28c9b33ff1edc267607bcc4fdaf2fd603eba799e5393d75c80",
"pubkey": "bc4b5c3c366f36f93aa3e261f5c7832ecb85137537baf5e8f00a4321e85f0477",
"created_at": 1686160197,
"kind": 1,
"tags": [
[
"e",
"1c87d471b2f2da141b64e0a9c480b3ca53986e57331a196cd0234d6c8fb75484",
"",
"root"
],
[
"e",
"c8ce95b99e86baf5702ae167804cfd8fdbf8ded8d533feb304bd673db4854774",
"",
"reply"
],
[
"p",
"9a463e0fab8963b013698c15a0f2449d19c97f3b88458e5874095b5006df9a0c"
]
],
"content": "š
Original date posted:2016-03-25\nš Original message:On Wednesday 23 Mar 2016 22:55:34 Jonas Schnelli via bitcoin-dev wrote:\n\u003e \u003e\u003e I have just PRed a draft version of two BIPs I recently wrote.\n\u003e \u003e * why would you not allow encryption on non-pre-approved connections?\n\u003e \n\u003e The encryption should be optional.\n\u003e The proposed authentication scheme does take care of the\n\u003e identity-management and therefor prevent MITM attacks.\n\u003e Without the identity management, you might not detect sending/receiving\n\u003e encrypted data from/to a MITM.\n\nIf you want to extend the Bitcoin protocol itself, you will have to resolve \nthat. Which many other solutions do (ssh for instance).\n\nIt would not be Ok to have an peer-to-peer encryption system that doesn't \nallow non-pre-approved connections.\n\n\u003e \u003e * What is the reason for using the p2p code to connect a wallet to a node?\n\u003e \u003e I suggest using one of the other connection methods to connect to the\n\u003e \u003e node.\n\u003e \u003e This avoids a change in the bitcoin protocol for a very specific usecase.\n\u003e \n\u003e Most known use-case: SPV.\n\nYou didn't answer the question.\n\n\u003e \u003e * Why do you want to do a per-message encryption (wrapping the original)?\n\u003e \u003e Smaller messages that contain predictable content and are able to be\n\u003e \u003e matched to the unencrypted versions on the wire send to other nodes will\n\u003e \u003e open this scheme up to various old statistical attacks.\n\u003e \n\u003e It's probably extremely inefficient to create a constant time stream.\n\nYour use of \"probably\" makes me wonder if you already have an implementation. \nDoing any encryption and handshaking design *without* actually having it coded \nand gone though testing yet makes no sense.\nI do not belief Bitcoin will benefit from \"design by committee\" where a \nspecification is drawn before an implementation is written.\n\nAlso, you didn't actually address the attack-vector.\n\n \n\u003e \u003e\u003e Responding peers must ignore (banning would lead to fingerprinting) the\n\u003e \u003e \n\u003e \u003e requesting peer after 5 unsuccessfully authentication tries to avoid\n\u003e \u003e resource attacks.\n\u003e \u003e \n\u003e \u003e Any implementation of that kind would itself again be open to resource\n\u003e \u003e attacks.\n\u003e \u003e Why 5? Do you want to allow a node to make a typo?\n\u003e \n\u003e Good point. Maybe one false try should lead to ignoring the peer.\n\nThat doesn't take away the resource attack at all.\n\n \n\u003e \u003e\u003e To ensure that no message was dropped or blocked, the complete\n\u003e \u003e\u003e communication\u003e \n\u003e \u003e must be hashed (sha256). Both peers keep the SHA256 context of the\n\u003e \u003e encryption session. The complete \u003ccode\u003eenc\u003c/code\u003e message (leaving out\n\u003e \u003e the hash itself) must be added to the hash-context by both parties.\n\u003e \u003e Before sending a \u003ccode\u003eenc\u003c/code\u003e command, the sha256 context will be\n\u003e \u003e copied and finalized.\n\u003e \u003e \n\u003e \u003e You write \"the complete communication must be hashed\" and every message\n\u003e \u003e has a hash of the state until it is at that point.\n\u003e \u003e I think you need to explain how that works specifically.\n\u003e \n\u003e This is a relative simple concept and does not require rehashing the\n\u003e whole communication. \n\nApologies, I should have been more clear; the BIP should specify the actual \nalgorithm, otherwise you can't create an implementation from just reading the \nBIP.\n\nAlso, this may be a good time to ask why you want to have a per-message \nencryption?\nPractically every single popular end-to-end encryption uses one approach or \nanother were it just encrypts as another layer. (the L in ssl). You are \nmixing layers, and unless you do that for a very good reason, or have a very \ngood reason why everyone else is doing it wrong, I suggest using a layered \nencryption approach.",
"sig": "54abde23e52fed821a81ba425bee19f02c6b586e2a3f5a85bfac48a1684811da52f9d29942424abd173ff668d228eef9dd0df383df8bb0e6244c224fe45eb885"
}