Skip to content

MAX_PUB_EXPONENT is somewhat small #155

Closed

Description

@quininer

The current MAX_PUB_EXPONENT limit for the rsa crate is 1 << (31 - 1), which makes it fail some tests with large e values. For example the limit in ring is (1u64 << 33) - 1.

I'm not sure why the rsa crate chose this value, but there seems to be no risk in aligning with the ring.

https://github.com/RustCrypto/RSA/blob/master/src/key.rs#L20
https://github.com/briansmith/ring/blob/main/src/rsa/public_exponent.rs#L18

Activity

  1. added a commit that references this issue on Jul 30, 2022
    a55fa4e
  2. added a commit that references this issue on Jan 27, 2026
    3706609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions