Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

TRIPCODE QUINE!!!!

Name: faggot !Ep8pui8Vw2 2007-08-28 21:19 ID:8YbuJbma

Can you hack it /PROG/?

Name: Anonymous 2007-08-28 21:20 ID:8YbuJbma

(the idea is to make a tripcode which = itself encoded)

Name: Anonymous 2007-08-28 22:06 ID:Heaven

Definitely not by analytical methods.

Name: Anonymous 2007-08-29 3:12 ID:VLFnduJ3

>>3
??? Are you not HAX enoguh?

Name: string !PkuUAR7Kmk 2007-08-29 3:35 ID:Heaven

Easy.

Name: Anonymous 2007-08-29 3:52 ID:7E9J51VB

>>5
Idiot

>>2
Impossible.

Name: Anonymous 2007-08-29 4:11 ID:Heaven

Impossible.
prove it.

Name: Anonymous 2007-08-29 4:28 ID:7E9J51VB

>>7
Tripcodes are created using unix crypt() and a fuckload of salting.

What goes into the hash function cannot, by definition, come out the same as it went in.

Name: Anonymous 2007-08-29 4:34 ID:Heaven

>>8
formal proof or GTFO.

Name: Anonymous 2007-08-29 4:45 ID:7E9J51VB

>>9
Well, let's take a look at one of the first implementations of the tripcode algo:

<?php
function tripcode($name)
{
    if(ereg("(#|!)(.*)", $name, $matches))
    {
        $cap  = $matches[2];
        $cap  = strtr($cap,"&amp;", "&");
        $cap  = strtr($cap,",", ",");
        $salt = substr($cap."H.",1,2);
        $salt = ereg_replace("[^\.-z]",".",$salt);
        $salt = strtr($salt,":;<=>?@[\\]^_`","ABCDEFGabcdef");
        return substr(crypt($cap,$salt),-10)."";
    }
}
?>


echo tripcode("moot#faggot"); returns Ep8pui8Vw2.

Trying to create a 'tripcode quine' in this manner can't be done. It's about as feasible as an 'sha1 quine', so to speak.

Name: Anonymous 2007-08-29 4:47 ID:7GxzTXFF

Modified version of >>10 that solves this problem,

<?php
    function tripcode($name) {
      return $name;
    }
?>

Name: Anonymous 2007-08-29 4:59 ID:vOArf5lH

>>10
Are you stupid? How is this formal proof?
Tripcode quine means you type moot#Ep8pui8Vw2 in name field, and it becomes moot!Ep8pui8Vw2 when you click Reply

Name: Anonymous 2007-08-29 5:01 ID:7E9J51VB

>>11
You haven't yet mastered BBCode. You are not an EXPERT PROGRAMMER.

Anyway, say for a second I was wrong about this tripcode quine impossibility.


<?php
function tripcode($trip)
{
    $cap  = $trip;
    $cap  = strtr($cap,"&amp;", "&");
    $cap  = strtr($cap,",", ",");
    $salt = substr($cap."H.",1,2);
    $salt = ereg_replace("[^\.-z]",".",$salt);
    $salt = strtr($salt,":;<=>?@[\\]^_`","ABCDEFGabcdef");
    return substr(crypt($cap,$salt),-10)."";
}

srand();
while(1)
{
    $string = tripcode(rand()); // We need a 'random' string, and we need it to be a valid trip
    if(tripcode($string) == $string)
    {
        echo "Quine found! - $string\n";
    }
}
?>


This script hunts for 'tripcode quines'. According to my theory, it will never return any output. Ever. But give a try if you want :)

Name: Anonymous 2007-08-29 5:04 ID:7E9J51VB

>>12
Are you stupid? Why don't you read what the OP is suggesting? >>2

The op is suggesting a specially crafted tripcode that when entered as "name#asdsdfsf" it comes out as "name!asdsdfsf".

Name: Anonymous 2007-08-29 5:15 ID:vOArf5lH

>>13,14
[aa]Sorry for even trying to talk to you, you're hopeless[aa]

Name: Anonymous 2007-08-29 5:34 ID:PV+faYRQ

>>15
Syntax error

Name: Anonymous 2007-08-29 13:31 ID:Heaven

There's no way to supply the same input as the output, because the two aren't even the same length. DES takes a 56 bit key and outputs 64 bits.

Thread over.

Name: Anonymous 2007-08-29 16:18 ID:VLFnduJ3

>>14
I, The op are suggesting

asdsdfsf#asdsdfsf -> asdsdfsf!asdsdfsf

Name: Anonymous 2007-08-29 16:21 ID:Heaven

>>17
if crypt() is given more than 8 characters as input it ignores the extra ones at the end.
so #aaaaaaaa and #aaaaaaaaomgwtfbbq are the same tripcode.

Name: Anonymous 2007-08-29 16:25 ID:vOArf5lH

>>17
I can't believe your stupidity

Name: Anonymous 2007-08-29 16:27 ID:WjhC2bTS

OK guys, time to reread SICP for all of you -- what you are looking for is a fixed point function, which is described in like the first chapter or something.

Name: Anonymous 2007-08-29 16:55 ID:/xIJtDET

>>21
Yeah, I remember that chapter. "Breaking DES and other secure encryption algorithms", wasn't it?
Interesting stuff, especially the part where Sussman intercepted and decoded wireless packets with 2048-bits RSA encryption, using only a swiss army knife and higher-order programming, while being chased by black helicopters and a zombie t-rex.

Name: Anonymous 2007-08-29 17:34 ID:VLFnduJ3

>>22
rofl

Name: Anonymous 2007-08-29 18:37 ID:YOjCJ7yt

>>22
Win

Name: Anonymous 2007-08-29 22:05 ID:iOOMXUDG

numbers + lowercase chars + uppercase chars ~=~ 70

there are 10 chars, 2824752490000000000 possibilities, why not try brute force algorithm?
it will take about 90 thousand years, though, assuming a million attemps by second.

...........
Ok, maybe not. anyway, the tripcode function itself says little, what about a tripcode breaker? that's something one should begin to look at.

Name: Anonymous 2007-08-29 22:13 ID:u/yOzCBu

>>25
also .+!/

Name: Anonymous 2007-08-29 22:17 ID:VLFnduJ3

>>25
YOU MISCALCULATED

Name: Anonymous 2007-08-29 22:23 ID:iOOMXUDG

"~=~" means "aproximatted".
>>27
where?

Name: Anonymous 2007-08-29 23:42 ID:aX0wiKk6

>>19 If you don't care about the extra characters, sure.
>>20 Go back to bed. Working with cryptosystems is my full-time job.
>>26 Just period and slash.
>>28 ≈ means approximate, and the answer is 64, as was mentioned earlier in this thread.

At any rate, there's only eight characters input, thus 281474976710656 possibilities. One million inputs per second is very poor performance; you can easily get five or six million with a modern processor, and that's not even considering specialized DES-cracking hardware. Multiply by a small distributed network of 30 systems (which isn't at all difficult to get; all you need for this is the CPU and motherboard, and a minimal amount of RAM, so you can build one yourself for less than $300) and you have a very reasonable time of 18 days.

Name: Anonymous 2007-08-29 23:57 ID:VLFnduJ3

>>29
YOU MISCALCULATED

Name: Anonymous 2007-08-30 5:58 ID:Heaven

>>27
>>30
samefag

Name: Anonymous 2007-08-30 6:51 ID:Z1VZr0m4

>>30

His only mistake was assuming that a general purpose PC can do 5-6 million crypts per second. About 1.5 million would be more accurate. The remaining calculations are sound.

Output of crypt can be A-Z, a-z, 0-9, . or / - this gives 26 + 26 + 10 + 2 = 64 different characters.

A tripcode contains 8 characters, so the theoretical (perhaps not all can be created) tripcode space is 648 = 281,474,976,710,656.

Divide that by the crypts per second. Further divide that by 86400 (number of seconds in a day) - you now have the number of days. I make that 2172 days for my 1.5 millions estimate and 543 days for his 6 million.

Divide by the number of computers working on it. Mr >>29 says thirty. That gives 72 days for my estimate of cps and 18 days for his.

Name: Anonymous 2007-08-30 6:58 ID:gWekq0zm

We need a Tripcode@home campaign

Name: !DEEPjKeito 2007-08-30 7:21 ID:DwjwhIIv

>>33
how do you think shit like this got cracked?

Name: Anonymous 2007-08-30 7:33 ID:Ocbkjg1s

someone post a tripcode cracker and ill change it into a quine generator

Name: Anonymous 2007-08-30 7:39 ID:SN2SlQY7

>>32
Six million tripcodes per second per CPU is actually a quite sound estimate. You're probably thinking in terms of running standard crypt() (or maybe DES_crypt()) in a for loop. Remember every time you call crypt(), it has to do a lot of bitwise manipulating to get a 56-bit key out of the input characters, set up the IV, etc., and it has to do more bit arithmetic at the end. For a sequential search of *all* tripcodes with a given key size you can make the search many times more efficient by setting up the IV once and iterating through the keys numerically. This is especially fast if you use bitslicing code instead of assuming a one-to-one mapping of plaintext->crypttext. Now, once you've eliminated all that unnecessary bit-shifting and initialization overhead, you can speed things up further by reducing the comparison function to a simple xor between two 64-bit integers instead of a costly strcmp().

Name: Anonymous 2007-08-30 8:02 ID:Ocbkjg1s

>>36
IMPLEMENTATION PLZ ;)

Name: Anonymous 2007-08-30 10:54 ID:Z1VZr0m4

>>36
That's an interesting theory. Please post some code demonstrating this.

Name: Anonymous 2007-08-30 11:01 ID:Heaven

Name: Anonymous 2009-03-06 6:38


Quine' so to speak   of ie not   you is not   superior to C   to get better   performance The better   question is If   you get to   a medium skill   level you can   have 3 7s   1 9 and   now 10 u   must trai it?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List