M7L2 Summary

.docx

School

Arizona State University, Polytechnic Campus *

*We aren’t endorsed by this school

Course

30555

Subject

Information Systems

Date

Feb 20, 2024

Type

docx

Pages

8

Uploaded by CaptainIbex3617

Report
IFT 510 - Module 7: Lab 2- Data Encryption Cryptography Keerthana Yadavali Dinesh Sthapit 12 th November, 2023.
Encryption Lab Assessment Assignment Encryption process: Step 1: Key Generation & Distribution: Code: ## Student Name: Keerthana Yadavali ## Student ID: 1230475287 ## Date: 11/12/2023 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import serialization # Generate Private Key private_key = rsa.generate_private_key( public_exponent = 65537 , key_size = 2048 , backend = default_backend() ) # Save Private Key to File with open ( "private_key.pem" , "wb" ) as f: f.write(private_key.private_bytes( encoding = serialization.Encoding.PEM, format = serialization.PrivateFormat.PKCS8, encryption_algorithm = serialization.NoEncryption() )) # Generate Public Key from Private Key public_key = private_key.public_key() # Save Public Key to File with open ( "public_key.pem" , "wb" ) as f: f.write(public_key.public_bytes( encoding = serialization.Encoding.PEM, format = serialization.PublicFormat.SubjectPublicKeyInfo )) Explanation: The process of creating a cryptographic key that will be used to both encrypt and decrypt data is known as the key creation stage in the encryption process. The confidentiality of the key ensures the security of the encryption process, thus it's critical to create a strong key that's challenging for hackers to decipher. A cryptographic procedure is used to create a public key
and a private key, which together create an asymmetric key pair. The private key is kept a secret while the public key is disclosed. The RSA algorithm is the most widely used method for creating asymmetric key pairs. The public and private keys are generated via the RSA algorithm using two big prime numbers. Output: a. Execution of code: b. Public key:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help