Please create a python code that fulfills the following. I really need help. please at least assist if u are unable to answer the whole thing. Really means alot

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please create a python code that fulfills the following. I really need help. please at least assist if u are unable to answer the whole thing. Really means alot

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
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
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education