generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Why: Using XOR for encryption scripts

Previous Thread :: Next Thread 
kisamebeast is not online. kisamebeast
Joined: 17 Jan 2008
Total Posts: 3086
01 Jun 2009 09:07 PM
Why is XOR so popular for encryption and decryption scripts?
I've never bothered to learn it so, yea...
I know it's an exclusive or, but how so?
Do we have a XOR in lua?
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
01 Jun 2009 09:11 PM
Umm... i think it's pointless to learn, but here's how it works.

it basically means if-this-but-not-that *OR* if-that-but-not-this

basically:

if (cond1)~=(cond2) then
--cond1 = condition1, cond2 = condition2
end


I think I took that example from anam or x on another thread.
Report Abuse
Meelo is not online. Meelo
Joined: 04 Jul 2008
Total Posts: 14763
01 Jun 2009 09:12 PM
Say ^ is XOR (Like in most languages)

true^true = false^true = true
true^false = true^false = true
false^true = true^true = false
false^false = false^false = false

a^b=c
c^b=a

It natrually goes both ways.
Report Abuse
dsds2 is not online. dsds2
Joined: 21 May 2008
Total Posts: 3851
02 Jun 2009 10:51 AM
It's great for simple stream ciphers:

Encrypt
---
key = 10
plaintxt = 01
key^plaintxt = 11

Decrypt
---
key = 10
ciphertxt = 11
key^ciphertxt = 01
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
02 Jun 2009 11:03 AM
Really SIMPLY, let's use binary.

Say you were adding A (which is 100101010) and B (which is 00101001). It works like this:

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0

So:

100101010 +
001010011 =
-------------
101010001

And if you add the add A to this, you get B.

101010001+
100101010=
-------------
001010011

AND if you add B to your answer istead, guess what?

101010001+
001010011=
-------------
100101010

You get A! So if you wanted to encode A, you invent B, and use it to get C: the code. To decode it, simply use B again.

How is this useful? Well replace 0 with false and 1 with true and then.......... well, I have no idea.
Report Abuse
mattscy is online. mattscy
Joined: 06 May 2011
Total Posts: 1079
05 Nov 2017 07:46 AM
this may be the oldest scripting post you can reply to

the history is real
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
05 Nov 2017 07:56 AM
"true^true = false^true = true"
I want to go back to '09 and criticise this guy.
That statement is wrong. And if nothing else, his post is ridiculously hard to follow.


true and false = false and false
Yeah, that whole thing I just said is false. It makes sense, in a way, but it should never ever be said.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image