pecl-libsodium-doc icon indicating copy to clipboard operation
pecl-libsodium-doc copied to clipboard

Cookie Recipe Ingredients

Open elipoultorak opened this issue 8 years ago • 2 comments

I'm trying to understand how AEAD works. In the cookie recipe, why don't you use crypto_secretbox? From what I understand, it does the job:

We want to store data in a cookie such that user cannot read nor alter its contents.

Thanks

elipoultorak avatar Jul 03 '16 10:07 elipoultorak

why don't you use crypto_secretbox?

No reason. You totally could.

paragonie-scott avatar Jul 03 '16 17:07 paragonie-scott

All right, I started thinking that crypto_secretbox only provided encryption, not authentication. Obviously, I was wrong. Thanks for clarifying.

elipoultorak avatar Jul 03 '16 17:07 elipoultorak