The Naked Scientists
Toggle navigation
Login
Register
Podcasts
The Naked Scientists
eLife
Naked Genetics
Naked Astronomy
In short
Naked Neuroscience
Ask! The Naked Scientists
Question of the Week
Archive
Video
SUBSCRIBE to our Podcasts
Articles
Science News
Features
Interviews
Answers to Science Questions
Get Naked
Donate
Do an Experiment
Science Forum
Ask a Question
About
Meet the team
Our Sponsors
Site Map
Contact us
User menu
Login
Register
Search
Home
Help
Search
Tags
Recent Topics
Login
Register
Naked Science Forum
General Science
General Science
Why are code makers and code breakers obsessed with prime numbers?
« previous
next »
Print
Pages: [
1
]
Go Down
Why are code makers and code breakers obsessed with prime numbers?
2 Replies
7783 Views
4 Tags
0 Members and 1 Guest are viewing this topic.
Pseudoscience-is-malarkey
(OP)
Hero Member
939
Activity:
1%
Thanked: 32 times
Why are code makers and code breakers obsessed with prime numbers?
«
on:
19/01/2023 06:56:06 »
This seems to be the case in both fiction and reality.
Logged
evan_au
Global Moderator
Naked Science Forum GOD!
11033
Activity:
8%
Thanked: 1486 times
Re: Why are code makers and code breakers obsessed with prime numbers?
«
Reply #1 on:
19/01/2023 09:54:46 »
Prime numbers have many neat mathematical properties which do not apply to other "composite" numbers.
One of the simplest pseudo-random number generators is x
n+1
= (a*x
n
+ c) mod m
- It is important that constants a, b and c be
relatively
prime, otherwise the sequence will repeat long before it has generated all m values.
- Using prime numbers for m has the advantage that all bits of the generated sequence have a long period before they repeat
https://en.wikipedia.org/wiki/Linear_congruential_generator
Another application for prime numbers depends on the fact that for conventional computers, it is hard to factor large numbers
- If the number has just 2 large prime factors
- If the number has smaller factors, it is much easier to factorise (especially if there are many factors)
- In theory, a quantum computer may be able to factor large numbers much more quickly than a classical computer - but it will need a few thousand qubits.
https://en.wikipedia.org/wiki/RSA_(cryptosystem)
Another role that prime numbers play here is that raising a number to a high power modulo a prime number generates a unique value.
Note that some of these algorithms use the weaker requirement of being
relatively
prime, not specifically a prime.
It is hard to prove that a number is prime, but there are practical tests for
pseudo
primes, which can determine that a number is prime for all practical purposes.
- These tests are useful for generating public/private key pairs.
https://en.wikipedia.org/wiki/Pseudoprime
«
Last Edit: 19/01/2023 21:00:37 by
evan_au
»
Logged
alancalverd
Global Moderator
Naked Science Forum GOD!
21157
Activity:
73.5%
Thanked: 60 times
Life is too short for instant coffee
Re: Why are code makers and code breakers obsessed with prime numbers?
«
Reply #2 on:
19/01/2023 10:18:35 »
A very simple code consists of writing plain language into a grid of n x m squares, adding as much irrelevant padding as you wish, then transmitting it "perpendicularly" as m strings x n bytes. It's annoying to intercept because it has an entirely natural frequency table but utterly jumbled, and it's easy to decode if you know that the message is all contained in n x m bytes, which is unequivocal if n and m are prime, but if the string is immersed in padding and significantly longer than m x n it only makes sense if you know one of the primes.
Logged
Helping stem the tide of ignorance
Print
Pages: [
1
]
Go Up
« previous
next »
Tags:
code makers
/
code breakers
/
rsa
/
enigma
There was an error while thanking
Thanking...