From 7c1ee9ce876a3ee4e6dbafd783f68c59ad650604 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Thu, 31 Dec 2015 17:46:18 +0000 Subject: [PATCH] Restored accidentally deleted javadoc. --- briar-core/src/org/briarproject/crypto/DoubleDigest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/briar-core/src/org/briarproject/crypto/DoubleDigest.java b/briar-core/src/org/briarproject/crypto/DoubleDigest.java index a8670a217..1d1fdd99d 100644 --- a/briar-core/src/org/briarproject/crypto/DoubleDigest.java +++ b/briar-core/src/org/briarproject/crypto/DoubleDigest.java @@ -3,6 +3,15 @@ package org.briarproject.crypto; import org.briarproject.api.crypto.MessageDigest; import org.spongycastle.crypto.Digest; +/** + * A message digest that prevents length extension attacks - see Ferguson and + * Schneier, Practical Cryptography, chapter 6. + *

+ * "Let h be an interative hash function. The hash function hd is + * defined by hd := h(h(m)), and has a claimed security level of + * min(k, n/2) where k is the security level of h and n is the size of the hash + * result." + */ class DoubleDigest implements MessageDigest { private final Digest delegate;