anyone know this encryption algorithm?!

Started by
0 comments, last by _vizual_ 20 years, 2 months ago
Does anyone here recognize this encryption algorithm? I found it and have been busting my chops trying to figure it out *t is the encrypted text and the code *DE*crypts it. I see what is going on, but my problem is with regards to 'c'. 'c' fluctuates between positive and negative, and whether it is positive or negative is dependent on the encrypted text. What exactly determines whether c will be positive or negative? (c=*++x So does anyone recognize this algorithm? The text decrypted is an email address. (which I've changed around the characters to preserve privacy) I should probably add the following: As an example lets assume the decrypted text is, 'myemail@email.com' m,y,e,a,i,l,@,c,o,. would be the only "alphabetic" characters found within the encrypted *t? ie. no repetition of characters. what the purpose of the hex and escape codes is? I'm not sure Thanks!

char *t="\10wda\0u\0ptr\0.@gdnc\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
 
int _tmain(int argc, _TCHAR* argv[])
{
	char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; 
 
	for (i=0;i<l;i++)
	{ 
 
		if (i%8)
		 { c<<=1; 
		 }
 
		 else
		 {
			 (c=*++x); 
		 } 
 
 
	  c&128 && (s+=h);
 
	  if (!(h>>=1)||!t[s+h])
		 {  
			putchar(t[s]); 
			h=m;s=0; }
		 }	
 
	return 0;
}
< [edited by - _vizual_ on January 22, 2004 12:26:37 AM]
cheers,vizuäl
Advertisement
I don''t think this is encryption, rather, Huffman compression (although, with these short strings, the compression actually ends up bigger due to the code table being included). The data appears to be laid out as:
Huffman size
Code table
encrypted bit length
encrpted bit stream

Skizz

This topic is closed to new replies.

Advertisement