Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 2-2. Time-Memory-Tradeoff a) Hash chain reduction functions map hashes b

ID: 3839237 • Letter: P

Question

Problem 2-2. Time-Memory-Tradeoff

a) Hash chain reduction functions map hashes back into the pre-image space. Can there be collision of the reduction function output? I.e. is there an X and X0 such that R(X) = R(X0 )? Explain your answer.

(b) Assume that the pre-image space is 8 bytes of ASCII. Write the pseudo-code for a good reduction function R() in this problem scenario. Explain any relevant details of your function R().

(c) Assume that the pre-image space is 8 bytes (where each byte can take on any value, not just ASCII). Write the pseudo-code for a good reduction function R() in this problem scenario. Explain any relevant details of your function R().

Explanation / Answer

Pre image resistance is about the most basic property of a hash function it means:

For a given h in the out put space of the hash function. It is hard to find any message x with H(x)= h.

( note that the it is hard here and in the next definitions is not formally defined, but can be formalized by looking at families of hash functions with a security parameter ( often the hash out put size), and saying >> hard= there is no polynominal P so this can be done in time for all functions of the family <<. For particular uses, we are often only looking at a single hash functions and are content with >> hard= takes more times/costs then any hypothetical attacker can invest<<, pre ferably with some estimation of the work to be done)

A function with this property is also called one-way function.

A related property is the second pre image resistance:

For a given messagex1 it is hard to find a second message x2x1 with H(x1)=H(x2),

A function without preimage resistance is usually not a second pre image resistance:

Given a message x1, calculate h:=H(x1) and then get a pre image x2 from h1 then we usually have x1x2 and H(x1)=H(x2).

Collision resistance is an even harder property , which we still want for most usages of hash functions:

It is hard to find a pair of messages x1x2 with H(x1)=H(x2) of course from a pre image attack other direction doesn't work as easily , though some collision on attacks on broken hash functions seem to be extensible to be almost as useful as second pre image attacks.

(B). You can write ASCII tables using the ASCII. Write ( ) function. There is a lot of flexibility in the format of the input data to be written.

1) NumPy structured array or record array

2) Astropy table object.

3) sequence of sequences

4) Dist of sequences

As a first simple example read a comma-delimated table and then write it out as space-delimated:

Table=" " "

Col 1, col 2, col 3

1, hellow world , 2.5

3, again 5.0 " " "

dat= ascii. read (table)

We can use a different column delimeter: ASCII. Write ( dat, sys, stout, delimeter= ' 1atex')

As a final ecample, imagine you've gathered basic information about 5 galaxies which you want to write as an ASCII table you could just use pure python file I/o but then you may need to be care full about quoting and formating

Types= [ ' barred spiral' , ' spiral' , ' peculiar ( ring)' , ' elliptical' , ' elliptical']

red shirts = np. array [ 0.024221, 0.132, 0.22, o.34, 0.45])

Lums= np.array( [1e40, 1.2e40, 2e40, 3e40,4e40])

Table={ ' type' : types, ' red shift' : redshifts, ' Lum': Lums}

Ascii. Write ( table, ' galaxies. dat', formals = { ' red shift': ' 5f', ' Lums': ' . 2e'})

Cat galaxies. dat.

(C).... the RSA algorithm is named after Rom Rivest , Adi shamir and len atleman who invented in 1977. The basic technique was first discovered in 1973 by Clifford cocks of CESG but this was a secrete until 1997. The patent taken out by RSA labs has expired.

The RSA cryptosystem is most widely used public key cryptography algorithm in the world.

The RSA algorithm can be used for both public key encryption and digital signatures its security is based on the difficulty of factoring large integers .

Part A can send an encrypted message to party B without any prior exchange of secret keys.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote