Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

password decryption doesn't fail 0.4% of the time while given the wrong password (depends on salt) #23197

Closed
lacostej opened this issue Jan 4, 2024 · 0 comments
Labels
triaged: question The issue contains a question

Comments

@lacostej
Copy link

lacostej commented Jan 4, 2024

In the @fastlane/fastlane (ruby) project, we use openssl password based encryption to encrypt the files we fetch from the Apple Developer portal. Under the hood, the ruby code generates an IV and Key using EVP_BytesToKey and generates a random salt.

If the wrong password is used, the code is supposed to fail with the bad decrypt error.

We found out that in about 0.4% of the time, the decryption doesn't detect that the wrong password was entered. This depends on the salt that was generated.

We have a simple ruby code demonstrating the issue.

We've converted it to C and it appears to fail in the same way. I haven't written C in 20 years so I hope I got this right :)

Is there an issue in openssl?

The ruby code was tested on various systems, from Mac to Linux.

The C code was tested on my Mac M1 Pro against openssl 3.2.0

@lacostej lacostej added the issue: bug report The issue was opened to report a bug label Jan 4, 2024
@mattcaswell mattcaswell added triaged: question The issue contains a question and removed issue: bug report The issue was opened to report a bug labels Jan 4, 2024
@openssl openssl locked and limited conversation to collaborators Jan 4, 2024
@mattcaswell mattcaswell converted this issue into discussion #23198 Jan 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
triaged: question The issue contains a question
Projects
None yet
Development

No branches or pull requests

2 participants