Advertisement
Guest User

Untitled

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