Simple replay attack protection #56
Replies: 5 comments 2 replies
-
I like solution 2, just not sure about the versioning part, we could keep that logic separated so that tx's are still valid in the same network, across versions. |
Beta Was this translation helpful? Give feedback.
-
From a L1 node standpoint, doing it implicitly in the signature is better, because we save precious bytes in the ledger database and we have all the required values while verifying the signatures anyway. Same applies to #51 The (imho small) downside is that parties implementing the signing step need to add a little bit more logic. |
Beta Was this translation helpful? Give feedback.
-
I prefer option 2. as to not put more data into the transaction essence, otherwise it will just be duplicated data. Ultimately I believe versioning for breaking changes re our data models will have to be handled by some combination of checking the milestone index and the new updated data types (increment the type prefixes accordingly and de/serializers). So I would even prefer to reduce the Re |
Beta Was this translation helpful? Give feedback.
-
Depending on what we decide here, we should also probably rename the |
Beta Was this translation helpful? Give feedback.
-
Doesn't make more sense if the |
Beta Was this translation helpful? Give feedback.
-
In the current IOTA protocol, the same transaction works on Mainnet, Testnet, private Tangles or potential forks. This can be prevented in a clean way, by adding some form of network identifier to the signed part of a transaction. There are two general alternatives:
Network ID
to the Transaction Essence (e.g. as proposed in b7d0077). As the entire essence is signed, this will have the desired effect.Network ID
configuration parameter. Then, eachUnlock Block
must hold the signature signing H(Network ID
||Serialize Essence
), where H corresponds to BLAKE2b-256.Option 1 is arguably the cleaner solution as it does not use hidden configuration parameters to the signing. However, the explicit
Network ID
is technically redundant information and validation must assure that they are all the same.Option 1 is arguably the cleaner solution as it does not use hidden configuration parameters to the signing. However, the explicit Network ID is technically redundant information and validation must assure that they are all the same.
Another point to consider is the type of the
Network ID
field (in any option):uint64
parameter for a very similar effect. I was chosen to be auint64
as it is supposed to store the hash of the descriptive Network Name (including the network version). Here, auint64
effectively prevents random collisions of different names. (Having auint32
and a few thousand different network names already has a significant probability of collision.)Network ID
of the Essence also contain hashes, or just an incremental counter uint8, where operators need to agree to prevent clashes?Network ID
is added to the Essence, can we remove it from the Message?Network ID
of the Message is supposed to contain the version in order to prevent the dissemination of incompatible messages, however for theNetwork ID
of the Essence to contain the version would be counterproductive as we'd lose support for backward compatible versions.What combination do you prefer?
Beta Was this translation helpful? Give feedback.
All reactions