» lets.coozi.com.au (downloads | tools i use) ... beware the tiger ...


0 1 0
0 0 1
1 1 1
{michaelslists}at<gmail.com> | rss
welcome to silkyblog | Search:
Hi.

About:
» Noon Silk

adriana 26

adriana 1

adriana 2

adriana 3

adriana 4

adriana 5

adriana 6



adriana 91

Links: del.icio.us api is screwing us. Go here for the list.

adriana 18

adriana 20

adriana 24

adriana 23

» Hashcash

Signature: <placeholder>

Posted on the 25 November 2007, by Noon Silk

Brief overview of hashcash[1].

So now that you've reviewed that, let's talk about what I've done here. Basically we are taking the difficult problem of factorisation and applying it to some common problems. Those are: comment spam, and bruce force spamming/authentication attempts.

What I do in this specific case is:

1 - Take two 22-bit primes, p1 & p2
2 - Multiply these two to get a result: r
3 - Send this number "r" to the client-side javascript
4 - Force the javascript to factor this number back into p1 and p2
5 - Send the factored p1 and p2 and compare with the original factors

If this process succeeds, the post is accepted. If it doesn't it is rejected. I.e. if the client doesn't spend the time (a matter of seconds, because p1 and p2 are so small) then they don't get to post the message, or attempt the login.

And that's pretty much all there is to it. I utilised the javascript code found here[3] as the basis for the javascript factorisation and the BigInteger class for c# found here[4] for the prime number generation.

There will be a few more additions to my own implementation as time goes on; like a requirement that one of these problems be solved before another can be requested (for a given client); to prevent multiple "solvings" in an "out-of-order" sort of mode. And maybe some other things as I think of them. Other interesting aspects might be to upgrade the bit-size based on the computing power that is detected (hard if the client lies), or at least a varying range of algorithms that are known to be "hard" that can be swapped in and out.

This system attempts to replace, or at the very least - assist - the current CAPTCHA solutions that exist today. There are some very smart[2] people working on solutions to those, so it's at least interesting to think of other angles. It at the very least requires a spammer to have implemented a javascript-processing form submission process and to note have a timeout on said processing. Maybe at most it requires some sort of special-targetting of this exact model. If that's the case, then I probably should've kept the bitsize private ;)

Either way, I hope it provokes some further interesting developments. I think at least it has been motivation-enough for me to finally enable comments on this website :)

crypto, hashcash | comment(s) 19

Silky @ 25-Nov-2007 05:40PM

First test.

Coyote @ 25-Nov-2007 11:31PM

Go comment.

Tony @ 26-Nov-2007 12:31AM

Lets try....

Lee @ 26-Nov-2007 12:54AM

inane comment

Peter @ 26-Nov-2007 01:01AM

The clock starts... now.

Peter @ 26-Nov-2007 01:03AM

That took almost two minutes (1:50, to be precise) of about 75% CPU usage. Firefox 2.0.0.8, Debian stable, 700MHz PIII.

the intarnet @ 26-Nov-2007 04:14AM

Hmmm

Why not? @ 26-Nov-2007 04:53AM

Hmmmmm

Why not? @ 26-Nov-2007 04:53AM

Hmmmmm

Miki @ 26-Nov-2007 07:37AM

This surely goes fast fast fast

me @ 26-Nov-2007 03:07PM

Howdy Mike, I am now expecting something cool.

mr spammer @ 26-Nov-2007 11:35PM

Buy your goats here!!

mike @ 26-Nov-2007 11:37PM

that took much longer than I would be bother to wait. Maybe the JS could kick off when I open the page?

scott @ 08-Oct-2008 08:27AM

Neat trick

scott @ 08-Oct-2008 08:27AM

Trying again in Chrome to see speed difference!

scott @ 08-Oct-2008 08:28AM

Conclusion: Chrome is several times faster! (Than FF3)

Mark Hurd @ 08-Oct-2008 04:55PM

Just testing Chrome for myself.

Mark Hurd @ 08-Oct-2008 04:57PM

Definitely not too long. I didn't time it but I think it was about 40 seconds.

Mark Hurd @ 08-Oct-2008 04:59PM

A variation on a watched kettle never boils: It was only about 15 seconds!

Name:
Website:
Comment:

When you click "submit" I will be factoring this number: . Please wait for me. Wondering why?

Thinking... 0%
 
page generated by: silkyblog. took: longer than it should've.