Skip to content

Conversation

pinkforest
Copy link

@pinkforest pinkforest commented Aug 22, 2025

RSAPrivateKey::new_unchecked added (gated under hazmat)

All unit RSAPrivateKeys are now 1024/2048 bits and I re-ran the snapshots based on that.

I don't think it makes sense to test with smol keysize and it doesn't take that much longer regardless.

If we insist on using the existing test data i can re-do with unchecked but 🤷‍♀️

proptests (gated now to hazmat using RSAPrivateKey::new_unchecked() are using 512 bits given with 2048 bits CI increases from 4 mins to 15 mins instead of staying the ~same time.

tarcieri and others added 4 commits June 19, 2025 20:40
Changes the existing checked APIs to respect a minimum modulus size in
addition to a maximum one.

Note: several tests fail because of this, so we'll need to go through
them and convert to an unchecked API where appropriate (or decide if the
test is bogus to begin with)
@tarcieri
Copy link
Member

I can rebase my branch... this is a lot

@tarcieri tarcieri force-pushed the modulus-size-checks branch from b83ae75 to f016f0b Compare August 22, 2025 22:44
@tarcieri
Copy link
Member

Rebased

@pinkforest
Copy link
Author

pinkforest commented Aug 22, 2025

Re-merged in

Testing takes ~14 mins in github CI with 1024/2048 bits keysizes instead of 4 mins 64 bits

It's mainly that one integration test one but units don't take that long.

@pinkforest pinkforest changed the title Make Tony's tests green again Add hazmat RSAPrivateKey::new_unchecked and Make Tony's tests green again Aug 23, 2025
@pinkforest
Copy link
Author

pinkforest commented Aug 23, 2025

Tests complete with 512bit proptests in 5 mins now so pretty much the ~same :)

Units are all 1024/2048 with no real difference in speed overall

However proptests are gated under hazmat feature given these are now using RSAPrivateKey::new_unchecked

Comment on lines +54 to +59
# does not understand concat! macro
# typos:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: crate-ci/[email protected]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has a rules language for writing exceptions. I guess this is fine for a PR-to-a-PR, but it would be nice to figure out a solution to actually get this merged.

Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting it green. We can hash out the details on the other PR.

@tarcieri tarcieri merged commit 5917602 into RustCrypto:modulus-size-checks Aug 23, 2025
11 checks passed
tarcieri added a commit that referenced this pull request Aug 27, 2025
… again (#561)

`RSAPrivateKey::new_unchecked` added (gated under hazmat)

All unit RSAPrivateKeys are now 1024/2048 bits and I re-ran the
snapshots based on that.

I don't think it makes sense to test with smol keysize and it doesn't
take that much longer regardless.

If we insist on using the existing test data i can re-do with unchecked
but 🤷‍♀️

proptests (gated now to hazmat using `RSAPrivateKey::new_unchecked()`
are using 512 bits given with 2048 bits CI increases from 4 mins to 15
mins instead of staying the ~same time.

---------

Co-authored-by: Tony Arcieri <[email protected]>
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.

2 participants