rescrv/libmacaroons — pull request #19 by nitram509 (2014-10-21 21:32:08+00:00)
Title: FIX enc_ciphertext has to be the same length as enc_plaintext

Hi,

while porting last changes from libmacaroons to jmacaroons (Java port),
I've discovered, that the buffers enc_ciphertext and enc_plaintext differs in size.
IMHO, the crypto_secretbox_xsalsa20poly1305 is a symmetric cipher,
which needs to have same sizes for ciphertext and plaintext buffers.
Else, this may result in a buffer overflow.

I'm not a crypto expert, so can anyone confirm this?

Regards
Martin