Skip to content

Migrate to crypto_primes for primality test instead of glass_pumpkin for num-bigint backend - #46

Merged
survived merged 7 commits into
zero-encodingfrom
replace-glass-pumpkin
Oct 16, 2026
Merged

survived merged 7 commits into
zero-encodingfrom
replace-glass-pumpkin

Conversation

@survived

@survived survived commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

glass_pumpkin that we depend on has buggy primality test that identifies certain composite numbers as primes.

The latest version of the library does not have this bug, but it uses version of rand_core incompatible with our library.

Turned out that the latest version of glass_pumpkin already uses crypto_primes, so we migrated directly to it.

I've taken the only primarity test that we are using in our library from `glass_pumpkin v2.0.0`. I
modified the code to work with version of `rand_core` that we depend on.

Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
@survived
survived added this pull request to stack #47 October 15, 2026 12:50
Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
@survived
survived requested a review from maurges October 15, 2026 12:52
Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
@socket-security

socket-security Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcrypto-bigint@​0.7.510010093100100
Addedcrypto-primes@​0.7.210010093100100

View full report

Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
Comment thread src/backend/num_bigint.rs Outdated
Comment thread src/backend/num_bigint.rs Outdated
Comment thread src/backend/num_bigint.rs
Signed-off-by: Denis Varlakov <cordial.egg6523@fastmail.com>
@survived survived changed the title Inline glass_pumpkin dependency Migrate to crypto_primes for primality test instead of glass_pumpkin for num-bigint backend Oct 15, 2026
@survived
survived merged commit 3eaf298 into m Oct 16, 2026
17 checks passed
@survived
survived deleted the replace-glass-pumpkin branch October 16, 2026 07:15
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