2_ Digital Signatures

Class Lab 9-2: Digital Signatures

This is a Partner Lab

Website: https://nmichaels.org/rsa.py

Table 1: Alice’s Public and Private Keys

When you open the site - these keys should be in there by default

  1. Type “Alice” into the text box (case matters) and click Sign

    1. This will use Alice’s Private Key to encrypt the word “Alice” - which should result in the following:

Table 2: Alice’s Digital Signature:

Alice’s Digital Signature (Encrypted with Alice’s Private Key)

0xc8 0x93 0xa9 0x0d 0x8f 0x4e 0xc5 0xc3 0x64 0xec 0x86 0x9d 0x2b 0x2e 0xc9 0x21 0xe3 0x8b 0xab 0x23 0x4a 0x4f 0x45 0xe8 0x96 0x9b 0x98 0xbe 0x25 0x41 0x15 0x9e 0xab 0x6a 0xfb 0x75 0x9a 0x13 0xb6 0x26 0x04 0xc0 0x60 0x72 0x28 0x1a 0x73 0x45 0x71 0x83 0x42 0xd4 0x7f 0x57 0xd1 0xac 0x91 0x8c 0xae 0x2f 0x3b 0xd2 0x99 0x30 0x3e 0xe8 0xa8 0x3a 0xb3 0x5d 0xfb 0x4a 0xc9 0x18 0x19 0xfd 0x3f 0x0c 0x0a 0x1f 0x3d 0xa4 0xa4 0xfe 0x02 0x9d 0x96 0x2f 0x50 0x34 0xd3 0x95 0x55 0xe0 0xb7 0x2a 0x46 0xa4 0x9e 0xae 0x80 0xc9 0x77 0x43 0x16 0xc0 0xab 0xfd 0xdc 0x88 0x95 0x05 0x56 0xdf 0xc4 0xfc 0x13 0xa6 0x48 0xa3 0x3c 0xe2 0x87 0x52 0xc5 0x3f 0x0c 0x0d

  1. Open a New Tab in your browser - and open a second window of https://nmichaels.org/rsa.py - This will be Bob’s tab

  2. Bob won’t have Alice’s Private Key - so delete the Private Key so only Alice’s Public Key is listed

  3. Copy Alice's signature into the text field on Bob’s Tab. Should look like:

  4. Click “Verify” - it should prove that Alice created the encrypted text as she used her private key

  5. Submit: Screenshot of successful validation of Alice’s Signature

Part 2: Create Your Own Digital Signatures

Step 1: Generate a New Pair of RSA Keys for You and Your Partner

  1. Load the site in two tabs - you will use one for each of you

  2. Delete the Public and Private Keys and Text (leave exponent at 10001)

  3. On the first tab - generate a new set of RSA Keys with the Generate button

  4. Copy the keys for Partner 1 into table

Partner 1 Keys

Public Key

b933e58082d1f12bde35b7b3e0154f284d550b5bf5b1e3f37c0b06ed56110273230e64aad71c77fe 6e7b4c426438db2c28fba76357146c885675377856a56cfe1c8b7fa829ce40960d0de1d0000dfa9e 444f4e7ccbb2a4b5411c9ebb3b53b0c61a8a84c4e01da38966a9b04e651fd200f71164fbe4bf3e99 abb5eb1be1852279

Private Key

71e33cf54afd294e6da620e26721137d5818bd147ec136c92af568fc17d9fbe4aba1153c8d6d7f48 a1ce06762945615a0595c3386e7b2bc6a74c0ba15fbef8873b53e0f1b2159ae9bf9b6868c2dcad18 398c90be56753d57ed99ca3acdaf822c6738814bbc3dcb22865988edf2c6e524bf1c22d28ac63c22 249216f5f7e2bb01

  1. On the Second Tab do the same for Partner 2

Partner 2 Keys

Public Key

cfb68593b627256df2991767e56c6435d3cec32d911f9f00485a55866bdbfd104620027aee8a0978 752e08b2e57c99c343f5639a8b67c731416ce29d72d034fd016321619f91b2afcde52ddf9ac3a2e3 a1339b7ed16e979c1648f81cc3c4623716ad5a84d90e0f8e8a97f0665567af1b91e511aa78c3581e a3701957e1cc383d

Private Key

a841027cff9d402d8ac945f36c1d5c235a1a6f71d6cf957da61e3e8f2f89b8b959048eddc3a25f3f 8b3429e9b8093188c1e0e1b90b599a3a24f42db13a92bb880bf4cc3a8598597cbccdbfbd58d9a061 962eaa6558bdb2a31bf85a6f471968433d491aa98ee12eb3135d56c36e287a55eec8da896640a493 35b2949be760e341

Step 2: Create a Digital Signature

  1. Have Partner 1 type their full name into the Text box on the partner 1 tab

  2. Click “Sign”

  3. Copy Partner 1’s Digital Signature into the table below:

Partner 1 Dig Sig

0x4b 0xc3 0x23 0xe5 0xdc 0x90 0x2b 0xfb 0x75 0xda 0x22 0xea 0x89 0x4c 0x33 0x34 0x34 0x15 0xe1 0xd2 0x69 0x95 0x04 0xbc 0x6e 0xa1 0xfa 0x74 0xdc 0x8f 0x2c 0x4d 0x67 0x0d 0x00 0xf4 0xd7 0x7b 0x2b 0xa5 0x86 0xc7 0xd9 0xf5 0xc3 0xce 0x00 0x14 0x10 0x8e 0xda 0xaa 0x6f 0x4e 0x1c 0x48 0x84 0xfd 0x43 0xd9 0x5e 0x6c 0xca 0xe8 0x17 0x8a 0x27 0x74 0x12 0x71 0xeb 0x33 0x22 0xcb 0x57 0xfb 0x4a 0x83 0xc8 0xb0 0xfd 0x0c 0x9f 0x57 0xb7 0x31 0x89 0x5e 0x3e 0xf0 0xc5 0x77 0xb1 0xe8 0xf3 0x33 0x0c 0xd9 0x71 0x03 0xca 0x6f 0xd3 0xf0 0xb4 0xc6 0xbc 0x4e 0x24 0x8b 0x3e 0xc2 0xe5 0x2d 0xc6 0x8d 0x77 0x0c 0xc7 0x68 0xc1 0xd3 0x0b 0x46 0x6d 0x3c 0x3d 0xb2

  1. Have Partner 2 type their full name into the Text box on the partner 2 tab

  2. Click “Sign”

  3. Copy Partner 2’s Digital Signature into the table below:

Partner 2 Dig Sig

0x34 0x44 0xf5 0x03 0x79 0x45 0x84 0x41 0xde 0xda 0xf7 0x54 0x8a 0x63 0xc0 0xb8 0xc8 0x2a 0xbd 0x7e 0x0a 0x65 0xae 0x0f 0x63 0x4b 0xa3 0x41 0x2f 0x2c 0x87 0xd5 0x56 0x98 0x2a 0x61 0x44 0x26 0x34 0x61 0x2b 0xdf 0xbc 0xaa 0x37 0x8c 0x1c 0x8a 0x3e 0x2c 0x52 0xeb 0x78 0x42 0x74 0x97 0xd0 0x76 0xcd 0xab 0x8f 0xb8 0x45 0xd8 0x8d 0x6b 0x10 0x56 0x26 0x62 0xc2 0x69 0xfc 0xd4 0xa5 0x4b 0xa6 0x08 0x1a 0x10 0x33 0x51 0x9d 0x93 0x29 0x52 0x73 0xeb 0xc3 0x9a 0x94 0x62 0x14 0x60 0xd0 0xe4 0x59 0x4d 0x4c 0x4a 0xac 0x01 0x93 0xc3 0x36 0xda 0x99 0x51 0x36 0xf1 0xda 0xd8 0xfe 0xd1 0xf6 0x30 0x48 0x43 0x37 0xe8 0xea 0x84 0x17 0x3f 0x03 0x91 0x69 0xd6

Step 3: Exchange and Verify Digital Signatures

  1. Open the site in two more tabs

    1. One will be used to verify partner 1’s signature

    2. The other will be used to verify partner 2’s signature

  2. Delete the public and private keys and text from the 2 new tabs

  3. On one tab, copy partner 1’s Public Key and Signature into the appropriate boxes (do not copy the private key)

  4. Click “verify” and it should validate the signature!

  5. Repeat for partner 2 in the other new tab

Submission: Screenshots showing verification of both signatures

If you have time- Encrypt/Decrypt

  1. Partner 2 - Use Partner 1’s Public Key to encrypt a text message

  2. Partner 1 - Can you decrypt the message using your key pair?

  3. Do the same in reverse (Partner 1 use Partner 2’s Public Key to encrypt a message)

Submission: Screenshot of successful decryption

Encryption

Decryption

Last updated