$p$ is a 2048 bit prime number
$q$ is a 224 bit prime number
I know that $q$ is a prime divisor of $p-1$, thus $p=1 \bmod q$ but I couldn't write efficient code to calculate this.
- I can calculate 2048 bit prime $p$, but how to find $q$ efficiently?
Currently what I am doing is generating 224-bit primes and checking whether they are dividing $p-1$ or not but it takes forever...