From 594e3c0ebccbf9a69fb7c1923c5801907b11618f Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sun, 6 Oct 2013 09:18:08 +0200 Subject: [PATCH] algos_enc: clarify padding checks --- src/algos_enc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/algos_enc.cpp b/src/algos_enc.cpp index cfbee2e..5a0a224 100644 --- a/src/algos_enc.cpp +++ b/src/algos_enc.cpp @@ -201,7 +201,10 @@ static bool message_unpad (std::vector in, bvector&out, uint in_end = in.size() - padsize_end - 1; in.resize (in_end); - //check if padding was really okay (TODO is it necessary?) + /* check if padding was really okay. Note that it is not necessary + * since the padded message is "already checked" for mangling by F-O + * padding. This is only a check that sender uses the same valid + * padding method as we do. */ byte check_begin, check_end; msg_pad_length (in, check_begin, check_end, pad_hash); if (padsize_begin != check_begin || padsize_end != check_end)