Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. A grayscale image with depth d is a two-dimensional array whose entries are in {0,...,d-1}. For example, the following image T has depth 4.

image text in transcribedimage text in transcribedimage text in transcribed

3. A grayscale image with depth d is a two-dimensional array whose entries are in {0,...,d-1}. For example, the following image T has depth 4. 2 T = 0 0 2 1 0 0 2 3 3 3 2 1 plaintext 0 cyphertext 3 1 1 3 2 C= 3 3 0 1 3 3 0 2 2 2 0 1 0 When the plaintext image T is encrypted with a substitution cypher whose key is displayed in the center table, the result is the cyphertext image C, displayed on the right. The images A.png (depth 32), B.png (depth 64), C.png (depth 128), D.png (depth 256) contain grayscale images that have been encrypted with a simple substitution cypher; the keys are unknown. A.png (32 colors, scaled) B.png (64 colors, scaled) C.png (128 colors, scaled) D.png (256 colors, scaled) (a) Find a formula for the size of the keyspace for a substitution cypher on an image with depth d. If a computer can check 1 million keys per second, how many years would it take to decrypt A.png and D.png? (b) Write some efficient code that breaks this cryptosystem, and use your code to decrypt the given images without knowledge of the key. The python template file im_sub_cypher.py contains some routines used to encrypt, decrypt, and save image files. To use the tem- plate, you will need the common python packages numpy and the Python Image Library. Note: you will probably need to test and debug your code on images that you encrypt and for which you know the encryption key. Hint: when designing your algorithm, exploit that nearby pixels are likely to have similar brightness levels. (c) Describe in English how your algorithm works. (d) Provide your source code. (e) Give the 4 plaintext images that your algorithm produces when running on the given files A.png (depth 32), B.png (depth 64), C.png (depth 128), and D.png (depth 256)

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

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

questions surrounding dividends policy

Answered: 1 week ago

Question

1. In taxonomy which are the factors to be studied ?

Answered: 1 week ago

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago

Question

Name is needed for identifying organisms ?

Answered: 1 week ago