Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please provide the code in c 3.2 Task 2: Encrypting a Message Let (e, n) be the public key. Please encrypt the message A top
please provide the code in c
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. $ python -c 'print ("A top secret!". encode("hex"))" 41207461702073656372657421 The public keys are listed in the followings (hexadecimal). We also provide the private key d to help you verify your encryption result. n DCBFFE3E51F62E09CE7032E2677A78946A849DC4CDDE 3A4D0CB81629242FB1A5 e 010001 (this hex value equals to decimal 65537) M A top secret! d 74D806F9F3A62BAE331FFE3F0A68AFE35B3D2E4794148AACBC26AA381CD7D30D
Step by Step Solution
★★★★★
3.49 Rating (162 Votes )
There are 3 Steps involved in it
Step: 1
include include include int main Initialize message and key values char message hex 4120746170207365...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started