How long are the used numbers in the task? Are they big enough to be secure?What does the code do in Task1.c? What formula has been calculated?

Lab Objectives:
⦁ To gain hands-on experiences on the RSA algorithm.

Used Tools:
⦁ The provided lab files.

Background
⦁ RSA
⦁ BigNUM API
⦁ Compile C code from terminal: $ gcc sample.c -o output -lcrypto
⦁ Convert a plain ASCII string to a hex string: $ python -c ’print(“A top secret!”.encode(“hex”))’

Task1: Derive the private key
Given the following hexadecimal values,  modify the Task1.c with corresponding values then derive the private key.
p = F7E75FDC469067FFDC4E847C51F452DF
q = E85CED54AF57E53E092113E62F436F4F
e = 0D88C3
Take a screenshot Lab4T1 for the command which generate the private key? And answer the following questions.

⦁ How long are the used numbers in the task? Are they big enough to be secure?

⦁ What does the code do in Task1.c? What formula has been calculated?

Task2: Encrypt a Message
Encrypt the message “A top secret!”. The public keys are listed in the followings. We also provide the private key d to help you verify your encryption result.
n = DCBFFE3E51F62E09CE7032E2677A78946A849DC4CDDE3A4D0CB81629242FB1A5
e = 010001
M = A top secret! / here you need to convert this message to hex value
d = 74D806F9F3A62BAE331FFE3F0A68AFE35B3D2E4794148AACBC26AA381CD7D30D
Take a screenshot Lab4T2 for the command which display the encrypted message?

Task3: Sign a Message
Generate a signature for the following message :
M = I owe you $2000. / here you need to convert this message to hex value
Take a screenshot Lab4T3 for the command which display the signed message? And answer the question.

What is the signing formula? And what does it mean?

Task4: Verify 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). verify whether the signature is indeed Alice’s or not. The public key and signature are listed in the following:
M = Launch a missile.
S = 643D6F34902D9C7EC90CB0B2BCA36C47FA37165C0005CAB026C0542CBDB6802F
e = 010001
n = AE1CD4DC432798D933779FBD46C6E1247F0CF1233595113AA51B450F18116115
Take a screenshot Lab4T4a for the results of applying the above commands!
Suppose that the signature in is corrupted, such that the last byte of the signature changes from 2F to 3F, i.e, there is only one bit of change. Please repeat this task and describe what will happen to the verification process.
Take a screenshot Lab4T4b for the results of applying the above commands!

© 2020 EssayQuoll.com. All Rights Reserved. | Disclaimer: For assistance purposes only. These custom papers should be used with proper reference.