There aren't any 2020, except in the trivial one-time pad case where the key is as large as the message: crypto.stackexchange.com/questions/10815/how-do-we-prove-that-aes-des-etc-are-secure
The only perfect cryptosystem!
The problem is that you need a shared key as large as the message.
Systems like advanced Encryption Standard allow us to encrypt things larger than the key, but the tradeoff is that they could be possibly broken, as don't have any provably secure symmetric-key algorithms as of 2020.
2020-so-far yes, Grover's algorithm would only effectively reduce key sizes by half:
It allows you to do two things:
One notable application: cryptocurrency, see e.g. how Bitcoin works.
Used for example:
- by Monero to hide the input of a transaction
- anonymous electronic voting
Based on the fact that we don't have a P algorithm for integer factorization as of 2020. But nor proof that one does not exist!
The private key is made of two randomly generated prime numbers: and . How such large primes are found: how large primes are found for RSA.
The public key is made of:
n = p*q
- a randomly chosen integer exponent between
e_max = lcm(p -1, q -1), where
lcmis the Least common multiple
Given a plaintext messageThis operation is called modular exponentiation can be calculated efficiently with the Extended Euclidean algorithm.
m, the encrypted ciphertext version is:
c = m^e mod n
The inverse operation of finding the private
mfrom the public
eand is however believed to be a hard problem without knowing the factors of
However, if we know the private
q, we can solve the problem. As follows.
First we calculate the modular multiplicative inverse. TODO continue.
- www.comparitech.com/blog/information-security/rsa-encryption/ has a numeric example
Answers suggest hat you basically pick a random large odd number, and add 2 to it until your selected primality test passes.
The prime number theorem tells us that the probability that a number between 1 and is a prime number is .
Therefore, for an N-bit integer, we only have to run the test N times on average to find a prime.
Since say, A 512-bit integer is already humongous and sufficiently large, we would only need to search 512 times on average even for such sizes, and therefore the procedure scales well.
RSA vs Diffie-Hellman key exchange are the dominant public-key cryptography systems as of 2020, so it is natural to ask how they compare:
Based on the fact that we don't have a P algorithm for discrete logarithm as of 2020. But nor proof that one does not exist!
Variant of Diffie-Hellman key exchange based on elliptic curve cryptography.
Ciro Santilli has a hard time understanding why this is possible, e.g. many people use short 4 digit pins, or a short swipe pattern. Why can't this be cracked easily offline?
Can we do better than "wrong password implies random bytes"?
Can the last disk access times be checked via forensic methods?
Generate public private key, test encrypt and test decrypt:
# Create your pubkey. gpg --gen-key gpg --armor --output pubkey.gpg --export <myemail> # Encrypt using someone's pubkey. gpg --import pubkey2.gpg echo 'hello world' > hello.txt gpg --output hello.txt.gpg --encrypt --recipient <other-email> hello.txt # Double check it is not plaintext in the encrypted message. grep hello hello.txt.gpg # Decrypt. gpg --output hello.decrypt.txt --decrypt --recipient <myemail> hello.txt.gpg diff -u hello.decrypt.txt hello.txt
This is why it enables hosting illegal things like the Silk Road: law enforcement is not able find where the server is hosted, and take it down or identify the owner.
This is where "fun" stuff is likely to be.
An overview of what you can do with a pre-shared key with tradeoffs can be found at: quantumcomputing.stackexchange.com/questions/142/advantage-of-quantum-key-distribution-over-post-quantum-cryptography/25727#25727 The options are:
- one-time pad
- symmetric encryption
- authentication with some message authentication code protocol
In the context of cryptography, authentication means "ensuring that the message you got comes from who you think it did".
Authentication is how we prevent the man-in-the-middle attack.
Authentication is one of the hardest parts of cryptography, because the only truly secure way to do it is by driving to the other party yourself to establish a pre-shared key so you can do message authentication code. Or to share your public key with them if you are satisfied with the safety of post-quantum cryptography.