[PATCH v3] daemon: encrypted communication (version 3)

Oct 27 - Oct 27, 2015

  • In a discussion about the encryption of packets in a protocol, Mats Jerratsch suggests that the 'totlen' field may not be necessary as replay protection is already provided by AES-CTR.

The idea behind 'totlen' was to provide replay protection by keeping track of the total data transmitted and comparing it with the value sent from the other party. However, as AES-CTR has a dedicated counter in the IV that keeps track of all messages in each direction, replayed messages are unable to be decrypted because the IV is incorrect. While it's true that 'totlen' is not required for replay protection, the protocol still requires some level of replay for robustness when nodes crash. Currently, there's a FIXME in the code for this case. Although combining the counter and length may be overkill, Rusty thought it was a cute idea.

Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback