This is an easy to understand introductory video explaining the math behind
Public-key cryptography (which is based on prime factorization) and
Quantum cryptography.
Modern cryptography uses prime numbers that are around 313 digits long. For the state-of-the-art supercomputers, it would take millions of years to factor the product of two such big prime numbers. But, it is projected that a quantum computer will be able to do that in polynomial time !
In July 2022, NIST has announced the first four quantum-resistant cryptographic algorithms. Three out of four of these algorithms are based on Lattice math.
There’s some good explanation of how the lattice math applies to cryptography.