From: Ummon Date: Tue, 9 Dec 2014 20:22:17 +0000 (+0100) Subject: Ciphertext length was wrong. X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=96cd30efb6e215aec86803cc2a5f0a601930be1d;p=crypto_lab2.git Ciphertext length was wrong. --- diff --git a/labo2-fsharp/CryptoFileTests/Tests.fs b/labo2-fsharp/CryptoFileTests/Tests.fs index aeea186..03b5c4a 100644 --- a/labo2-fsharp/CryptoFileTests/Tests.fs +++ b/labo2-fsharp/CryptoFileTests/Tests.fs @@ -72,7 +72,7 @@ let doSomeTests () = | error -> assert (error :? UnableToDecryptKeys) printfn "" - let cyphertextLength = (int (FileInfo (cipherFilename)).Length) + API.hmacSize + API.signatureSize + API.keysSize + let cyphertextLength = (int (FileInfo (cipherFilename)).Length) - API.hmacSize - API.signatureSize - API.keysSize printfn "== Altering the cyphertext... (%d bytes)" cyphertextLength for i in 0 .. cyphertextLength do printf "." @@ -88,4 +88,4 @@ let doSomeTests () = File.Delete cipherFilename File.Delete plainFilename - printfn "===== API tests OK" + printfn "===== API tests OK" \ No newline at end of file diff --git a/rapport/main.tex b/rapport/main.tex index ea69801..e2c1e81 100644 --- a/rapport/main.tex +++ b/rapport/main.tex @@ -97,7 +97,7 @@ Concerne les clefs externes à l'\emph{API}. \begin{itemize} \item Une paire de clefs \emph{RSA-3072} pour la signature. - \item Une paire de clefs \emph{RSA-3072} pour le chiffrement des clefs \emph{AES}. + \item Une paire de clefs \emph{RSA-3072} pour le chiffrement des clefs \emph{AES} et \emph{HMAC}. \end{itemize}