Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use authenticated encryption algorithms #41

Open
AArnott opened this issue Oct 19, 2020 · 1 comment
Open

Use authenticated encryption algorithms #41

AArnott opened this issue Oct 19, 2020 · 1 comment

Comments

@AArnott
Copy link
Owner

AArnott commented Oct 19, 2020

Particularly in the streaming case, where decryption happens and may result in content being played back to the user, authentication of the message (i.e. confirming the hash matches) only happens at the end. So tampering is detected, but only after the content is played.
To fix this, streaming messages (and perhaps all messages) should use an authenticating encryption cipher so that any tampering is immediately detected during streaming decryption.
This may be in addition to the hash check at the end as well so that the rest of the ironpigeon protocol remains unchanged.

@AArnott
Copy link
Owner Author

AArnott commented Oct 31, 2020

Switching from AesCbcPkcs7 to AesCcm breaks tests because PclCrypto hasn't implemented CCM block mode, it seems.
I wonder if CCM has padding or if we'd have to solve that another way as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant