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

Allow crypto IVs with leading zero #2928

Closed
wants to merge 1 commit into from

Conversation

nnposter
Copy link

@nnposter nnposter commented Sep 4, 2024

The NSE wrapper for OpenSSL is currently testing for null IV by inspecting the first byte, as if the IV was a null-terminated string, as opposed to an arbitrary byte sequence:

nmap/nse_openssl.cc

Lines 393 to 394 in fbadb52

if (iv[0] == '\0')
iv = NULL;

The impact of this misinterpretation is that both openssl.encrypt() and openssl.decrypt() are sporadically producing incorrect results.

The PR will be committed after September 13, 2024, unless concerns are raised.

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

Successfully merging this pull request may close these issues.

OpenSSL Lua library not working as expected with aes-128-cfb
1 participant