Can you decrypt this? (impossible, please lock)

The fear of every surveillance society: citizens protecting their own privacy with strong cryptography

Can you decrypt this? (impossible, please lock)

Post by Arightwizard on Wed Jul 07, 2010 9:38 pm
([msg=41419]see Can you decrypt this? (impossible, please lock)[/msg])

Aight, since I was bored I made a very, very simple encryption method in PHP (I didn't feel like working at it, don't tell me it's not complex enough) and I decided that I'd give you guys the source code for this L2L and see if an average user can decrypt it..'Cause I'm bored.
Hash: A.FCAGGBFGFDCAFE+AEG
The source code:
Code: Select all
<?php

// L2N - one of the functions for L2L

function l2n1($origtext) {

$old = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '!', '?', '"', ',', ':', ';', '.', '`', "'", '+', '-', '*', '÷', '@', '#', '$', '%', '^', '&', '(', ')', '{', '}', '[', ']', '/');

$new = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52');

$enctext = str_replace($old, $new, $origtext);

return $enctext;

}

// N2L - another function for L2L

function n2l1($origtext) {

$old = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '!', '?', '"', ',', ':', ';', '.', '`', "'", '+', '-', '*', '÷', '@', '#', '$', '%', '^', '&', '(', ')', '{', '}', '[', ']', '/');

$new = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52');

$enctext = str_replace($new, $old, $origtext);

return $enctext;

}

// L2L - the big one.

function l2l($origtext) {

$lettersnsymbols = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '!', '?', '"', ',', ':', ';', '.', '`', "'", '+', '-', '*', '÷', '@', '#', '$', '%', '^', '&', '(', ')', '{', '}', '[', ']', '/');

$one = n2l1($origtext);

$two = strrev($one);

$three = l2n1($two);

$four = ereg_replace("[^A-Za-z0-9]", "", $three );

$five = str_replace($lettersnsymbols, '', $four );

$six_one = strlen($five);

$six_two = $five * $six_one;

$seven = $six_two / 2;

$eight = n2l1($seven);

return $eight;

}

?>

I made this so long ago, I'm not even sure if it's possible to get the original message back.
Anyway, go ahead and tell me what you get if you feel like it. BTW if this is breaking some kind of rule I didn't see, I'll go ahead and remove this.
PS: If you don't believe I made this encryption and think that I'm trying to get you to help me with something illegal, think:
How would I get the encryption source? Google L2L encryption and you'll find nothing but lan-to-lan stuff


--edit--
Good point, so I guess I'll go ahead and give you the length of $five and see if that helps..Though you wouldn't normally get this in that kind of situation.
Length: 156
Unless you don't want to do this, anyway. This is just something for practice/geek fun. (Yes I just called myself a geek.)

--edit2--
I guess I might want to take this down since it has no point and seems to be more difficult than I expected.....How do I take this down? lol
Last edited by Arightwizard on Thu Jul 08, 2010 3:00 pm, edited 4 times in total.
The universe is mind over matter, meaning that consciousness precedes existence in general.
This means that if enough people start thinking that the world will end...it will.
Cool.
***IRRELEVANT SCIENCE FTW!!!***
Arightwizard
New User
New User
 
Posts: 14
Joined: Thu Jun 25, 2009 12:20 pm
Blog: View Blog (0)


Re: Can you decrypt this? (easy-avg challenge)

Post by sanddbox on Wed Jul 07, 2010 10:25 pm
([msg=41421]see Re: Can you decrypt this? (easy-avg challenge)[/msg])

Relax. We know it's legal.

I don't have time now, but I'll take a look later and see if I can crack it.
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2337
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Re: Can you decrypt this? (easy-avg challenge)

Post by msbachman on Thu Jul 08, 2010 12:55 am
([msg=41434]see Re: Can you decrypt this? (easy-avg challenge)[/msg])

I took a look at this but it'll have to wait until tomorrow i guess, have to sleep.

