snow
snow copied to clipboard
Expose encrypt and decrypt with associated data
- Add write_message_with_ad, write_message_with_nonce_ad, read_message_with_ad, and read_message_with_nonce_ad to Session.
Thanks so much for the PR and sorry for the delay in responding! Will check this out shortly.
@kcchu I finally pushed some larger-scale changes to the repo that change the way this feature needs to be implemented. If you don't have the cycles to rebase these on top of the new master that doesn't have a Session type any more, I'm happy to finish this up for you. Otherwise, I'd love to merge this after it's rebased.
If I understand the Noise Protocol Processing Rules correctly, this feature would be non-standard.
Transport messages are then encrypted and decrypted by calling EncryptWithAd() and DecryptWithAd() on the relevant CipherState with zero-length associated data.