Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program which implements the Caesar cipher. It is required that the encryption and decryption algorithms in your implementation will use the functions implemented

Write a program which implements the Caesar cipher. It is required that the encryption and decryption algorithms in your implementation will use the functions implemented in Question 2. Your submission must include the code of your program as well as screenshots showing three test runs for the plaintext back and the values of key 3,5,19.c)
24+14=(mod26)
24+14=38
38-261=38-26=12
Therefore, 24+14-=12(mod26)
[15 points =5 points per item]
[Modular arithmetic: implementation] Write a program
which implements a modular addition and a modular
subtraction. For simplicity, you may fix the modulus to be 26.
A modular addition will be implemented as a function
m_add(a,b) which take integers "a" and "b" as inputs and
outputs
a+b(mod26). For simplicity, you may assume that ,
1,dots,25. Similarly, a function m?sub(a,b) will implement a
b (mod 26). Your submission must include the code of your
program (enclosed as a separate file) as well as screenshots
(included into the homework report) showing test runs for the
values from Question 1 items (b) and (c).
[40 points: 20 points per function]
[Caesar cipher: implementation] Write a program which
implements the Caesar cipher. It is required that the
encryption and decryption algorithms in your implementation
will use the functions implemented in Question 2. Your
submission must include the code of your program as well as
screenshots showing three test runs for the plaintext "back"
and the values of key 3,5,19.
[15 points]
[Exclusive-OR using modular arithmetic] Let us consider a
representation of the Exclusive-OR (XOR) function using
modular arithmetic. Compute the following:
a)1+1=(mod2)
Explanation:
1+1=2
2-12=2-2=0
Therefore: 1+1=0(mod2). This result aligns with the
behavior of the XOR function, where the sum of two
equal bits is 0.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Describe the factors that lead to productive conflict

Answered: 1 week ago