DOC PREVIEW
Berkeley COMPSCI 70 - Homework

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 70 Discrete Mathematics for CSSpring 2005 Clancy/Wagner HW 7Due Thursday, March 17Coverage: This assignment involves topics from the lectures of March 1, 8, and 10, and from Rosensection 2.6.Administrative reminders: We will accept only unformatted text files or PDF files for homework sub-mission. Include your name, login name, section number, and partner list in your submission. Give thecommand submit hw7 to submit your solution to this assignment.This is a programming assignment. We advise you to work with a partner. If you haven’t yet switchedpartners, you should do so for this assignment.Assignment: You are to complete a program (either in Scheme or in Java) to generate a public/privatekey pair and encrypt and decrypt messages. In Scheme, this involves completing the functions new-keys,encrypted, and decrypted in the framework file rsa.scm. The analogous task in Java is to completethe methods newKeys, encrypted, and decrypted in the framework file rsa.java.Initialization code in both programs will read or create files in your working directory named private-keyand public-key; each should contain a single line containing two numbers. We will provide the codethat works with these files.Scheme and Java both have built-in support for large integers. Indeed, Java provides in the class java.math.BigIntegerenough support to complete this assignment with hardly any code. Thus, you may not use the followingmethods in java.math.BigInteger:• gcd (BigInteger)• isProbablePrime (int)• modInverse (BigInteger)• modPow• probablePrime (int, Random)You are also forbidden to use any other RSA or bignum library, whether part of Java or external.Framework files will appear online sometime on Friday in the directory cs70/code.The directory cs70/public-keys will contain files named aa, ab, etc.; file xy will contain the publickey for user cs70-xy in the format described above. The framework code for the encrypted func-tion/method will access a specified file in this directory. Each file initially will contain the pair3 5893CS 70, Spring 2005, HW 7 1(the corresponding private key is 3827 5893). These files are writable; we encourage you to update yourfile with more reasonable values for the public key, to allow other students to test their code by sending youmessages.CS 70, Spring 2005, HW 7


View Full Document

Berkeley COMPSCI 70 - Homework

Documents in this Course
Notes 1

Notes 1

12 pages

Note 2

Note 2

6 pages

Notes

Notes

6 pages

Notes

Notes

7 pages

Note 10

Note 10

8 pages

n20

n20

10 pages

n19

n19

10 pages

n18

n18

10 pages

n17

n17

6 pages

n16

n16

9 pages

n15

n15

10 pages

n14

n14

9 pages

n13

n13

6 pages

n12

n12

7 pages

n11

n11

6 pages

n10

n10

8 pages

n9

n9

5 pages

n8

n8

7 pages

n7

n7

8 pages

n6

n6

5 pages

n5

n5

8 pages

n4

n4

7 pages

n3

n3

10 pages

n2

n2

7 pages

n1

n1

5 pages

Load more
Download Homework
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Homework and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?