p2p authentication and encryption BIPs



Summary:

Per message encryption does not result in significant loss as the hashes are fixed size, resulting in minimal information leakage. It is possible to create a second data stream by encrypting messages, which can weaken the link between message size and wrapped message size, but this requires state and adds complexity. An IV is unnecessary since a 32-byte context hash is included, with the first 16 bytes usable as an IV. To generate the context hash, it would be simpler to make it linear using SHA256. As the session continues, both nodes would need to perform more hashing to compute the entire conversation's hash.


Updated on: 2023-06-11T04:33:33.682747+00:00