swift-sodium: Missing function to seal a message with a recipient public key and a nonce
Hi! I would like to seal a message with a given public key and a nonce. However, it seems like that I cannot provide my own nonce.
I’m using sodium.box.seal(message: Bytes, recipientPublicKey: Box.PublicKey) right now which doesn’t take a nonce as an argument.
A similar function which does this is implemented in the tweetnacl-js-sealed-box library.
Kind regards Tim
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 15 (10 by maintainers)
It’s good to know that the nonce is not encoded in the first 24 bytes in both cases. That makes a difference in my decryption process.
In the tweet-nacl-js-sealed-box library used for the frontend the nonce is always 24 bytes long.
I don’t think it makes a difference. The nonce is encoded in the first 24 bytes in both casesScratch that, I was confused with
secretstream.