Re: decrypting encrypted ascii characters
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: decrypting encrypted ascii characters




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: decrypting encrypted ascii characters  
Stephane CHAZELAS


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-30-07 12:21 AM

2007-06-29, 14:42(-07), stenasc@yahoo.com:
[...]
> a)    library ieee;        ....this is the line of text to be
> encrypted
>
> b)     ????????       ....after xoring with FFh and reversing
> 00000001h: C4 9A 9A 9A 96 DF 86 8D 9E 8D 9D 96 93          ; ????
> ????   (Hex values)
>
>
>
> Now in Unix, this encrypted code line b) looks like this....
>
> c)     ?���?������
>
> 00000012h: C4 9A EF BF BD EF BF BD EF BF BD DF 86 EF BF BD ;
> ?���?�
> 00000022h: EF BF BD EF BF BD EF BF BD EF BF BD EF BF BD    ;
> �����
>
>  Trying to decrypt line b) by XORing with FFh produces more unreadable
> garbage. Is there any way I can get back from c) to a) or even c) to
> b) ?
>
> Any character set specialists out there that can help, I'd much
> appreciate it.
[...]

Your encryption function works on bytes, there's not reason why
it should have any relationship with charsets or work
differently on different systems.

$ printf 'library ieee;' | PERL -ne 'print pack "C*", reverse
map {$_^0xFF} unpack "C*", $_' | od -tx1
0000000 c4 9a 9a 9a 96 df 86 8d 9e 8d 9d 96 93
0000015


$ printf 'library ieee;' | PERL -ne 'print pack "C*", reverse
map {$_^0xFF} unpack "C*", $_' | PERL -ne 'print pack "C*",
reverse map {$_^0xFF} unpack "C*", $_'
library ieee;

Your c) above is obviously garbage. Only "y " and "e;" are there
from the original string

$ printf 'C4 9A EF BF BD EF BF BD EF BF BD DF 86 EF BF BD EF BF
BD EF BF BD EF BF BD EF BF BD EF BF BD' | PERL -ane 'print pack
"(H2)*",@F' | PERL -ne 'print pack "C*", reverse map {$_^0xFF}
unpack "C*", $_'  | od -tc
0000000   B   @ 020   B   @ 020   B   @ 020   B   @ 020   B   @ 020   B
0000020   @ 020   y       B   @ 020   B   @ 020   B   @ 020   e   ;
0000037

--
Stphane





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:57 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register