Re: Encryption & Decryption script



I get bored last night and wrote a script that uses xor for encrypt-
decrypt, however it woks fine under linux 2.6.25, text and documents
are ok, but fails on compressed files *.jpg, *.pdf , etc . I didn't
test script on windows.

I did not look at the code, but xor on PHP is quite counter-intuitive.
The most significant bit is seen as a sign bit and is treated special.
Furthermore, the size of an integer is not determined. I ended up
creating my own fixed size integer classes when I had to implement a
decryption algorithm.

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
.



Relevant Pages

  • Re: [PHP] Converting PHP code to C#?
    ... I've done it in reverse - something encrypted in .NET and then decrypted in PHP ... You need the mcrypt extension installed. ... You can issue this single line of code to decrypt: ... with no encoding, get it to work, then add on encoding and decoding on ...
    (php.general)
  • Re: Encryption in Clarion
    ... If you could look back to your notes it would be great, i need to know the algorithm how to get from password the 16-bit word and how to use it to decrypt file. ... cracked the .DAT encryption years ago and I'd have to look back at my ... notes to see specifically what bytes in the header we had to XOR. ... I'm searching for an decryption algorithm used in old DOS clarion ...
    (comp.lang.clarion)
  • Encryption/decryption of PHP data
    ... My client application needs to send data to a PHP page in encrypted form ... and have the PHP code able to decrypt it. ... public key-private key cryptography for PHP with libraries for C++ also. ...
    (php.general)
  • Re: [PHP] How can I get a function name?
    ... If you're using PHP 4.3.0+, try the __FUNCTION__ magic constant. ... The above message is encrypted with double rot13 encoding. ... Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. ...
    (php.general)
  • decrypting a XOR of two plaintexts
    ... a lot of papers about stream ciphers state that it is rather "easy" ("there ... are well-known methods") to decrypt two plaintexts given their XOR. ... Best explanation I found was that knowing the XOR of two plaintexts is ...
    (sci.crypt)