1.1 Let S = {01, 10, 11}. Note that S is a set of 2-bit strings with string 00 missing. Consider the following three One-Time Pad (OTP) variants. For each of these OTP variants state whether the resulting cipher is perfectly secure or not, and prove your answer. In other words, if your answer is “yes”, prove that the cipher passes Shannon’s perfect secrecy criterion, and if your answer is “no” then show that the cipher fails this criterion. In each case below the encryption and decryption procedures are as in OTP, i.e. encryption outputs a bitwise xor of the key and the message and decryption outputs a bitwise xor of the key and the ciphertext.
(a) Let M = S and K = {0, 1}^2. In other words, the message and the key are both 2-bit strings, but not every 2-bit string is a valid message.
(b) Let M = {0, 1}^2 and K = S
(c) Let M = K = S.
1.2 Are the sizes (i.e. cardinalities) of the key space and the message space in the above three cases correlated with whether or not the cipher is secure? Explain how and why.

2. 9 marks] Strings. Consider the following definitions on strings Let U be the set of all strings Let s be a string. The length or size of a string, denoted Is, is the number of characters in s Let s be a string, and i e N such that 0 < ί < sl. We write s[i] to represent the character of s at index i, where indexing starts at 0 (so s 0] is the first character, and...
2. 9 marks] Strings. Consider the following definitions on strings Let U be the set of all strings. Let s be a string. The length or size of a string, denoted Is, is the number of characters in s Let s be a string, and ie N such that 0 Si< Is. We write si] to represent the character of s at index i, where indexing starts at 0 (so s(0 is the first character, and s|s -1 is the...
Let Σ = {0, 1). (a) Give a recursive definition of Σ., the set of strings from the alphabet Σ. (b) Prove that for every n E N there are 2" strings of length n in '. (c) Give a recursive definition of I(s), the length of a string s E Σ For a bitstring s, let O(s) and I(s) be number of zeroes and ones, respectively, that occur in s. So for example if s = 01001, then 0(s)...
nonlinear. Here we want you to verify this property by computing the output of S, for the following two pairs of inputs. The S-box S is given as follows: 0-6. (10 points) One important property which makes DES secure is that the S-Boxes are S-box S S0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 14 04 13 01 02 15 11 08 03 10 06 12 05 09 00 07 1...
the w 2. This problem explores the use of a one-time pad version of t In this scheme, the key is a stream of random numbers between 0 and example, if the key is 3 19 5..., then the first letter of plaintext is encrypted with a shift of 3 letters, the second with a shift of 19 letters, the third with a shift of 5 letters, and so on. a. Encrypt the plaintext sendmoremoney with the key stream 9...
1. (2 marks) Let S 2,3,4,5,6,7,8,9, 10, 11, 12). Let r be the relation on the set S defined as follows: Va,bE S, arb if and only if every prime number that divides a is a factor of b and a S b. The relation T is a partial order relation (you do not need to prove this). Draw the Hasse diagram for T
1. (2 marks) Let S 2,3,4,5,6,7,8,9, 10, 11, 12). Let r be the relation on the...
**DO IT AS PYTHON PLEASE**
The Trifid Cipher General Problem Description The Trifid cipher (not to be confused with the creatures from the classic science-fiction film "The Day of the Triffids") is an algorithm that enciphers a plaintext message by encoding each letter as a three-digit number and then breaking up and rearranging the digits from each letter's encoded form. For this assignment, you will create a set of Python functions that can encode messages using this cipher (these functions...
Note wordBank, an array of 10 strings (char *s). Your program
should do the
following:
1. Select a word at random from the wordBank. This is done for
you.
2. On each turn display the word, with letters not yet guessed
showing as *'s,
and letters that have been guessed showing in their correct
location
3. The user should have 10 attempts (?lives?). Each unsuccessful
guess costs
one attempt. Successful guesses do NOT count as a turn.
4. You must...
"For two thousand years, codemakers have fought to preserve secrets while codebreakers have tried their best to reveal them." - taken from Code Book, The Evolution of Secrecy from Mary, Queen of Scots to Quantum Cryptography by Simon Singh.The idea for this machine problem came from this book.You will encrypt and decrypt some messages using a simplified version of a code in the book. The convention in cryptography is to write the plain text in lower case letters and the encrypted text in upper case...
****************************************************************************************************************8
I want it same as the output and with details please and
comments
"For two thousand years, codemakers have fought to preserve
secrets while codebreakers have tried their best to reveal them." -
taken from Code Book, The Evolution of Secrecy from Mary, Queen of
Scots to Quantum Cryptography by Simon Singh.
The idea for this machine problem came from this book.You will
encrypt and decrypt some messages using a simplified version of a
code in the book. The...