Advanced Techniques for Prime Number Generation in RSA Encryption: A Path Toward Greater Efficiency

Kwame Assa-Agyei, Kayode Owa, Tawfik Al-Hadhrami, Seth Kwame Asafo · 2025

Cryptography is essential for securing communication and information in the digital age, particularly with the rise of the Internet of Things (IoT), which increases the risk of unauthorized data access and manipulation. Public key cryptography, specifically RSA encryption, plays a critical role in ensuring secure data transmission. However, RSA faces several challenges, including performance issues with key generation, encryption, and decryption times, especially as key sizes increase. It is also vulnerable to attacks like the Greatest Common Divisor (GCD) attack. This study aims to enhance the efficiency of cryptographic algorithms by evaluating standard RSA and proposing an optimized variant of RSA. The proposed variant incorporates prime sieving, cache reuse, and early termination in the Miller-Rabin primality test. Using a dataset of 50 randomly generated numbers between 1000 and 99999999999 both algorithms were tested 50 times to assess key metrics such as key generation time, encryption time, decryption time, and memory usage across key sizes of 1024, 2048, and 4096 bits. The results demonstrate that the proposed RSA variant significantly improves encryption and decryption times, along with reduced memory usage, while maintaining performance consistency as key sizes grow.

Read the paper · More papers on PaperTik