


We actually remove all other characters from the plaintext message.įor encryption, enter a plaintext message containing only alphanumeric characters,įor example "Hello World" or "Have a nice day", then click the Encrypt-button. Should contain only alphanumeric characters. Why? Because for encrypting longer texts, the RSA modulus must be sufficiently large.īefore encrypting a longer text, increase the range for prime numbers and generate a new key pair with the new settingĪs alphabet for plaintext messages we use ABCDEFGHIJKLMNOPQRSTUVWXYZ and plaintext messages With larger prime numbers p, q you can encrypt longer plaintext messages. With smaller prime numbers it is easier to verify the calculations but you can encrypt only single letters.

Then (e, n) is the public key and (d, n) the private key.įor a quick start, you can generate a key pair automatically by clicking the button "Random keys". The inverse modulo phi of e is found using the extended euclidian algorithm. Calculate private key d: Determine the inverse modulo phi of e, that is a number d, such that d*e mod phi = 1. In this step, the public key is chosen randomly from a list of candidates for e. Calculate public key e: Choose a number e that is relatively prime to phi. Compute the RSA modulus, n = p*q and Eulers function phi = (p-1)*(q-1) by using the respective buttons. "Random p", "Random q" or enter your own prime numbers. You can generate random numbers in the selected range by using the buttons Start by entering your own prime numbers p, q or by generating random numbers p, q within a given range that is chosen via a RangeSlider. On Tab 1 "Key generation" you can execute the steps for generating a valid key pair.
