Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Question
Chapter 32.2, Problem 4E
Program Plan Intro
To prove that there is at most one chance in 1000 that
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Suppose we are using a method of encryption that does as much as possible to hide any patterns of a file, including symbol frequencies. And suppose we also want to compress the same file. In terms of the compression performance (the size of compressed file), is it better to compress the file before encrypting it, or encrypt the file before compressing it? Briefly explain the reason
b.What is the maximum amount of time that it would take a computer that can test keys per second to carry out a brute-force attack on a file encrypted using 256-bit AES? Give your answer in seconds and years, using scientific notation, correct to 2 significant figures. You may assume a year is seconds and you may use a calculator to help work out the answer.
Show all your working clearly in a way that will help your tutor understand how you arrived at your answer.
Let the input size of a block cipher be 16 bits and the block cipher is used in the electronic code book (ECB) mode of operation. Suppose we have the following plaintext where all blocks are encrypted using the same key:
(02 34 67 88 02 34 44 AB 67 88 B0 3F)hex
i) Give an example of a ciphertext if the above plaintext is encrypted using the said block cipher.
ii) Let say the encrypted important file is stored in this scheme and each data record has a size of 16 bits. The records are not related to one another. Is ECB mode still appropriate in this scenario? Please state your reason.
Knowledge Booster
Similar questions
- I want Examples on el gamal cipher i want 2 Examples like this Example of ElGamal encryption Alice chooses pA = 107, α A = 2, dA = 67, and she computes β A = 267 ≡ 94 (mod 107). Her public key is ( pA, α A, β A) = (2,67,94), and her private key is dA = 67. Bob wants to send the message "B" (66 in ASCII) to Alice. He chooses a random integer k = 45 and encrypts M = 66 as (r, t) = ( αA k , βA kM) ≡ (245, 944566) ≡ (28, 9) (mod 107). He sends the encrypted message (28, 9) to Alice. Alice receives the message ( r, t) = (28, 9), and using her private key dA = 67 she decrypts to tr−dA = 9⋅28−67 ≡ 9⋅28106−67 ≡ 9⋅43 ≡ 66 (mod 107)arrow_forwardSuppose we will use Advanced Encryption Standard (AES) to encrypt a block of plaintext and the known round key for round 7 is: B5 8D BA D2 31 2B F5 60 7F 8D 29 2F EA D2 73 21 What is the third word (i.e. the third 4 bytes) of the round key for round 8?arrow_forwardLet's suppose, for the sake of simplicity, that 581132 is the position of a file block on the disc. What are your views and reactions to the content presented?arrow_forward
- Assume you are using any correct plaintext padding method, such as those described in lecture, with a 128-bit (16-byte) block cipher. If you are sending a message that is 184 bytes long, how many padding bytes would you need to add? Justify your answer. For the remaining questions, consider a 4-bit block cipher, described in hexadecimal by the following table: Plaintext Ciphertext Plaintext Ciphertext 0 a 8 e 1 c 9 d 2 f a 0 3 6 b 7 4 3 c 5 5 8 d b 6 4 e 9 7 2 f 1 You can think of this as a simple substitution cipher for hexadecimal digits. There is no “key” other than the table itself.arrow_forwardAssume that you have a suitable source of randomness which can produce at least 264264 random bits before it repeats. What is the easiest way to turn this into a stream cipher suitable for encrypting long streams of plaintext?arrow_forwardIn this problem we explore the relationship between password length and cryptographic security. Suppose a password consists of 1212 ASCII characters. You can review the ASCII characters here.. There are exactly 27=12827=128 ASCII characters; we will assume every character in the password is ASCII (non-printing characters are allowed). What is the size of the keyspace that consists of passwords of this form? ___What is the equivalent key length in bits? ___ Assuming that you could check one password every 10−710−7 seconds, what is the worst case running time for cracking this password by brute force search (in days)? ___ Now assume that the user used only 2828 characters from the keyboard. What is the key length in bits in this case? ___ How many days, in the worst case, would it take to break this weaker password? You can't round to the nearest day here -- be as exact as possible. ___ Supposing you used only 2828 characters, how long is the shortest password that achieves 249249 bits…arrow_forward
- Experimenting with AES-128 symmetric key cipher.using python PART 2: you will try to use "brute force" to decrypt an encrypted message, where you only have the first 96-bits of the 128-bit secret key (last 4 bytes of the secret key are missing!) The program should be called "findk", and should deal with two files that contain the encrypted text as a stream of bytes and the first 96-bits of the key, respectively. The program should print out on standard output the missing 4 bytes of the key in hexadecimal, the decrypted message and the time it took to find the correct key.o To test this part, here is the encrypted file (ciphertext2.dat), and the first 96-bits of the key (partial-key.dat) Hint: the original message starts with the word "Salam". Answer you provided .from Crypto.Cipher import AESdef revpad(s):"""This function is to remove padding.parameters:s:strstring to be reverse padded"""k = ord(s[-1])temp = 0 # temporary variable to check paddingfor i in range(1, k): # for loop to…arrow_forwardFor simplicity, let us assume that a file block is located at the address 581132 on the disc. What are your thoughts on this information?arrow_forwardA [answer] cipher is typically implemented by performing a AND mathematical operation at least two bytes at a time. A. stream B. DES C. key D. blockarrow_forward
- Suppose you have a text file containing 1 million lines of text, with each line containing 100 characters. What is the size of the file in bytes assuming that each character is encoded using ASCII?arrow_forwardExperimenting with AES-128 symmetric key cipher.using python please. PART 2: you will try to use "brute force" to decrypt an encrypted message, where you only have the first 96-bits of the 128-bit secret key (last 4 bytes of the secret key are missing!) The program should be called "findk", and should deal with two files that contain the encrypted text as a stream of bytes and the first 96-bits of the key, respectively. The program should print out on standard output the missing 4 bytes of the key in hexadecimal, the decrypted message and the time it took to find the correct key.o To test this part, here is the encrypted file (ciphertext2.dat), and the first 96-bits of the key (partial-key.dat) Hint: the original message starts with the word "Salam". partial key is b'\x01{:\xec<\x8e\xfc\x8b\x19\xf8#\xc0' ciphertext2 is…arrow_forwardExplain whether bit shiffting can be considered as a method to encrypt the file's content or to hide the file's content or both of them?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Principles of Information Systems (MindTap Course...Computer ScienceISBN:9781305971776Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781305971776
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning