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

Oct 27 - Oct 27, 2015

  • The code in question involves encrypted packets that are protected by an HMAC and include a serialized protobuf message.

The totlen field is meant to track the total data transmitted, but it appears to actually track the size of the unencrypted message. Additionally, totlen includes its own length, which seems unnecessary since it doesn't define the encrypted message boundaries. The field was originally intended for replay protection, but as AES-CTR already provides this, totlen is not needed. This is because there is a dedicated counter in the IV that keeps track of all messages in each direction and prevents decryption if an attacker tries to replay the same message.

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