Description
There are several cryptography libraries for python:
M2Crypto,
PyCrypto,
PyOpenSSL,
- cryptography
You need to choose one Python cryptography library and use it to answer the following questions “Use screenshots and description to document your successful results with your codes”
Suppose we have a text file PyCrypto.txt which contains the text below:
“Cryptography is the practice and study of techniques for secure communication in the presence of third parties called adversaries. These adversaries are often referred to as Eve in cryptography, while the sender and recipient of messages are called Alice and Bob respectively. More generally, cryptography is about constructing and analyzing protocols that prevent third parties or the public
from reading private messages.”
After choosing which cryptography library you will use, write small python programs according to the following.
1- Write a Python program to compute and print the message digest of this file using SHA-512. [Marks 2]
2- Write a Python program to generate a digital signature of this file using MD5 and RSA. You need to save the public key (encoded) for another program to verify the signature. [Marks 2]
3- Write a Python program to verify the signature using public key from 2. [Marks 2]
4- Write a Python program allowing two parties to agree on a symmetric key using Diffie-Hellman exchange protocol. [Marks 2]
Explanation & Answer
please find the solution attached, and...
Review
Review
24/7 Study Help
Stuck on a study question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Related Tags
Orphan Train
by Christina Baker Kline
The Good Earth
by Pearl S. Buck
Their Eyes Were Watching God
by Zora Neale Hurston
The Turn of the Screw
by Henry James
The Trial
by Franz Kafka
Twilight
by Stephenie Meyer
How to Win at the Sport of Business
by Mark Cuban
Of Mice and Men
by John Steinbeck
The Unwinding of the Miracle
by Julie Yip-Williams