renproject / aw

A flexible P2P networking library for upgradable distributed systems.
MIT License
38 stars 18 forks source link

GCM nonce fix #51

Closed rahulghangas closed 3 years ago

rahulghangas commented 3 years ago

Removes the requirement of communicating nonce with the message, saving bandwidth and time. Follow up to PR #50

gcm encoder and decoder nonces are decided based on comparison between the signatory hashes of each peer. The peer with the smaller hash counts down its encoder nonce (from max value) and count up its decoder nonce (from 0). The peer with the larger hash does vice-versa