[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Is it desirable to prevent users from choosing their own circuits?
- To: or-talk@xxxxxxxxxxxxx
- Subject: Re: Is it desirable to prevent users from choosing their own circuits?
- From: Brian Mearns <bmearns@xxxxxxxx>
- Date: Fri, 2 Oct 2009 12:50:06 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: or-talk-outgoing@xxxxxxxx
- Delivered-to: or-talk@xxxxxxxx
- Delivery-date: Fri, 02 Oct 2009 12:56:03 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=bULaSqUNor7UGk0abbCMTPfUGeSjWSs5DqWDRVSX4/E=; b=pmVb6rrg0NwprjQVeA4NEspIpmQq0FlAQX5yGCiYDIVZvCyPci0I4kA31Kiu6JwXoB Zx4+zGHROZ9lBL+sM0NH4ELyivp3tS3P/U/MI+mRMTKnVaU/HwBYJ3exWV7bfdTzjZDY ltuAg5eIZ+pSjstA2+m4MbxsQIcg6+bk4raFE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=pwk2f+/2B1WNjXLAzKqmcRuK94ITYPlsJworJ4L/OjFknp88lBDxMceIwJyTQQneZp unk1O9Cb5ML329Tn/VzITZ2FtHF9jTbOmOGxA0I/pIk53tHA4mvXDevhpIBiDZm8GkNZ Rp1NYJHPTdid54lvIZw3BL4io7mB9Mx7vgU1Q=
- In-reply-to: <859144.5728.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- References: <4df3a1330910020605n20b28e2x9db176c28f6042cc@xxxxxxxxxxxxxx> <859144.5728.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-talk@xxxxxxxxxxxxx
On Fri, Oct 2, 2009 at 12:26 PM, Martin Fick <mogulguy@xxxxxxxxx> wrote:
> --- On Fri, 10/2/09, Brian Mearns <bmearns@xxxxxxxx> wrote:
>
>> > Perhaps I don't understand your suggestion, but how
>> > would a hash translate to a relay address? The
>> > maximum possible strength of a hash is related to the
>> > size of its address space, if this is limited to the
>> > number of relays available, it would be pretty weak.
>> > I would imagine that an 8 bit cpu is likely to be
>> > able to easily run through enough hash input
>> > combinations to get the address of any tor relay in
>> > the network, wouldn't they?
>> >
>> > -Martin
> ...
>
>> For instance, if the hash is 512 bits, but there are only
>> 1024 nodes in the list, is this as weak as a 10 bit hash?
>
> Yes. In fact, that would probably be the criteria
> of a "perfect" hash, wouldn't it? If not, your hash
> is biased, which has it's own set of problems. If
> the hash is biased, it is not an effective hash.
>
>
>> I don't think so. You seem to be suggesting that an
>> attacker (someone who wants to force a certain circuit)
>> could simply enumerate 1024 different input values
>> for the hash function, until they find the one that gives
>> them the node they want using the prescribed method of
>> selecting.
>
> Yes, or with a biased hash a few more combinations
> (even 10x more is not many more)
>
>> If the hash is strong, I don't believe (again,
>> not an expert on this) that there is any guarantee that
>> any particular set of 1024 different input values will
>> necessarily correspond to 1024 unique nodes.
>
> No guarantees, but that is the objective of a
> good hash. It is the criteria by which the
> hash is evaluated. A hash which simply returns
> the same value on each input is a bad hash, but
> it would make it hard to force a specific
> output if it were not that one value. :)
>
> ...
>> I actually decided to run some tests just now to
>> check on this. Using a 512 bit hash (SHA-512)
>> and a 1024 nodes, I enumerated through
>> some possible input values, starting with 0 and
>> just going up by 1 each time. Just taking the
>> hash mod 1024 to choose the nodes, I enumerated
>> the first 1024 input values and only selected
>> 640 unique nodes. Enumerating the first 2048 nodes
>> got me up to 72 unique nodes,
>
> I assume you meant ~720?
>
>> and enumerating 4096 got very close to all of them
>> at 1008 unique selections. Obviously, that did
>> significantly weaken the hash, but still not as weak
>> as a 10 bit hash.
>
> I think you proved my point. The "weakness" you
> are referring to is because your hash is biased.
>
>> Also, I was able to strengthen it slightly more just
>> by breaking the hash into upper and lower 256-bit
>> values, adding them together, and then taking the sum
>> modulus the number of nodes. It was only a slight
>> improvement, but it was also a simple and not very
>> well thought through modification. I'm guessing
>> that a smarter person that I could figure out a better
>> selection function.
>
> No, you did not strengthen it, you weakened it
> by further biasing it. If you had strengthened
> the hash, it would have been easier to get all
> 1024 values.
>
>
> The biasing will indeed make it harder to select
> certain nodes, but, of course, it will mean that
> the other nodes will be biased and easier to
> select. The more biasing, the more similar
> everyone's paths would be defeating the whole
> purpose of your proposal: randomness.
>
> It is an interesting idea to force randomness,
> and it might have value in some cases (?),
> but I do not think that this method could even
> approach it.
>
> Cheers,
>
> -Martin
[clip]
Thank you very much for the additional feedback. I hadn't really
considered that this was a criteria of a hashing function, but I guess
it makes sense: if it's biased when fairly mapped to a smaller domain,
it would be biased in the full domain as well. For what it's worth, I
was using SHA-512.
Interestingly, "Applied Cryptography" (by Bruce Schneier) briefly
discusses a distributed timestamping protocol that uses a hash of the
content to be stamped in order to select which nodes will provide the
stamp, the idea being that the requester can't simply choose to use
nodes he controls in order to forge the timestamp. The details are not
given, but it is mentioned that the hash is used to seed a PRNG, the
output of which is used to pick the nodes. I suppose this would suffer
from the same weakening effects of mapping the output into a smaller
domain. If there are only 2^N nodes to choose from, an attacker should
be able to get the one he wants by enumerating through about that many
different inputs. Of course, if he needs to choose 2 nodes, then I
guess he would need to enumerate through 2^(2N) input values to be
almost-guaranteed a hit (or maybe 2^(2N-1), since order doesn't
matter?) I suppose that's where the security comes from in that case.
Regards,
-Brian
--
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxxx with
unsubscribe or-talk in the body. http://archives.seul.org/or/talk/