logoalt Hacker News

hatthew01/21/20253 repliesview on HN

> Since prime numbers are very useful in secure communication, such easy-to-remember large prime numbers can be of great advantage in cryptography

What's the use of notable prime numbers in cryptography? My understanding is that a lot of cryptography relies on secret prime numbers, so choosing a notable/memorable prime number is like choosing 1234 as your PIN. Are there places that need a prime that's arbitrary, large, and public?


Replies

arh6801/22/2025

I believe they're talking about something like ECC

> To use ECC, all parties must agree on all the elements defining the elliptic curve, that is, the domain parameters of the scheme. The size of the field used is typically either prime (and denoted as p) or is a power of two

like "25519"

> An EdDSA signature scheme is a choice: ... of finite field F q over odd prime power q ... Ed25519 is the EdDSA signature scheme where q = 2^255 - 19

[1] https://en.wikipedia.org/wiki/Elliptic-curve_cryptography#Do...

[2] https://en.wikipedia.org/wiki/EdDSA#Ed25519

ramchip01/22/2025

A lot of public-key cryptography is based on finite fields, and the integers modulo N combined with addition and multiplication form a finite field iff N is prime. This brings some extremely useful properties e.g. every non-zero element has a multiplicative inverse. N must also be public so people can compute things (e.g. to verify a signature), and big to resist brute force attacks.

pwg01/22/2025

RSA [1] is directly based on the difficulty of factoring very large numbers where the factors of the number are also prime numbers.

[1] https://en.wikipedia.org/wiki/RSA_(cryptosystem)