Members Login

Rss Feeds

Get our latest content via RSS feeds.

Report a Vulnerability

Report a vulnerability or exploit that you have found to SecuMania.
vul[at]SecuMania.org

 

Latest Comments

I cant say I feel sorry for him, stupid spammer got what he deserved. We all know how it feels to op...
thanks smiley
hi webmaster,plz help me to find any information about account harvesting and traversal path attack ...
Hello Webmasters My name is Nikolai. I am making an organization for the protection internet users f...
good job you are the best . mgharba talmout :d
Hello, The reported problem has been fixed. Regards, Catalina Danila Online Rent Customer Supp...
Not Vulnerable: Luis Wang netOffice Dwins 1.3.1 visit website http://netofficedwins .sourceforge.ne...
Current version of script corrected. Security patch available to registered users in the user foru...
But i think to protect the password is not needed because it's not used in the SQL-Execute statement...
you may find that your hotfix doesnt stop the password field from having SQL injected into it. This ...

Who's Online

Total: 19
Members: 0 / Guests: 19
No members online

Packet Storm

Visits today: 782
Visits yesterday: 865
Visits month: 6736
Visits total: 440383
Pages total: 8287104
What is XOR encryption? Print E-mail
5.0
Tuesday, 29 May 2007

XOR encryption is a trivially simple symmetric cipher which is used in many applications where security is not a defined requirement.

The XOR Operator

XOR, also know as Exclusive OR, is a bitwise operator from binary mathematics.

The six bitwise operators, as defined in the C programming language, are:

Operation Symbol
AND&
Inclusive OR|
Exclusive OR (XOR)^
Right Shift>>
Left Shift<<
Complement~

The XOR operator returns a 1 when the value of either the first bit or the second bit is a 1.

The XOR operator returns a 0 when neither or both of the bits is 1.

This is best illustrated in the following chart:

First Bit Second Bit Result
000
011
101
110

The XOR operator is used to "flip" bits (zeroes and ones) in a piece of plaintext to create a ciphertext.

Converting Plaintext to Ciphertext with XOR Encryption

The plaintext we will start with is the term "FAQ".

  • ASCII representation of the plaintext: FAQ
  • Hexadecimal representation of the plaintext: 70 65 81
  • Binary representation of the plaintext: 01110000 01100101 1000000

We will XOR the first character of this plaintext into ciphertext using a "V" as the key:

  • ASCII representation of the key: V
  • Hexadecimal representation of the key: 86
  • Binary representation of the key: 10000110
Plaintext 'F' Key 'V' Ciphertext
011
101
101
101
000
011
000
011

Converting Ciphertext to Plaintext with XOR Encryption

XOR encryption is a symmetric algorithm. This means that we can use the encryption key as the decryption key.

Let's decrypt our ciphertext to recreate our original plaintext.

Ciphertext Key 'V' Plaintext
110
101
101
101
000
110
000
110

Do the math yourself with the other two characters of plaintext to prove this to yourself.

Many encryption algorithms utilize the XOR operator as part of their operations.

Understanding XOR and the other binary operators is a necessary step on the path to becoming a cryptologist.

XOR Security

XOR encryption is trivially simple to implement and equally trivial to break.

XOR encryption should not be utilized for any data which you would want to protect.

source: http://www.tech-faq.com/xor-encryption.shtml

Hits: 697
Comments (0)add
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
Last Updated ( Tuesday, 29 May 2007 )
 
< Prev   Next >
web design company
Warning: file_put_contents() failed to open stream: Permission denied in /home/inowweb/public_html/secumania.org/index.php on line 741