As your credit card is scanned, say thanks to prime numbers for keeping the checkout queues short and your money safe. Well, most of the time anyway.

Much of the cryptography that goes into beating credit-card fraud comes down to 3,5, 7 ... 197, integers that can only be divided into themselves and 1. Banks randomly generate two very large primes — say, 150 digits long — and use their product to encrypt the payment authorization from the microchip of your card to the point-of-sale terminal.

Even supercomputers can’t easily decipher the original numbers because the time required to run any of the known algorithms increases exponentially with their length. A 250-digit number that was part of a 1991 factorization challenge was finally broken down into a product of two primes in 2020. On a single advanced computer running nonstop, the calculations would take 2700 years.