The hardest part thusfar for me was walking backwards trying to reverse the code in l2l(). I think what confused me the most was the variable names, it seemed really unnatural and difficult to think about.

The other functions are reversed (I think) easily...you should just be able to make like a function n2l1() with the $old and $new reversed and leave everything else alone.

Anyway good luck to sanddbox I have an interview tomorrow otherwise i'd probably beat my brains in trying to figure out how it works.

One thing that helped me get a feel for it was to put echo statements after each variable in l2l...knowing sanddbox probably don't have to say that but it might help another lurker.

-- Thu Jul 08, 2010 11:57 am --

I had another go at this to no avail. What's getting me is how it's structured, you have to resolve what everything is before you begin to reverse it. Especially the strlen() statement in l2l(). There's no way of knowing that, so you're basically going to have to guess when you reverse it.

So still no definitive answer from me, hope someone else has better luck. The OP asked whether this would be safe among most people, I probably think even people with a bit of PHP would be deterred by such a cipher. If it turns out to be cost prohibitive, taking too much time to figure out (e.g. in my case), they'll give up. :lol:
"I'm going to get into your sister. I'm going to get my hands on your daughter."
~Gatito
User avatar
msbachman
Contributor
Contributor
 
Posts: 685
Joined: Mon Jan 12, 2009 10:22 pm
Location: In the sky lol
Blog: View Blog (0)


Re: Can you decrypt this? (challenge of unknown difficulty)

Post by Arightwizard on Thu Jul 08, 2010 12:47 pm
([msg=41451]see Re: Can you decrypt this? (challenge of unknown difficulty)[/msg])

Call me a newbie but I'm not sure who you mean by "The OP" (Haven't been on HTS in a long time)
The universe is mind over matter, meaning that consciousness precedes existence in general.
This means that if enough people start thinking that the world will end...it will.
Cool.
***IRRELEVANT SCIENCE FTW!!!***
Arightwizard
New User
New User
 
Posts: 14
Joined: Thu Jun 25, 2009 12:20 pm
Blog: View Blog (0)


Re: Can you decrypt this? (challenge of unknown difficulty)

Post by Pythous on Thu Jul 08, 2010 1:25 pm
([msg=41452]see Re: Can you decrypt this? (challenge of unknown difficulty)[/msg])

If google doesn't find something, urban dictionary is your friend. OP stands for Original Poster- which would be you.
We did not invent the algorithm.
The algorithm consistently finds Jesus.
The algorithm killed Jeeves.
The algorithm is banned in China.
The algorithm is from Jersey.
The algorithm constantly finds Jesus.
This is not the algorithm. This is close.
User avatar
Pythous
Experienced User
Experienced User
 
Posts: 75
Joined: Wed Dec 02, 2009 10:53 pm
Blog: View Blog (0)


Re: Can you decrypt this? (challenge of unknown difficulty)

Post by Bren2010 on Thu Jul 08, 2010 2:36 pm
([msg=41456]see Re: Can you decrypt this? (challenge of unknown difficulty)[/msg])

It's impossible to decrypt without an error margin.
User avatar
Bren2010
Poster
Poster
 
Posts: 340
Joined: Fri Sep 19, 2008 3:23 pm
Blog: View Blog (0)


Re: Can you decrypt this? (challenge of unknown difficulty)

Post by Arightwizard on Thu Jul 08, 2010 2:43 pm
([msg=41458]see Re: Can you decrypt this? (challenge of unknown difficulty)[/msg])

Bren2010 wrote:It's impossible to decrypt without an error margin.

Figures, I haven't really looked and analyzed the code since I wrote it last year.
The universe is mind over matter, meaning that consciousness precedes existence in general.
This means that if enough people start thinking that the world will end...it will.
Cool.
***IRRELEVANT SCIENCE FTW!!!***
Arightwizard
New User
New User
 
Posts: 14
Joined: Thu Jun 25, 2009 12:20 pm
Blog: View Blog (0)



Return to Crypto

Who is online

Users browsing this forum: No registered users and 0 guests