Python is useful, but it struggles in many areas. That said, it has opened-up coding to many and continues to be one of the most useful programming languages. But, it is far from perfect, and it’s the compiled languages that are rising to the top in creating a secure and robust software environment. We must remember that most programming languages were developed in a time where there were no GitHub’s or code that could be versioned and downloaded for code integration. For them, there were static libraries (LIB) and dynamic ones (DLL). Golang and Rust see code libraries as online places to download open-source code, and which can be examined by the developers. So, let’s have a quick look at a simple Rust program to factorize a number.
Factorization
The RSA public key encryption method takes two random prime numbers (p and q) and then multiples them together to give a modulus (N). The strength of the encryption is then based on the hard problem of finding p and q, when we have N. If we can find these, we will break the encryption. And so factorizing an integer is thus a key challenge within encryption.
Overall a non-prime number can be represented by the multiplication of prime numbers. For example, a value of 8 can be represented by 2x2x2, and 6392 by 2x2x2x17x47. The values of 2, 17 and 47 are prime numbers. Within…
