30124 Optional Practical Tasks
The following practical tasks allow you to learn more about the underlying ideas behind some of the concepts introduced in the course.The following suggests you use the Maple system, this is only for ease of use. Real programs are usually written in C/Java and assembly, but we want you get to the concepts and not worry about grotty details in this course.
If you do all of the practical tasks then following the course, doing well in the assignments (especially the last practical assignment for CS students) and doing well in the exam should be MUCH, MUCH easier.
- Historical Ciphers
Decrypt these example ciphertexts.
Write a C/Java/whatever program which will automate the breaking of a substitution cipher. - PGP
Construct your own PGP key. Instructions are here.
Exchange your public keys with the person sitting next to you and send each other signed and encrypted email. - RSA Examples in Maple
Write three Maple functions to- Compute an RSA key pair
- Encrypt a message (an integer say)
- Decrypt a message
If you are not familiar with Maple you should familarize yourself with the Maple system by working through this document.
- ElGamal Examples in Maple
Write three Maple functions to- Compute an ElGamal key pair
- Encrypt a message (an integer say)
- Decrypt a message
- Factor N given e and d
Give a Maple function to factor an RSA modulus N, given the RSA public and private keys e and d. The method was given in a lecture. Test your program using the function to compute RSA key pairs produced in a previous class. - Generating Primes in Maple
Write a Maple function to generate prime numbers which does not use the inbuilt Maple functions to test for primality. You should use the (pseudo) test for primality given in the lecture. - RSA Program in Maple
Take your previous code for RSA and remove all higher level functions. i.e. write your code soley in terms of basic arithmetic operations, eg add and multiply and remainder. You will therefore need to remove all functions such as chrem, Powmod, .... Make sure your RSA decryption algorithm uses the Chinese Remainder method to perform decryptions.

