atakoute_CS3626_Assignment04
.docx
keyboard_arrow_up
School
Kennesaw State University *
*We aren’t endorsed by this school
Course
3626
Subject
Computer Science
Date
Apr 3, 2024
Type
docx
Pages
9
Uploaded by PresidentMooseMaster1069
-
1
-
CS3626 Homework 04 Spring 2024
AES
Total Points: 25
Be as brief as possible and use your own words when describing concepts. SHOW ALL
WORK for Questions requiring calculations and algorithms.
Q-1: Calculate the following polynomial operations over a m(x), GF(2^x) where a
i
∈
GF(2) given m(x) Given these polynomials where:
A = x
7
+ x
6
+ 0 + x
4
+ 0 + x
2
+ 0 + x
0
B = x
6
+ x
5
+ 0 + 0 + 0 + 0 + x
0
m(x) = x
8
+ 0 + 0 + 0 + x
4
+ x
3
+ 0 + x
1
+ x
0
a
i
operations are modulo-2 math.
Calculate the operations below; show the setup and operation steps and result, remember they are over m(x):
-
2
-
A mod B
2*A + 3*B + (A* B) + (A+B) =
// recall the shortcut of 3*A = A + 2*A = A + (A << 1) over m(x)
// you already have A*B and A+B from above
-
3
-
Use Extended Euclidean on the pair ( m(x), A) to find the modular inverse A
-1
.
5 points
-
4
-
Q-2: Build the 4x4 State box from the following 128-bit plain text input:
Input = 4e 6f 20 6d 6f 72 65 20 73 65 63 72 65 74 73 2e
1 point
Q-3: Take the above state box convert the state box values by applying each byte to the AES-SBOX. What is the new state box result?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
The compass gradient operators of size 3x3 are designed to measure gradients of edges oriented in eight directions: E, NE, N, NW, W, SW, S, and SE. i) Give the form of these eight operators using coefficients valued 0, 1 or – 1. ii) Specify the gradient vector direction of each mask, keeping in mind that the gradient direction is orthogonal to the edge direction.
arrow_forward
QUADRATIC PRIMES
This question is adopted from Project Euler Question 27. (https://projecteuler.net/problem=27)
The quadratic formula n^2 + n + 41 will produce 40 primes for consecutive integer values 0 <= n <= 39. However, when n = 40, this formula will not generate a prime number.
Another interesting quadratic formula n^2 – 79n + 1601 produces 80 prime numbers for consecutive values 0 <= n <= 79.
The Question: find a and b such that when -999 <= a <= 999 and -1000 <= b <= 1000, the quadratic form ?^2 + ? × ? + ? produces the maximum number of primes for consecutive values of n, starting with n = 0.
Requirement:
MUST BE WRITTEN IN C++
- Print the 40 primes generated by formula n 2 + n + 41
- Print the 80 primes generated by formula n 2 – 79n + 1601
- Write a function that takes in an integer and returns whether the given number is prime or not.
- Output the value of a, b and how many consecutive values of n (count the starting zero!) can be generated.
- Submit…
arrow_forward
1.
Let Xi, i = 1, 2,. ..., n + 1 different nodes and let yį € R, i = 1,2, . ,n+ 1. The
interpolating polynomial is written in Newton's form as:
Pn(x) = a₁ + a₂(x − x₁) + a3(x − x₁)(x − x2) +
·+an+1(x-x₁)... (x - xn+1),
where the coefficients a¿, i = 1, ..., n + 1 can be computed using the following algorithm:
Algorithm 1 Newton's polynomial
aiyi, i = 1,2,...,n+1
for k= 2: n + 1 do
for i=1: k- 1 do
ak = = (ak — α₂)/(xk — xi)
end for
end for
If the coefficients ai, i = 1,..., n +1 are known, then the value of the interpolating polynomial at
the point z can be computed using Horner's formula:
Algorithm 2 Horner's formula
S = an+1
for in-1:1 do
s = a₁ + (2x₁) s
end for
Pn (2) =
= S
Remark: It is noted that in the loop conditions i= a: b:c of the previous pseudo-codes a is the
starting value, b is the step and c is the last value.
(a)
Write PYTHON 's functions coefs and evalp implementing the previously described
algorithms for the coefficients of the interpolating polynomial and it's…
arrow_forward
NOTE: The algorithm should be written in pseudo code, (explanation of the algorithm rather than code)
arrow_forward
Correct answer will be upvoted else downvoted. Computer science.
Positive integer x is called divisor of positive integer y, in case y is distinguishable by x without remaining portion. For instance, 1 is a divisor of 7 and 3 isn't divisor of 8.
We gave you an integer d and requested that you track down the littlest positive integer a, to such an extent that
a has no less than 4 divisors;
contrast between any two divisors of an is essentially d.
Input
The primary line contains a solitary integer t (1≤t≤3000) — the number of experiments.
The primary line of each experiment contains a solitary integer d (1≤d≤10000).
Output
For each experiment print one integer a — the response for this experiment.
arrow_forward
You are the chief commander of US Army; you have been deployed in an ongoing war training of defusing the mine. Mines are placed on the ground which can be considered as a gird of size N*M. Each block (i, j) has a mine in it if and only if the summation of the block coordinates is divisible by 2. Your task is to move from the first row to the last row. The mines will not blow if the given rules are followed:
• If you are on even row you can move to any cell that is in the neighborhood
• If you are on odd row, you can only go the odd row that has mine on that and same with the unmined row.
You have to develop a python program to calculate the number of ways to reach row number N starting from row number 1.
Test Cases:
4 8
Output:
10
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Related Questions
- The compass gradient operators of size 3x3 are designed to measure gradients of edges oriented in eight directions: E, NE, N, NW, W, SW, S, and SE. i) Give the form of these eight operators using coefficients valued 0, 1 or – 1. ii) Specify the gradient vector direction of each mask, keeping in mind that the gradient direction is orthogonal to the edge direction.arrow_forwardQUADRATIC PRIMES This question is adopted from Project Euler Question 27. (https://projecteuler.net/problem=27) The quadratic formula n^2 + n + 41 will produce 40 primes for consecutive integer values 0 <= n <= 39. However, when n = 40, this formula will not generate a prime number. Another interesting quadratic formula n^2 – 79n + 1601 produces 80 prime numbers for consecutive values 0 <= n <= 79. The Question: find a and b such that when -999 <= a <= 999 and -1000 <= b <= 1000, the quadratic form ?^2 + ? × ? + ? produces the maximum number of primes for consecutive values of n, starting with n = 0. Requirement: MUST BE WRITTEN IN C++ - Print the 40 primes generated by formula n 2 + n + 41 - Print the 80 primes generated by formula n 2 – 79n + 1601 - Write a function that takes in an integer and returns whether the given number is prime or not. - Output the value of a, b and how many consecutive values of n (count the starting zero!) can be generated. - Submit…arrow_forward1. Let Xi, i = 1, 2,. ..., n + 1 different nodes and let yį € R, i = 1,2, . ,n+ 1. The interpolating polynomial is written in Newton's form as: Pn(x) = a₁ + a₂(x − x₁) + a3(x − x₁)(x − x2) + ·+an+1(x-x₁)... (x - xn+1), where the coefficients a¿, i = 1, ..., n + 1 can be computed using the following algorithm: Algorithm 1 Newton's polynomial aiyi, i = 1,2,...,n+1 for k= 2: n + 1 do for i=1: k- 1 do ak = = (ak — α₂)/(xk — xi) end for end for If the coefficients ai, i = 1,..., n +1 are known, then the value of the interpolating polynomial at the point z can be computed using Horner's formula: Algorithm 2 Horner's formula S = an+1 for in-1:1 do s = a₁ + (2x₁) s end for Pn (2) = = S Remark: It is noted that in the loop conditions i= a: b:c of the previous pseudo-codes a is the starting value, b is the step and c is the last value. (a) Write PYTHON 's functions coefs and evalp implementing the previously described algorithms for the coefficients of the interpolating polynomial and it's…arrow_forward
- NOTE: The algorithm should be written in pseudo code, (explanation of the algorithm rather than code)arrow_forwardCorrect answer will be upvoted else downvoted. Computer science. Positive integer x is called divisor of positive integer y, in case y is distinguishable by x without remaining portion. For instance, 1 is a divisor of 7 and 3 isn't divisor of 8. We gave you an integer d and requested that you track down the littlest positive integer a, to such an extent that a has no less than 4 divisors; contrast between any two divisors of an is essentially d. Input The primary line contains a solitary integer t (1≤t≤3000) — the number of experiments. The primary line of each experiment contains a solitary integer d (1≤d≤10000). Output For each experiment print one integer a — the response for this experiment.arrow_forwardYou are the chief commander of US Army; you have been deployed in an ongoing war training of defusing the mine. Mines are placed on the ground which can be considered as a gird of size N*M. Each block (i, j) has a mine in it if and only if the summation of the block coordinates is divisible by 2. Your task is to move from the first row to the last row. The mines will not blow if the given rules are followed: • If you are on even row you can move to any cell that is in the neighborhood • If you are on odd row, you can only go the odd row that has mine on that and same with the unmined row. You have to develop a python program to calculate the number of ways to reach row number N starting from row number 1. Test Cases: 4 8 Output: 10arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr