1

Poly1305 encrypted UDP-Stream from a web server with a 8 Byte Nonce. Is there a way to decrypt this in dart? I tried these packages:

sodium_libs (accepted only XChaCha20-Poly1305-IETF / 24 Byte Nonce)

pointycastle (accepted only ChaCha20-Poly1305-IETF / 12 Byte Nonce)

Is there any way to decrypt the classic ChaCha20-Poly1305 with a 8 Byte Nonce? It was possible with the old flutter_sodium package, but this is deprecated

Takrem
  • 41
  • 6
  • Have you tried padding it with 4 bytes zeros at the start/end to see if that works? – Richard Heap Jun 10 '23 at 18:45
  • There's a PR on that old package that upgrades it to ffi 2. Why don't you download that and step through to see how it allows an 8 byte nonce and then apply the same logic to the other packages. (Or simply use the branch from the PR.) – Richard Heap Jun 10 '23 at 18:52

0 Answers0