Assignment: due Sunday, 11:59 pm

Add the file hashdsa.R to the R subdirectory of your project.

  1. This file includes a function miniSHA that imports the openssl package (which you need to install if you havenโ€™t already.) Unfortunately, there is a naming collision with the digest package that produces annoying warning messages. To make these messages go away, we need to fix aestools.R so that it only imports the function AES and not any other functions. To do this, change the line in aestools.R from
#' @import digest

to

#' @importFrom digest AES
  1. Implement birthdayAttack as specified. There is some advice in the slides about using the duplicated function.

  2. Implement the function setUpDSA as described in the documentation. This function should generate the DSA parameters \(q\) and \(p\) such that \(q \mid (p-1)\), \(q\) is an \(N\)-bit prime, and \(p\) is an \(L\)-bit prime. (Hint: find \(q\) first, then search for a suitable \(p\). If you use urand.bigz, make sure it is giving you the right size number.)