hmk3 - friend BigNum Exp(const BigNum& b const...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Cryptography Summer ’01 Homework #3 Assigned: Tuesday, 6/19/01 Due: Tuesday, 6/26/01 Create a BigNum class that allows for integer operations on large values. In particular, your class show be able to handle integers of up to 50 digits. Each operation will be done with a particular modulus which is guaranteed to be 50 digits or less. Your class should provide functions to add, subtract, multiply and exponentiate two BigNums. Make each of these friend functions in your class. Each operation should return a BigNum with a value in between 0 and mod-1, inclusive. Here is a list of prototypes: friend BigNum Add(const BigNum& x, const BigNum& y, const BigNum& mod); friend BigNum Subtract(const BigNum& x, const BigNum& y, const BigNum& mod); friend BigNum Multiply(const BigNum& x, const BigNum& y, const BigNum& mod);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: friend BigNum Exp(const BigNum& b, const BigNum& e, const BigNum& mod); Create a driver program that allows the user to test each of these functions. Your driver program should allow the user to enter 2 operands and a modulus, and then list the answers for each of the four operations. Your program should prompt the user after each set of numbers whether they want to continue. If so, repeat the process, otherwise quit. Revised Contest Schedule Date Information Given 6/21 Plaintext w/matching cipher text + ½ algorithms to two groups 6/26 ½ algorithms to two more groups 6/28 ½ algorithms to last two groups, submit plaintext to encrypt 7/3 receive encrypted plaintext 7/5 rest of the algorithm to three groups 7/10 rest of the algorithm to the other groups 7/24 final report due...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online