Polygon: Jurnal Ilmu Komputer dan Ilmu Pengetahuan Alam
Vol. 4 No. 4 (2026): Juli : Polygon : Jurnal Ilmu Komputer dan Ilmu Pengetahuan Alam

Implementasi Algoritma Miller-Rabin untuk Pengujian Bilangan Prima Menggunakan Python

Sufri Adiyatno (Unknown)
Muhammad Sadno (Unknown)
Aswani Aswani (Unknown)
Arga Wiradarma (Unknown)
Rifa’atus Shalihah (Unknown)



Article Info

Publish Date
30 Jul 2026

Abstract

Prime numbers play a crucial role in modern cryptography, necessitating fast and accurate primality-testing methods. The Miller-Rabin algorithm is an efficient probabilistic method; however, the literature discussing its practical implementation and empirical evaluation remains limited. This study aimed to implement the Miller-Rabin algorithm using Python and evaluate its classification accuracy and execution time. This implementative research tested prime and composite numbers of sizes 32, 64, 128, 256, and 512 bits. The algorithm was implemented using Python's built-in pow() function for efficient modular exponentiation. The experimental results demonstrated that the implemented Miller–Rabin algorithm correctly identified all prime numbers as probably prime and all composite numbers as composite in all test cases. Furthermore, the computational time evaluation revealed that the execution time was directly proportional to the bit length of the numbers and the number of testing iterations. This execution time remains highly efficient for numbers of up to 512 bits. The implications of this research highlight that the Python implementation of Miller-Rabin is highly effective, serving as an excellent educational medium and a foundational tool for developing systems requiring large prime number testing.

Copyrights © 2026






Journal Info

Abbrev

Polygon

Publisher

Subject

Computer Science & IT

Description

Jurnal ini adalah jurnal Ilmu Komputer dan Ilmu Pengetahuan Alam yang bersifat peer-review dan terbuka. Bidang kajian dalam jurnal ini termasuk sub rumpun Ilmu Komputer, dan Ilmu Pengertahuan ...