Saudi Electronic University Python Cryptography Library Questions

User Generated

fgenatre1994

Programming

Saudi electronic university

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]

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

please find the solution attached, and...


Anonymous
Excellent resource! Really helped me get the gist of things.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Related Tags