
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Please Pleas Please Please help and create a simple python

Transcribed Image Text:Write a Python script that implements the CHF (the Casual Hash Function.)
The input data should be split into blocks of 32 bits. If the last block is smaller than 32 bits, the remaining bits should be filled with 1 followed by as many zeros as required.
A and B are 2 buffers with specific values (see below). Each block in the message should be combined as shown in the image below.
All resulting blocks (i.e. FB|) should be combined with "&" to produce the digest.
The size of the digest is 64 bits.
Calculate the digest for the string:
"Alright, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, the fresh-water system, and public health, what have the Romans ever done for us?"
CHF – The Casual Hash Function
For each M, where M; is a block in M
padding
M =
100...
32 bits
32 bits
32 bits
32 bits
A =
Ox67452301
32 bits
B =
Oxefcdab89
32 bits
A if i is even
FB =
%3D
B if i is odd
64 bits
Digest = FB, & FB2 & FB3 & ...
%3D
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

Knowledge Booster
Similar questions
- I need this in Python please and thank youarrow_forward2 – Python program to prompt the user to enter the grades of 5 subjects (out of 100 points) and calculate the percentage of those grades. Finally, display the corresponding grades with respect to the marks obtained by the following criteria: a - 90 and above – A b – 80 to 89 – B c – 70 – 79 – C d – 60 – 69 – D e – 50 – 59 - E f – below 50 – Farrow_forwardSummary In this lab, you complete the Python program that calculates the amount of tax withheld from an employee’s weekly salary, the tax deduction to which the employee is entitled for each dependent, and the employee’s take-home pay. The program output includes state tax withheld, federal tax withheld, dependent tax deductions, salary, and take-home pay. Instructions Some variables have been assigned for you and the output statements have been written. Read the starting code carefully before you proceed to the next step. Write the Python code needed to perform the following: Calculate state withholding tax (stateTax) at 6.5 percent Calculate federal withholding tax (federalTax) at 28.0 percent. Calculate dependent deductions (dependentDeduction) at 2.5 percent of the employee’s salary for each dependent. Calculate total withholding (totalWithholding) as stateTax + federalTax + dependentDeduction. Calculate take-home pay (takeHomePay) as salary - totalWithholding Execute the…arrow_forward
- Create a program that calculates the amount of federal tax you will have to pay depending on a given salary. Hint: The second tax bracket does not mean you pay 20.5% on ALL of your income! https://www.moneysense.ca/save/tax-brackets-canada-provinces-2020/ need the answer in pythonarrow_forward11 - Python program in which Smith deposits $45,000 at a bank at an interest rate of 12.5% per year. How much interest will he earn at the end of 5 years? (Search the formula for simple interest).(Python code)arrow_forwardNote: It`s pythonarrow_forward
- IN PYTHON Please! Suppose you deposit $100 into a savings account, and it accumulates at 6% interest compounded annually. Write a program to determine how long it takes (in years) to become a millionaire.arrow_forwardAbout beginner python programming: - Imagine that you want to send a congratulations message and would like to repeat those congratulations many timestimes in the message. Something like “Happy Birthday!! Happy Birthday!! Happy Birthday!! ..." until fullyour friend's screen. You can write once and copy and paste. Then you notice, there in the middleof the way, that you typed wrong...Ouch! Now that you know how to use Python to make it work for you,do a function that receives as input a text and the desired number of repetitions and returns astring composed of n repetitions of this text. - so I know how to input a specific word in python and multiply it by a number but not how to input a string as a variable (which can be any word, text, expression) and multiply it.arrow_forwardWrite a python program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses. Thanks so much for your help!arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY