From 96cd30efb6e215aec86803cc2a5f0a601930be1d Mon Sep 17 00:00:00 2001 From: Ummon Date: Tue, 9 Dec 2014 21:22:17 +0100 Subject: [PATCH] Ciphertext length was wrong. --- labo2-fsharp/CryptoFileTests/Tests.fs | 4 ++-- rapport/main.tex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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} -- 2.43.0