# Crypto Have fun with RSA 1 Intro RSA RSA s one the widely used p...

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#!/usr/bin/python
import sys, hashlib, json

def usage():
print """usage: python get_name_hash.py student_id
for example:
python get_name_hash.py qchenxiong3"""
sys.exit(1)

if len(sys.argv) != 2:
usage()

print hashlib.sha224(sys.argv[1]).hexdigest()

with open("keys4student.json", 'r') as f:

name = hashlib.sha224(sys.argv[1].strip()).hexdigest()
if name not in all_keys:
print sys.argv[1], "not in keylist"
usage()

keys = all_keys[name]
n1 = int(keys['N'], 16)
e = int(keys['e'], 16)
d = int(keys['d'], 16)
c = int(keys['c'], 16)

m = pow(c, d, n1)

print ("Your message in Hex format:", hex(m).rstrip('L'))...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

# 50% discount

Hours
Minutes
Seconds
\$75.00 \$37.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Cryptography Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.