Add the file hashdsa.R
to the R
subdirectory of your project.
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
Implement birthdayAttack
as specified. There is some
advice in the slides about using the duplicated
function.
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.)