• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

letsencrypt / boulder / 12425 / 7
66%
master: 66%

Build:
DEFAULT BRANCH: master
Ran 24 Jun 2020 10:35PM UTC
Files 111
Run time 18s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jun 2020 08:05PM UTC coverage: 66.043%. Remained the same
RUN="coverage" CONTAINER="netaccess"

cron

travis-pro

web-flow
Use GCD to check RSA moduli for small primes (#4883)

The existing checkSmallPrimes function maintains a table of primes,
converts them to an array of *big.Int and uses the resulting values
for comparing against a RSA modulus as follows:

    for _, prime := range smallPrimes {
        if modulus % prime != 0 {
            return invalid
        }
    }
    return valid

This incurs substantial overhead as each prime is checked individually,
invoking QuoRem(...) each time. By multiplying the primes together into
a single *big.Int, we can utilize a single library call, GCD(...), and
check all the values at once. While a single GCD invocation is slower
than a single QuoRem, 133 such invocations of QuoRem are together
slower than the single GCD.

BenchmarkSmallPrimeGCD
BenchmarkSmallPrimeGCD-4                       72759             16240 ns/op
BenchmarkSmallPrimeIndividualMods
BenchmarkSmallPrimeIndividualMods-4             8866            165265 ns/op

This gives us room to later increase the number of smallPrimes, if
desired, while keeping the same timing profile. Currently the product
of the 133 primes in smallPrimes fits within 1040 bits.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

12990 of 19669 relevant lines covered (66.04%)

0.74 hits per line

Source Files on job 12425.7 (RUN="coverage" CONTAINER="netaccess")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10996
  • Travis Job 12425.7
  • a505ff80 on github
  • Prev Job for RUN="coverage" CONTAINER="netaccess" on master (#12423.7)
  • Next Job for RUN="coverage" CONTAINER="netaccess" on master (#12429.7)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc