Bitcoin Stack Alternate is a query and reply web site for Bitcoin crypto-currency lovers. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The perfect solutions are voted up and rise to the highest
Requested
Considered
21 instances
I lately noticed the BIP 324 proposal. It exhibits us there might be some privateness enhancement through the use of ECDH secrets and techniques and encryption algorithms corresponding to ChaCha20 and AEAD-ChaCha20-Poly1305. The proposal contains:
- The size decriptor dimension is diminished to three Bytes.
- The command may very well be expressed as an ID (1 Byte) OR as characters (13 Bytes, by together with the 0x00 byte selector).
- Nonetheless, I do not absolutely perceive the order in information shall be structured. Can it’s defined ?
- What algorithm shall be utilized to which information construction ? As a result of I can suppose the ChaCha20 is used as a way to encrypt the payload dimension and AEAD-ChaCha20-Poly1305 to encrypt payload.
2
Within the new P2P transport protocol proposed in BIP324, after the handshake (which amongst different issues establishes encryption keys), packets have the next construction:
- A 3-byte size descriptor (encrypted with FSChaCha20)
- An arbitrary-length ciphertext which is the encryption of a plaintext (encrypted with FSChaCha20Poly1305, which expands the info by 16 bytes within the course of by including a Poly1305 authentication tag); the plaintext consists of:
- A 1-byte header (which is used for signalling decoy information)
- A variable-length contents (whose size is described by the size descriptor). The contents consists of:
- A 1-byte or 13-byte message kind (e.g. model, verack, tx, inv, …).
- A variable-length payload (the precise information despatched within the message).
So in order for you the whole lot flattened out, you get:
- 3-byte encrypted size descriptor
- 1-byte encrypted header
- 1-byte or 13-byte encrypted message kind
- variable size encrypted payload
- 16-byte Poly1305 authentication tag
Nonetheless, solely 2 separate encryption algorithm invocations are used per packet: