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

All-zero IVs #7

Open
Tamschi opened this issue Dec 2, 2022 · 7 comments
Open

All-zero IVs #7

Tamschi opened this issue Dec 2, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@Tamschi
Copy link

Tamschi commented Dec 2, 2022

You currently use a static initialisation vector (of all-0). This is insecure.

I don't mean to be too pushy about this, but it may be prudent to replace the OpenSSL dependency with RustCrypto's AEADs where possible, which are considerably more difficult to misuse, and which will also automatically alert on decryption failure due to a wrong encryption key.

(I don't know the specifics of the original zip program this one is modelled after. Apologies if the zero-IV is needed for compatibility, though explaining that in the source file may be helpful in that case.)

@SteveGremory SteveGremory added the bug Something isn't working label Dec 2, 2022
@SteveGremory
Copy link
Owner

Thanks for the feedback! I will switch back to rust crypto as soon as I have some time :)

@ThaddeusTreloar
Copy link
Contributor

Sorry, I meant to notate the IVs as a to-do because the structure of structs and traits were not entirely finalised yet.

@ThaddeusTreloar
Copy link
Contributor

@SteveGremory once there is support for meta data in the file format I am happy to swap the library over to RustCrypto, just let me know.

@SteveGremory
Copy link
Owner

Well that time passed.

@ThaddeusTreloar
Copy link
Contributor

I actually did end up swapping it over to Rust crypto. I'll shoot a pull request through soon.

@SteveGremory
Copy link
Owner

Oh wow, thank you!

@ThaddeusTreloar
Copy link
Contributor

Ended up just prepending IVs to each encryption block. Will need some documentation though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants