Upload to Canvas a PDF of your work for the following problems.
library(openssl)
m1 <- "Oh, say, can you see, By the dawn's early light, What so proudly we hailed At the twilight's last gleaming? Whose broad stripes and bright stars, Through the perilous fight, O'er the ramparts we watched, Were so gallantly streaming?"
m2 <- "Oh, say, can you see, By the dawn's early light, What so proudly we hailed At the twilight's last gleaming? Whose broad stripes and bright stars, Through the perilous night, O'er the ramparts we watched, Were so gallantly streaming?"
sum(rawToBits(xor(as.raw(sha256(charToRaw(m1))), as.raw(sha256(charToRaw(m2))))) != rawToBits(as.raw(0)))
## [1] 135
miniSHA
that produces a 32-bit
hash.
miniSHA
that has a probability of 0.25
of succeeding? (Use the Birthday Theorem.)miniSHA
that has a probability of 0.99
of succeeding? (Use the Birthday Theorem.)miniSHA
hash, calculate the probability
of finding a nonce on the first try that produces a hash of all zeroes.
Then use that result to calculate the number of tries it would take to
have a probability of 0.99 of finding such a nonce. (Compare your answer
to 2d, and note that it should be different.)