Homework 3 Solution

Part 1: Written Problems For polynomial arithmetic with coefficients in Z11 , perform the following calculations. (x2 + 2x + 9 )(x3 + 11×2 + x + 7 ) (8×2 + 3x + 2 )(5×2 + 6 ) Determine which of the following polynomials are reducible over GF(2). x2 + 1 x2 + x +…

Description

5/5 – (2 votes)

Part 1: Written Problems

  1. For polynomial arithmetic with coefficients in Z11 , perform the following calculations.

(x2 + 2x + 9 )(x3 + 11x2 + x + 7 )

    1. (8x2 + 3x + 2 )(5x2 + 6 )

  1. Determine which of the following polynomials are reducible over GF(2).

    1. x2 + 1

    1. x2 + x + 1

    1. x4 + x + 1

  1. Determine the gcd of the following pairs of polynomials. (x4+ 8x3 + 7x + 8) and (2x3 + 9x2 + 10x + 1) over GF(11)

  1. Develop a set of tables similar to Table 5.3 for GF(3) with m(x) = x2 + x + 1.

  1. In the discussion of MixColumns and InvMixColumns, it was stated that

b(x) = a1(x) mod (x4 + 1), where a(x) = {03}x3 + {01}x2 + {01}x + {02} and b(x) = {0B}x3 + {0D}x2 + {09}x +{0E.} Show that this is true.

  1. Given the plaintext {0F0E 0D0C 0B0A 0908 0706 0504 0302 0100} and the key {0202 0202 0202 0202 0202 0202 0202 0202}:

    1. Show the original contents of State, displayed as a 4 × 4 matrix.

    1. Show the value of State after initial AddRoundKey.

    1. Show the value of State after SubBytes.

    1. Show the value of State after ShiftRows.

    1. Show the value of State after MixColumns.

Part 2: Programming Problem

This programming problem is to use an AES library to encode messages in various modes and padding methods. The purpose is to get familiar with the parameter setting and function calls. You can use either OpenSSL or Crypto++. Please find the related library information and examples on the Internet.

  1. Encrypt the message (in ASCII)

AES is efficient in both software and hardware.

by the key “1234567890123456” (ASCII) and the following specifications.

Mode

Initial Vector (IV)

Output format

Padding method (see

Wiki Padding for details)

ECB

Hex

Zeros Padding

ECB

Hex

PKCS#7

CBC

0000 0000 0000 0000 (ASCII)

Hex

Zeros Padding

CBC

0000 0000 0000 0000 (ASCII)

Hex

PKCS#7

  1. Test data: Plaintext = “Hello World!” by the above specification.

    1. ECB, Zeros Padding 2e98 68aa 6eae 7218 4b4a 8881 f3df b26b

    2. ECB, PKCS Padding 6f36 4e3f 45c8 7893 0e1d 88be 8458 3a32 a1f3 2c84 be35 5e41 ba35 0faf e9b6 b001

    1. CBC, Zeros Padding ddc1 94e6 d0f1 85ae 03a0 4dd4 1504 35b4

    2. CBC, PKCS Padding 8fed aeca 2fe9 fa8a 9f35 0468 0258 e80c

817b c015 a162 57ff 845b fa0c 4dc2 fcbb

  1. Submission: you need to upload two files

    1. ase-modes.cpp or aes-modes.c: the program of generating the answers.

    1. Out.txt: 4 ciphertexts separated by empty lines.

IV. On-site test: Will announce the venue and schedule later. The problem is to use your programs to decrypt some ciphertexts on the spot.

Homework 3 Solution