From c9e090818272174cf38de4d498d4e1bd6c7f4dd5 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 27 Oct 2003 21:53:02 +0000 Subject: Further work on SURBs. Decoding and further tests still required. --- src/org/noreply/fancydress/type3/SURB.java | 8 +++++--- .../fancydress/type3/routing/RoutingDestination.java | 17 +++++++++++++++++ .../noreply/fancydress/type3/routing/RoutingSMTP.java | 5 ++++- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/org/noreply/fancydress/type3/SURB.java b/src/org/noreply/fancydress/type3/SURB.java index 4ef8948..6733909 100644 --- a/src/org/noreply/fancydress/type3/SURB.java +++ b/src/org/noreply/fancydress/type3/SURB.java @@ -25,7 +25,7 @@ public class SURB extends SingleLeg { validateHash = CryptoPrimitives.hash(seed, secret, validate); } while (validateHash[validateHash.length-1] == 0); - byte[] key = Util.slice(CryptoPrimitives.hash(seed, secret, Util.toOctets("Generate")), 0,CryptoPrimitives.KEY_LEN); + byte[] key = Util.slice(CryptoPrimitives.hash(seed, secret, Util.toOctets("Generate")), 0, CryptoPrimitives.KEY_LEN); byte[] stream = CryptoPrimitives.prng(key, CryptoPrimitives.KEY_LEN*(hops.length + 1)); sharedSecret = Util.slice(stream, CryptoPrimitives.KEY_LEN*hops.length, CryptoPrimitives.KEY_LEN); @@ -33,6 +33,7 @@ public class SURB extends SingleLeg { for (int i=0; i