Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Exlusive-or crypting

Exlusive-or crypting

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ever1234
    wrote on last edited by
    #1

    Anyone care to clear this up for me? "To wonder is to begin to understand"

    C M 2 Replies Last reply
    0
    • E Ever1234

      Anyone care to clear this up for me? "To wonder is to begin to understand"

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Ever1234 wrote: Anyone care to clear this up for me? An OR returns 1 if either of two binary values is 1, an XOR returns 1 if one and only one value is 1. What else did you want to know ? Christian I have come to clean zee pooollll. - Michael Martin Dec 30, 2001

      Sonork ID 100.10002:MeanManOz

      I live in Bob's HungOut now

      1 Reply Last reply
      0
      • E Ever1234

        Anyone care to clear this up for me? "To wonder is to begin to understand"

        M Offline
        M Offline
        Malcolm McMahon
        wrote on last edited by
        #3

        Exclusive or is the binary equivalent of the old "chinese addition" used by the spies of old, which involves adding digits but ignoring any "carry" numbers. So you'd get (with the decimal version) 29232 + 56299 = 75421 the binary version would go like: 1011110 xor 0111010 = 1100101 It allows your data to be combined with a random stream of numbers so that it can be easilly retrieved by someone who has the same random stream of numbers. The convenience is that if you xor twice with the same data you get back to the original. This, of course, is the easy bit. The hard part is to ensure that the sender and the intended recipient have the same encoding stream and the bad guys don't. In the old days the spies had "one time pads", basically pages of random numbers which they had to smuggle physically and which they were supposed to destroy after use. These days we tend to generate pseudo-random sequences from seed codes like pass phrases.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups