Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = F7E75FDC469067FFDC4E847C51F452DF
- q = E85CED54AF57E53E092113E62F436F4F
- e = 0D88C3
- 3.2 Task 2: Encrypting a Message
- Let (e, n) be the public key. Please encrypt the message "A top secret!" (the quotations are not
- included). We need to convert this ASCII string to a hex string, and then convert the hex string to a BIGNUM
- using the hex-to-bn API BN hex2bn(). The following python command can be used to convert a plain
- ASCII string to a hex string.
- SEED Labs – RSA Public-Key Encryption and Signature Lab 5
- $ python -c ’print("A top secret!".encode("hex"))’
- 4120746f702073656372657421
- The public keys are listed in the followings (hexadecimal). We also provide the private key d to help
- you verify your encryption result.
- n = DCBFFE3E51F62E09CE7032E2677A78946A849DC4CDDE3A4D0CB81629242FB1A5
- e = 010001 (this hex value equals to decimal 65537)
- M = A top secret!
- d = 74D806F9F3A62BAE331FFE3F0A68AFE35B3D2E4794148AACBC26AA381CD7D30D
- 3.3 Task 3: Decrypting a Message
- The public/private keys used in this task are the same as the ones used in Task 2. Please decrypt the following
- ciphertext C, and convert it back to a plain ASCII string.
- C = 8C0F971DF2F3672B28811407E2DABBE1DA0FEBBBDFC7DCB67396567EA1E2493F
- You can use the following python command to convert a hex string back to to a plain ASCII string.
- $ python -c ’print("4120746f702073656372657421".decode("hex"))’
- A top secret!
- 3.4 Task 4: Signing a Message
- The public/private keys used in this task are the same as the ones used in Task 2. Please generate a signature
- for the following message (please directly sign this message, instead of signing its hash value):
- M = I owe you $2000.
- Please make a slight change to the message M, such as changing $2000 to $3000, and sign the modified
- message. Compare both signatures and describe what you observe.
- 3.5 Task 5: Verifying a Signature
- Bob receives a message M = "Launch a missile." from Alice, with her signature S. We know that
- Alice’s public key is (e, n). Please verify whether the signature is indeed Alice’s or not. The public key
- and signature (hexadecimal) are listed in the following:
- M = Launch a missle.
- S = 643D6F34902D9C7EC90CB0B2BCA36C47FA37165C0005CAB026C0542CBDB6802F
- e = 010001 (this hex value equals to decimal 65537)
- n = AE1CD4DC432798D933779FBD46C6E1247F0CF1233595113AA51B450F18116115
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement