Skip to content

fix: Regression: Use Modulus and Exponent for RSA Hash Codes - #708

Open
bb-froggy wants to merge 1 commit into
bcgit:masterfrom
bb-froggy:fix-PublicKey-GetHashCode
Open

fix: Regression: Use Modulus and Exponent for RSA Hash Codes#708
bb-froggy wants to merge 1 commit into
bcgit:masterfrom
bb-froggy:fix-PublicKey-GetHashCode

Conversation

@bb-froggy

Copy link
Copy Markdown

Before BC 2.7.0, GetHashCode of RsaKeyParameters XORed the modulus and the exponent of the key as well as whether it was private.

With 8ee5212, this changed to XORing the modulus with itself (always resulting in 0) and so the value of GetHashCode() just depends on whether the key is private, but not on the actual parameters.

Describe your changes

This fix reverts to the previous behavior, where GetHashCode XORs modulus, exponent, and whether the key is private.

How has this been tested?

I haven't actually tested it.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have kept the patch limited to only change the parts related to the patch
  • This change requires a documentation update

See also Contributing Guidelines.

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.

1 participant