Question: Question 2 . Bob has sent a message e to Alice. Decrypt and decode Bob's message. ( The standard ASCII encode and decode functions have
Question Bob has sent a message e to Alice. Decrypt and decode Bob's
message. The standard ASCII encode and decode functions have been pro
vided.Hint: Sage will rightly object to switching mod to a number
modulo e since there is no natural homomorphism When you
need to do this, let eger so that Sage now thinks of
this as a plain integer. You can then use a in your equation modulo g
def encodes:
s strs
if lens:
print 'Error, string too long.
return
return sumordsii for i in rangelens
def decoden:
n Integern
v
while n :
vappendchrn
n
return joinv
q
f
g
h modfqmodgq
e
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
