Can you please solve this in python? 2. Testing Encryption Validity Encryption is the process of converting
Fantastic news! We've Found the answer you've been seeking!
Question:
Can you please solve this in python?
Transcribed Image Text:
2. Testing Encryption Validity Encryption is the process of converting information algorithmically so that only a valid recipient can read the information before the end of its validity period. For a each encrypted message, we are given: • the instructionCount, i.e., the number of keys that a hijacker can test per second in order to try and crack the code Solve question 1eriod • a list of keys that can tested by the hijacker Leveraging this information, our goal is to determine if the hijacker can crack the code within its validity period. Each test will need return two items: 1. If the hijacker cracks the code within its validity period (1 if true, 0 if false) 2. The strength of the encryption (cf. further below to read about the definition of strength) The strength of the encryption is the number of keys that must be tested to break the encryption. It is defined as the product: dmax * 105, where dmax is the maximum number of divisors possible within the set of keys: • keys is a list of positive integers, keys[i], that act as keys. • the number of divisors (or divisibility) of an element is the number of elements in the set keys that are greater than 1 and are divisors of the element, i.e. element modulo divisor = 0. • the element m that has the maximum number of divisors in keys determines dmax Notes: • Any divisor of a key must be greater than 1. • The list may contain duplicates - e.g., if keys = [2, 4, 4], the strength is 3 * 105, as 4 can be divided by 2 and 4 respectively, so 4 has 3 divisors in the list of keys. 2. Testing Encryption Validity Encryption is the process of converting information algorithmically so that only a valid recipient can read the information before the end of its validity period. For a each encrypted message, we are given: • the instructionCount, i.e., the number of keys that a hijacker can test per second in order to try and crack the code Solve question 1eriod • a list of keys that can tested by the hijacker Leveraging this information, our goal is to determine if the hijacker can crack the code within its validity period. Each test will need return two items: 1. If the hijacker cracks the code within its validity period (1 if true, 0 if false) 2. The strength of the encryption (cf. further below to read about the definition of strength) The strength of the encryption is the number of keys that must be tested to break the encryption. It is defined as the product: dmax * 105, where dmax is the maximum number of divisors possible within the set of keys: • keys is a list of positive integers, keys[i], that act as keys. • the number of divisors (or divisibility) of an element is the number of elements in the set keys that are greater than 1 and are divisors of the element, i.e. element modulo divisor = 0. • the element m that has the maximum number of divisors in keys determines dmax Notes: • Any divisor of a key must be greater than 1. • The list may contain duplicates - e.g., if keys = [2, 4, 4], the strength is 3 * 105, as 4 can be divided by 2 and 4 respectively, so 4 has 3 divisors in the list of keys.
Expert Answer:
Answer rating: 100% (QA)
def cancrackcodeinstructionCount keys validityPeriod Find the maximum number ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these electrical engineering questions
-
Can you please solve the below question (Task 1)? Task 1: Numerical Solution of Differential Equations Solve the equations, dy dx dy dx = 2 sin(x) + y, y(0) = 1 = x + 3x + 2-2y, y(0) = -1 using...
-
Solve this in C++ asap! BookTester.cpp is given and cannot be modified. Require Book.h Book.cpp Chapter.hChapter.cpp BookTester.cpp #include#include#include"Chapter.h"#include"Book.h"using namespace...
-
: Write code in the next cell to do the following: 1. Asks the user for their first, middle, and last names and stores each in a new variable. 2. Computes the length of the name not including spaces...
-
How are the square numbers embedded in Pascals triangle?
-
Assume that Parker Fran has calculated a sampling interval for Tide Inc.s inventory of $ 10,000 and has conducted an examination of a sample of inventory balances. Fran has identified the following...
-
How many electrons does each of the following elements have in its outermost electron shell? (a) Magnesium (b) Molybdenum (c) Selenium
-
In 2016, a hacker tricked a Lamps Plus employee into disclosing the tax information of approximately 1,300 other employees, resulting in the filing of a fraudulent income tax return of Lamps Plus...
-
Madison Manufacturing is considering a new machine that costs $250,000 and would reduce pre-tax manufacturing costs by $90,000 annually. Madison would use the 3-year MACRS method to depreciate the...
-
Why is it important to learn SQL? In which jobs you need to know SQL? 2A- What is the definition of DML and DDL? Give examples in each case. 2B- Consider the following two tables below: VENDOR and...
-
Pizza Corporation acquired 80 percent ownership of Slice Products Company on January 1, 20X1, for $160,000. On that date, the fair value of the noncontrolling interest was $40,000, and Slice reported...
-
Dr. Max believes that environment is more important than genetics in influencing intelligence. He locates 12 pairs of identical twins that have been reared apart, one twin of each pair raised in an...
-
4) The linear measurements (length + width + height) for luggage carried onto an airplane is 45 inches. Find the dimensions of a rectangular suitcase of greatest volume that meets this request.
-
Also, as of January 1, 2020, Sauk Trail's computing equipment had a seven-year remaining estimated useful life. The patented technology was estimated to have a five-year remaining useful life. The...
-
Weekly Log I am Working in a hotel as a Manager( for reference just google what's the task would be done at hotel as MOD( manager on duty) or I have left my job description p[lease go throygh before...
-
Annotated Bibliography Research the academic literature and create annotated bibliography, with at least 4 academic sources found using EconLit or another database from the library. These sources...
-
5) Assume you have a drawer of Tupperware bowls and lids. There are 4 large bowls, 5 medium bowls, and 6 small bowls. There are 6 large lids, 8 medium lids and 5 small lids. Assume you randomly...
-
In each of the following scenarios, determine if the assets in these two countries are perfect substitutes or imperfect substitutes Country 1 interest Country 2 interest Expected exchange rate rate...
-
Which of the following is NOT a magnetic dipole when viewed from far away? a) A permanent bar magnet. b) Several circular loops of wire closely stacked together with the same current running in each...
-
Jim is fired from his job as a waiter and decides to take an extended trip to Europe. After touring Europe for 3 months, Jim returns to look for a new job as a waiter. Are his job-hunting expenses...
-
Ulysses and Penelope are married and file separate returns for 2012. Penelope itemizes her deductions on her return. Ulysses' adjusted gross income was $17,400, his itemized deductions were $2,250,...
-
Quince Corporation has taxable income of $450,000 for its 2012 calendar tax year. Calculate the corporation's income tax liability for 2012 before tax credits. $_________
-
Given the four criteria necessary for a sale to be complete, which of the following is not one of those conditions? 1. Delivery has occurred or services rendered. 2. Cash has been collected. 3. The...
-
What is the difference between a business and a pure charity? Between a business and a governmental agency?
-
Will reform have a greater impact on insurers or providers?
Study smarter with the SolutionInn App