Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download

πŸ“š The CoCalc Library - books, templates and other resources

Views: 96105
License: OTHER
Kernel:
%%html <link href="http://mathbook.pugetsound.edu/beta/mathbook-content.css" rel="stylesheet" type="text/css" /> <link href="https://aimath.org/mathbook/mathbook-add-on.css" rel="stylesheet" type="text/css" /> <style>.subtitle {font-size:medium; display:block}</style> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic" rel="stylesheet" type="text/css" /> <link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&subset=latin,latin-ext" rel="stylesheet" type="text/css" /><!-- Hide this cell. --> <script> var cell = $(".container .cell").eq(0), ia = cell.find(".input_area") if (cell.find(".toggle-button").length == 0) { ia.after( $('<button class="toggle-button">Toggle hidden code</button>').click( function (){ ia.toggle() } ) ) ia.hide() } </script>

Important: to view this notebook properly you will need to execute the cell above, which assumes you have an Internet connection. It should already be selected, or place your cursor anywhere above to select. Then press the "Run" button in the menu bar above (the right-pointing arrowhead), or press Shift-Enter on your keyboard.

ParseError: KaTeX parse error: \newcommand{\lt} attempting to redefine \lt; use \renewcommand

Section7.7Sage Exercises

ΒΆ
1

Construct a keypair for Alice using the first two primes greater than 1012.10^{12}\text{.} For your choice of E,E\text{,} use a single prime number and use the smallest possible choice.

Output the values of n,n\text{,} E,E\text{,} and DD for Alice. Then use Sage commands to verify that Alice's encryption and decryption keys are multiplicative inverses.

2

Construct a keypair for Bob using the first two primes greater than 2β‹…1012.2\cdot 10^{12}\text{.} For your choice of E,E\text{,} use a single prime number and use the smallest possible choice. Output the values of n,n\text{,} E,E\text{,} and DD for Alice.

Encode the word Math using ASCII values in the same manner as described in this section (keep the capitalization as shown). Create a signed message of this word for communication from Alice to Bob. Output the three integers: the message, the signed message and the signed, encrypted message.

3

Demonstrate how Bob converts the message received from Alice back into the word Math. Output the value of the intermediate computations and the final human-readable message.

4

Create a new signed message from Alice to Bob. Simulate the message being tampered with by adding 11 to the integer Bob receives, before he decrypts it. What result does Bob get for the letters of the message when he decrypts and unsigns the tampered message?

5Classroom Exercise

Organize a class into several small groups. Have each group construct key pairs with some minimum size (digits in nn). Each group should keep their private key to themselves, but make their public key available to everybody in the room. It could be written on the board (error-prone) or maybe pasted in a public site like pastebin.com. Then each group can send a signed message to another group, where the groups could be arranged logically in a circular fashion for this purpose. Of course, messages should be posted publicly as well. Expect a success rate somewhere between 50% and 100%.

If you do not do this in class, grab a study buddy and send each other messages in the same manner. Expect a success rate of 0%, 50% or 100%.