This is a basic implementation of the cryptosystem.
I got inspired after reading Information Security - Principles and Practice
by Mark Stamp
where the author elegantly explains the public key cryptography and the steps to implement the above system.
This system was later broken by Adi Shamir in the year 1982.
I've noticed later on, Lot of papers were published on improving the system and also papers published on attacking the system using cyrptanalysis and quantum computing algorithms.