Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using python 6. Some substitution cipher for the digits 0, 1,2,3, , 9 substitutes each digit in 0, 1, 2, 3, .. . .9 with

Using python

image text in transcribed

6. Some substitution cipher for the digits 0, 1,2,3, , 9 substitutes each digit in 0, 1, 2, 3, .. . .9 with another digit in 0, 1, 2. 3. . . . , 9. It can be represented as a 10-digit string specifying how each digit in 0, 1, 2, 3. . . . , 9 is substituted. For example, the 10-digit string 3941068257' specifies a substitution cipher in which digit 0 is substituted with digit 3, 1 with 9, 2 with 4, and so on. To encrypt a nonnegative integer, substitute each of its digits with the digit specified by the encryption key. Implement function encrypt()that takes as input a 10-digit string key and a digit string .e., the clear text to be encrypted) and returns the encryption of the clear text >encrypt(3941068257', 132) 914 >>encrypt(3941068257, 111')

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

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions