XOR Encryption

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Jun 09, 2005 2:34 am    Post subject: XOR Encryption Reply with quote

Im creating my own version of PHP Protector and so far Im able to create levels
0 -> 2 , how do I encrypt my version using the PHP XOR Encryption method ?

Example: Level 1 & 2 Protection

this will create a base64/gzdeflated Encrypted string but the problem is that
you can decode this easily if your good at PHP programming , I want to know
if any of you know how to use the XOR Encryption so that I can use it. :-)

Code:

<?php
// String to Encrypt
$string = "Hello, World!"; 

// Compress String (Level 9)
$deflate = gzdeflate($string, 9);

// encode to Base64
$crypt = base64_encode($deflate);

// Decoder string variable
$decode = gzinflate(base64_decode($crypt)); 

// Output Encrypted string
echo "Encrypted: " . $crypt  . "<BR>";

// Output Decoded string
echo "Decrypted: " . $decode;
?>


Sincerely , TRUSTpunk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Jun 09, 2005 12:44 pm    Post subject: Re: XOR Encryption Reply with quote

TRUSTpunk,

Well, this is not the exact answer to your question but we suggest spending some time on http://en.wikipedia.org/wiki/Category:Cryptography . It's the best compilation of cryptography algorithms we've found on the Internet and most of the algorithms are explained and sometimes come even with the source code.

What you need here is a symmetric-key encryption algorithm: http://en.wikipedia.org/wiki/Symmetric_key_algorithm .

Most popular symmetric-key algorithms (including AES - IDEA - and the RC family) belong to the Block symmetric encryption algorithms family: http://en.wikipedia.org/wiki/Block_cipher (see the bottom of the page for the listing of the algorithms).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Thu Jun 09, 2005 8:22 pm    Post subject: Reply with quote

TRUSTpunk,

Could you explain what this program is supposed to do?

Because, if I were to goto www.somesite.com/page.php, I wouldn't see the PHP code I would only see the HTML code. Including if I were to view source.

Did you try looking through the PHP online manual at www.php.net for a possible example of XOR?
_________________
Back to top View user's profile Send private message AIM Address
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Thu Jun 09, 2005 8:33 pm    Post subject: Reply with quote

It is supposed to encrypt the PHP code so people cant edit or steal parts of your coding. XOR encryption is one of the most powerful encryption methods around and is one of the hardest to hack.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Fri Jun 10, 2005 1:33 am    Post subject: Reply with quote

The Inquisitor wrote:
It is supposed to encrypt the PHP code so people cant edit or steal parts of your coding. XOR encryption is one of the most powerful encryption methods around and is one of the hardest to hack.


I think I know where your going with this, so your php code would be something like this:
Code:

<?
$code = decode("jumbled code kjflksajf;asdjf;j");
exec($code);
?>


Or something like that?
_________________
Back to top View user's profile Send private message AIM Address
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Fri Jun 10, 2005 1:47 am    Post subject: Reply with quote

The Inquisitor wrote:
It is supposed to encrypt the PHP code so people cant edit or steal parts of your coding. XOR encryption is one of the most powerful encryption methods around and is one of the hardest to hack.


...how do people steal something that can only be seen server-side?
Back to top View user's profile Send private message ICQ Number
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Jun 10, 2005 7:59 am    Post subject: Reply with quote

He means if he creates a script and shares it to people so they can use it. I was going to encrypt my server information script when it was done so people know it is my work and they cant change it.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Fri Jun 10, 2005 1:23 pm    Post subject: Reply with quote

<?php include 'http://yoursite/yourscript.php'; ?>

:P

Anyways, they'd need to install the encoder on their server, like with Invision Power Board trials.
Back to top View user's profile Send private message ICQ Number
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Jun 10, 2005 4:57 pm    Post subject: Reply with quote

No you dont understand, the PHP code itself will be encrypted beyond decryption. Only XOR decryption will be able to show the PHP page as it is normally. Includes has nothing to do with it because the script will be distributed already encoded.

You will see what i mean when TRUSTpunk has finished the script.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Fri Jun 10, 2005 9:27 pm    Post subject: Reply with quote

Oh, you already have the method.. :P
Back to top View user's profile Send private message ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group