Prefer to use OpeningKey/SealingKey and NonceSequence when practical.
Thanks for the review! I am not a cryptography expert. This is what I understand the situation and hence my decisions so far:
My first thought is also to use OpeningKey/SealingKey, but these two key structures are now bound to a nonce sequence and have to encrypt/decrypt using the same nonce sequence. So it is not exactly the current behaviour we are using: which is to use a random nonce and append the nonce after the ciphertext.
But as the docs mention it is preferred to use OpeningKey/SealingKey instead, to make this possible we will have to implement a nonce sequence and advancement algorithm (There should be some good advancement strategy out there? I need to do some research) and we should manage the same nonce sequence between each encrypt-er and decrypt-er pairs?
Given the complexity I think it is better to move this into separate task and keep this PR as simple as keeping the current behaviour. I am also willing to continue this follow-up task and we can discuss more on the requirements.
As brought up in a comment on the PR upgrading our version of ring: https://github.com/interledger-rs/interledger-rs/pull/413/files#r334223325