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

ssh-agent: keygen: Fix negative numbers in RSA key #10349

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

kgraefe
Copy link
Contributor

@kgraefe kgraefe commented Mar 4, 2024

The private exponent d may be negative in which case an additional pad byte is needed. Otherwise ssh-agent fails to load the key.

Fixes #10320

Screenshots

Testing strategy

for i in $(seq 1 10000); do ./build/tests/testsshagent testKeyGenRSA; done | tee test.log
❯ grep FAIL test.log

(no output on grep, hence no test failing)

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

The private exponent d may be negative in which case an additional pad
byte is needed. Otherwise ssh-agent fails to load the key.

Signed-off-by: Konrad Gräfe <kgraefe@paktolos.net>
@droidmonkey droidmonkey merged commit d2a4ccb into keepassxreboot:develop Mar 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestSSHAgent::testKeyGenRSA() fails occasionally: bignum is negative
2 participants