Jump to content


Photo

_dll_ Xor Crypt Dll V2.0


  • Please log in to reply
39 replies to this topic

#1 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 20 January 2007 - 06:25 PM

Philosophy
XOR is a very powerful encryption, possibly one of the most powerful. I've seen a few encryption topics coming up, and some which offer XOR, but noticed that none of them were very fast. I've just recently learned C, and knowing that it's one of the fastest languages (second only to ASM probably), I figured it would be perfect for this purpose. So I wrote it up over the course of 3 days, and thorougly tested and debugged it. On my not-so-impressive machine, it was able to encrypt a 46 MB file in 4 seconds, and decrypt in the same amount of time, using the slowest of the 4 scripts. At first it was just an experiment, but after seeing those results... I just had to share it with the GMC.

On a side and more somber note, please realize that encryption is not the end-all-solve-all. Many people go crazy and start encrypting things just because they want their game to be a "black box" and the user is just playing it. If it's not an online game, there really should not be a reason to prevent a user from modifying their own files. They have their own copy of the game, and they're not harming anyone but themselves. Furthermore, if they really want to steal resources, they're going to do it, encryption or not. DLLs are far from perfect - they can be hacked or replaced, and even with the gex encryption, they can still be hacked. What I have found in my years of experience is if you make your game open source, and your resources freely available / open source, the benefits are greater from people creating plugins of better resources etc, and will usually far outweigh the people who steal your resources. To top that all off, once your game earns a reputation, those stolen resources are essentially useless to that person, because people will recognize it from your game. Thus it is my personal belief, along with the belief of many followers of the open source movement, that open source may very well be the end-all-solve-all, or at least the next step up in the evolution of software from proprietary copyrights.

Legal stuff
Warning: I am not responsible for any damages done from the use or misuse of this dll. I have thoroughly tested it and it shouldn't corrupt any files, but if you lose the seed used to encrypt a file, you will not be able to decrypt that file. If you do run into any problems with the dll, I will try to fix it, but am not obligated to. If you use this dll, please credit IsmAvatar (and get the capital letters right). If you choose to modify the source code, please give me credit for the original, and credit yourself for any changes. Do not use this dll for malicious purposes.

Downoad
http://www.IsmAvatar.../dlls/crypt.zip (6kb)

Inside you will find 3 files:
crypt.dll
crypt.c - the source code (if you're interested. If not, you can discard it). It might seem strange to provide the source code to an encryption, but rest assured, it's all in the seed. This code might actually be a little outdated, so use at your own risk.
crypt.gml - the scripts for GM. You may import them by going to Scripts > Import Scripts...

GEX
I did not make a GEX for this dll, DFortun81 made one, but may have used an outdated version of the dll. You can find a link for it in his post below.

Usage
There are 6 scripts - one to initialize (which you must do before calling any of the other scripts), one to free (which you should do once you are done with the dll), and 4 different ways of cryption. Look inside each of these scripts for information on how to use them and what they do.

XOR cryption is interesting because you decrypt the same way you encrypt. You just xor the file with the same seed. Thus, you only need one of the 4 crypt scripts - which one you need depends on exactly how you want it to work.
All 4 crypt functions return 0 on failure and 1 on success.

crypt - This will crypt a given file with a given seed string, and output the results to a separate file. To decrypt, you switch the input and output files (and/or provide a new output file).
cryptf - Similar to crypt, only you provide a seed File instead of a seed String. The dll will handle the rest, but how it works is it will read the file into a buffer string and then pass it to crypt. WARNING: this will load the entire seed file into memory, so ensure that the seed file is small enough to be held in memory. 10 MB is relatively safe, but 1 GB is NOT.
crypto - This will crypt a given file with a given seed string, and output the results back into the same file.
cryptof - This will crypt a given file with a given seed File instead of a seed String. It will overwrite the original file with the results. WARNING: this will load the entire seed file into memory, so ensure that the seed file is small enough to be held in memory. 10 MB is relatively safe, but 1 GB is NOT.

How powerful is this encryption?
XOR encryption is only as secure as the seed. I recommend the seed being as random as possible, and if it's a very short one, hash it. It might also be a good idea to run through a few different keys for best results. (Thanks Core_12)
I've also been told that XOR encryption works very well when the seed is very similar to the input file. This is because bytes with the same value will result in a 0 byte, which is very hard to recover if you don't have the seed or don't know the original format.
Please also take a note at the small text below the "philosophy" bold point. If your seed is out in the open, your seed isn't very secure either. It's not too difficult to find the seed when your game is running. Also see this post for more information: http://gmc.yoyogames...dpost&p=2323813

Errors or "What If..."
If you do not have proper permissions/privilidges to perform the operation (eg, attempting to access a folder that your login account cannot access, or attempting to write to a file that is read-only), the dll will likely return 0 indicating failure.
If you provide a non-existing file for the seed file or the input file, the dll will likely return 0 indicating failure.
If you provide an existing file for the output file, the dll will overwrite it, no questions asked.

Future Plans
I do not have any particular future plans with this. I would welcome other projects similar to this to feel free to incorporate this into them - such as XRP (I've already talked with EDP and they are already planning on using it) and the other encryption examples.

Comments welcome
Please feel free to post questions, comments, suggestions, critiques, etc. If there already exists a dll for this purpose, I deeply apologize, but it was not posted in the pinned topic or Hobbel's database, so I figured there are none.

Edited by IsmAvatar, 09 September 2007 - 05:41 PM.

  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#2 GearGOD

GearGOD

    Deus Verus

  • GMC Member
  • 2153 posts

Posted 20 January 2007 - 11:37 PM

I'm looking into read+write mode for C, so that crypto and cryptof don't need to load the entire file into memory

Do you think it's in theory possible to xor two (infinite for all we care) streams given they're on two different physical drives, and how fast would you expect that process to run compared to a raw read of the decrypted equivalent?
  • 0
Engineers are not programmers. Stop thinking that you can save a few bucks by writing code yourself instead of hiring a programmer. Your code sucks.

#3 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 21 January 2007 - 04:23 AM

I don't quite follow your question. Perhaps you weren't specific enough, or perhaps it would help if you'd give me an example.
If by two different physical drives you mean just two hard drives - C and D, then I don't see how that would effect the speed at all (and yes, I would assume it's very much possible - just provide the absolute path to the file - this assuming you have priveledges to said folder/drive).
How fast is it to encrypt a file compared to reading a raw file? Well, encrypting a file is a 3- to 4-step process: [Read Seed File], Read file, encrypt, write file. Reading a file is a 1-step process: Read File. Thus, I would guess it would take 3 to 4 times longer to encrypt than to simply read. This assuming you use the same method to read as you use to encrypt; that is to say, if you use crypt or cryptf, you would have to compare by reading the raw data in 512 byte increments, and if you use crypto or cryptof prior to the memory-saving technique, you'd read the entire raw file into memory in one fell swoop.

Edited by IsmAvatar, 21 January 2007 - 04:24 AM.

  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#4 Toon-Master

Toon-Master

    Half-Toon Hero!

  • New Member
  • 340 posts

Posted 21 January 2007 - 03:51 PM

Nice DLL it can be useful indeed. Nice thought of giving the source too, could help some people. I don't think it's strange to release a source when it's just xor.

Nice work!

- Toon-Master
  • 0
D: I'm sorry if I'm unavailable for answering questions through messaging on GMC.
-------------------------------------------------------------------
I love Leanny Basil, Heart on Artivale. You inspired me for so many years.

#5 Ansgar

Ansgar

    OM Studios

  • New Member
  • 333 posts

Posted 21 January 2007 - 05:39 PM

Nice dll, I'll probably use it, if it proves itself better (faster) than Ultracrypt (which I believe it will).

Just one glitch in the initialization script:
global.fcryptdll = "crypt.dll"
global.fcrypt = external_define(global.cryptdll,"crypt",dll_cdecl,0,4,1,1,1,0)
global.fcryptf = external_define(global.cryptdll,"cryptf",dll_cdecl,0,3,1,1,1)
global.fcrypto = external_define(global.cryptdll,"crypto",dll_cdecl,0,3,1,1,0)
global.fcryptof = external_define(global.cryptdll,"cryptof",dll_cdecl,0,2,1,1)
The "global.cryptdll" in the external_define should probably be "global.fcryptdll". <_<

-Ansgar-
  • 0

#6 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 21 January 2007 - 07:30 PM

Oops, sorry. Fixed. If you downloaded before 2007-01-21@19:16 GMT, please redownload.
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#7 Core_12

Core_12

    Commander

  • New Member
  • 154 posts

Posted 21 January 2007 - 10:35 PM

XOR encryption is only as secure as the key. I recommend the "seed" being as random as possible, and if it's a very short one, hash it. It might also be a good idea to run through a few different keys for best results.
  • 0

#8 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 24 January 2007 - 06:57 AM

Thanks, Core_12, I've put that into the Original Post, if you don't mind.

A bug was noticed in version 1, and thus I had to take it offline. However, I researched read+write and recoded it and corrected the bug, and am now happy to announce version 2.0. The seed is still loaded into memory, but the input file in crypto and cryptof is no longer loaded completely into memory, but is instead buffered in 512 bytes at a time, so it doesn't hog up the memory. Also, the seed used to be read into memory and never freed until the program ended. This has now been corrected, and the memory is freed as soon as the function call ends.

If you downloaded before 2007-01-24@06:45 GMT, please redownload.

Edited by IsmAvatar, 24 January 2007 - 06:57 AM.

  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#9 iwulff

iwulff

    GMC Member

  • New Member
  • 16 posts

Posted 24 January 2007 - 10:40 PM

hmm.. i am currently using this for my savefiles. Since you know more about encryption security and such, do you think this would be smart to do?
  • 0

#10 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 24 January 2007 - 11:43 PM

It is general purpose, but savefiles, client data, etc, are usually the kinds of stuff that would employ it for a game. So yes, it is great for savefiles.
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#11 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 11 February 2007 - 09:44 PM

Wow this DLL is really fast compared to the others I've used in the past.

Great job.
-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#12 flakky

flakky

    GMC Member

  • New Member
  • 20 posts

Posted 11 March 2007 - 05:19 PM

Nice! Which compiler did you used to make this?
  • 0

#13 DanishDragon

DanishDragon

    GMC Member

  • New Member
  • 9 posts

Posted 12 March 2007 - 09:19 AM

indeed, very nice .dll, easy to use and very fast.

Keep up the good work, IsmAvatar
  • 0

#14 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 02 June 2007 - 03:46 AM

I made a GEX file for the DLL. You can download it here.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#15 NEED HELP sorta

NEED HELP sorta

    GMC Member

  • New Member
  • 1501 posts

Posted 06 June 2007 - 07:33 PM

Cool, and very simple, I like it.
  • 0
http://img159.images...025/scr1ea8.png
http://img374.images...944/scr2hf6.png
Alagaesia Online - Not yet released.

You can bring the release date closer, by helping at the following topics:
Intro Narration
Music Topic

#16 Zorgges

Zorgges

    GMC Member

  • Banned Users
  • 823 posts

Posted 13 August 2007 - 10:33 AM

I am a noob and dont know how to use this. Please tell me how to encrypt the file test.gif. And how to decrypt it.

#17 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 21 August 2007 - 06:03 PM

Nice! Which compiler did you used to make this?

<{POST_SNAPBACK}>

gcc, as found in Dev-C++ (although I used Notepad, not Dev)

I made a GEX file for the DLL. You can download it here.

-DF81

<{POST_SNAPBACK}>

Thanks, but 64 digits has been having trouble lately. You may want to upload it to another host. If I manage to get my hands on a copy, would you mind if I mirror it?
Otherwise I might just make my own gex.

I am a noob and dont know how to use this. Please tell me how to encrypt the file test.gif. And how to decrypt it.

<{POST_SNAPBACK}>

You will need a seed. You can either choose a string, like "Hello World", or a file. Then, choose whether you want to overwrite test.gif with the encrypted version, or would rather create a separate encrypted file. Once you've made those choices, it's simply a matter of picking the right function for those choices. To decrypt, use the same key and the same method. This is also explained in the comments in the scripts.

Edited by IsmAvatar, 21 August 2007 - 08:33 PM.

  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#18 acrog2

acrog2

    average user

  • GMC Member
  • 1118 posts

Posted 22 August 2007 - 04:21 AM

I get:

___________________________________________
ERROR in
action number 1
of Create Event
for object encript:

In script crypt_init:
Error in code at line 1:
//XOR cryption//by IsmAvatar//Written in C, source code included in crypt.c//The magical thing about XOR cryption is that it can encrypt or decrypt //using the same algorithm, as long as you use the same seed//Thus, you can mix and match functions, //just as long as the seed matches up in the long run.//A seed string and seed file containing the same characters //will work just fine. After all, calling cryptf or cryptof will just //read the seed file into a seed buffer string and then call crypt or crypto!//All functions return whether they were successful (true) or not (false)//A failure usually only happens if E.G. the files could not be opened
global.fcryptdll = "crypt.dll"global.fcrypt = external_define(global.cryptdll,"crypt",dll_cdecl,0,4,1,1,1,0)global.fcryptf = external_define(global.cryptdll,"cryptf",dll_cdecl,0,3,1,1,1)global.fcrypto = external_define(global.cryptdll,"crypto",dll_cdecl,0,3,1,1,0)global.fcryptof = external_define(global.cryptdll,"cryptof",dll_cdecl,0,2,1,1)

at position 741: Unknown variable cryptdll

any help?

nvm, I changed global.fcryptdll to global.cryptdll

Edit:
I like the dll, I encrypted AND compressed a 50 mb file in a few seconds!

Edited by acrog2, 22 August 2007 - 05:25 PM.

  • 0

#19 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 24 August 2007 - 03:58 AM

On August 21, 2007, I was doing some maintenance work on my server and accidentally deleted the file. I've put up an older copy just so it's not a broken link. If anyone has a fairly recent version before August 21, please allow me to have a copy.
My Apologies for the Inconvenience.
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#20 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 03 September 2007 - 03:52 PM

Thanks a bunch DFortun81, 64Digits was finally up long enough for me to download the gex. Not only have I included it in the zip file with the other files, but I was able to restore my dll and gml from it, so that older copy stuff is no longer an issue.

If you downloaded a copy between August 21, 2007 and today, September 3, 2007, please redownload, as this is now the latest version. If you downloaded between January 24, 2007 and August 21, 2007, you may keep your copy because it was the latest version.
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#21 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 03 September 2007 - 04:39 PM

Well GM is capable of xor encryption and I got some to work once but again gm is slow, c is efficient, and encrypting an entire file without having to code it is nice =P Nice work as always
  • 0

#22 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 04 September 2007 - 08:06 AM

Thanks a bunch DFortun81, 64Digits was finally up long enough for me to download the gex. Not only have I included it in the zip file with the other files, but I was able to restore my dll and gml from it, so that older copy stuff is no longer an issue.

If you downloaded a copy between August 21, 2007 and today, September 3, 2007, please redownload, as this is now the latest version. If you downloaded between January 24, 2007 and August 21, 2007, you may keep your copy because it was the latest version.

<{POST_SNAPBACK}>

I'm glad I could be of service to you. =D
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#23 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 08 September 2007 - 07:18 AM

There's only crypt and crypto in the gml file and those don't even have any documentation so I have no idea how to use them... =/
  • 0

#24 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 08 September 2007 - 03:36 PM

dang it... DFortun's extension must be using an outdated version...

Well, I had a look around my computer and did manage to find the most recent version, complete with in-script documentation, cryptf/cryptof, and buffering.

If you downloaded between August 21, 2007 and today, September 8, 2007, you have an outdated copy and should redownload for the latest version.

I have not included DFortun's extension in this one because it seems to be using an outdated version.

Edited by IsmAvatar, 08 September 2007 - 03:49 PM.

  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#25 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 08 September 2007 - 04:38 PM

Alright sweet; what would I do if I don't want to use a seedfile? Would I give it a 0?

Well whatever using a seed file is fine I guess but I can't get it to work. Here's the code I used:
cryptof(working_directory+"applepie.txt",working_directory+"seed.txt");
it doesn't even attempt to modify the file..

Edited by daz, 08 September 2007 - 04:49 PM.

  • 0

#26 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 08 September 2007 - 10:56 PM

If you don't want to use a seed file, don't call the scripts pertaining to seed files!

crypt and crypto are your weapons of choice here. You will need to provide a seed string instead of a seed file.

Check the return value of the script to see if it has returned an error. Also, check the contents of "seed.txt". If it is either empty or contains only 0-bytes, your file will not be encrypted, because any number N xor 0 = N (simple enough, really). If it returned an error, make sure both files exist. It may be possible that you need the final backslash as well, as working_directory may or may not include the final backslash.
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#27 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 08 September 2007 - 11:27 PM

Ah it was the backslash thing; and yeah I realized that there were different scripts for seeds after I posted anyways yeah I got it to work :P Just to prove how amazing this can be, here's the original:
mmm apple pie is yummy aren't it? :9 :9 ^-^
and the output
 K
  JI]U[@DF@QFD[]SQUF4H7
and the seed
adsklfjeij940823d
Soo yes I love your dll =P I'm going to use it to encrypt my savefile in my next game
  • 0

#28 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 08 September 2007 - 11:37 PM

I'm sorry to start about this, but what exactly is the point of having this kind of encryption?

The only way it's reasonably secure is when you need to transfer some data to someone, and when only you and that other person have the same key. So, it could be used to safeguard data between sender and receiver.

It's useless as a method of data encryption in itself if you don't want the receiver to see what's inside, because you always have to supply the key (string or file) with the game. And I'm sure you already know it's not hard to figure out what that key might be.
  • 0

#29 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 08 September 2007 - 11:45 PM

Yeah well I don't have any better way of encryption.
  • 0

#30 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 09 September 2007 - 05:31 PM

As I've stated in the original post, it's certainly not the end-all-solve-all of encryption, for what you've stated above, and a number of other possible problems that could arise (e.g. filling the DLL with no-ops so that a call to the encryption method would have no effect - or replacing the dll with one with an empty function). Come to think of it, I could probably place a similar note in the section that says "how secure is it?". But it's a great countermeasure against non-determined hackers who don't want to deal with encryption, because you can take your plain text file which is otherwise editable, or plain image file which is otherwise viewable, and encrypt it. This will not only discourage any potential file-side resource theft or undesired modification, but will also make it a greater effort on the hacker's part to do so because he'd have to first recognize that it is indeed xor encryption, and then realize how to find the key.
I've also used this to encrypt some sensitive information on my computer by seeding a file with another file, and then seeding the seedfile with another file, and so on, so even if they did find the seedfile, they'd need to decrypt all the dependencies in the right order first, which is definately a huge discouragement (if they even figured out to do that in the first place).

daz, why do you feel a need to encrypt a save file? Is it really a problem if the player wants to cheat in their own copy of the game?
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#31 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 10 September 2007 - 01:48 AM

I dunno usually people like that'll give away game secrets such as where certain powerups are or are arrogant or fill an entire topic of how they hacked my/someone's game so then everyone tries and then it gets completely off topic of the game. Besides it makes me feel fuzzy inside to know that I stopped 10 people from changing all their stats/whateverelse in the savefile =p
  • 0

#32 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 10 September 2007 - 07:33 PM

It also makes you fuzzy inside when you kill one of your human enemies, but you just don't do it because they kinda have a right to their own life. (Not that I'd know, I've never killed anyone - I'm just going by the testimonials of a few people who actually have)

Consider it this way - by encrypting it, you are turning it into a black-market, so any person who manages to break the encryption (which isn't all that hard to do, because the key is stored in-game, like Smarty said above), in which case the hacker will be more likely to spam your topic big time with the cracks.
On the other hand, if you permit it, you're saying "it's ok to mess with your version of the game." In which case, the hacker won't feel so obliged to make such a big deal out of it, and you can keep things more civil that way.
This is called the legal philosophy of Anarcho Capitalism, and there are many great examples throughout history where it has worked very well. Personally I have a few qualms with it, but within our current society (and community), it is the most feasible solution.

Edited by IsmAvatar, 11 September 2007 - 01:17 AM.

  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#33 daz

daz

    GMC Member

  • GMC Member
  • 804 posts
  • Version:GM:Studio

Posted 12 September 2007 - 12:51 AM

Why do you always have to be right? xD Oh well twas worth a try
  • 0

#34 conman124

conman124

    The Almighty!

  • New Member
  • 282 posts

Posted 17 September 2007 - 12:03 AM

Excellent! I have created a banner for you, it's not high quality, but I wanted to okay it with you before I put it in my game:
Posted Image

Excellent DLL,
--Conman124
  • 0

"We have no government armed with power capable of contending with human passions unbridled by morality and religion . . .
our Constitution was made only for a moral and religious people. It is wholly inadequate to the government of any other." - John Adams


#35 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 17 September 2007 - 04:23 PM

It's your game and your banner, if you want to put it in your game, I'm not going to stop you.
Just remember to put my name (IsmAvatar) somewhere in the credits for the dll.
  • 0
Posted Image LateralGM is an IDE for editing GM files on Linux, Mac, and Windows.
We also house the GM File Format Documentation and other projects of that nature.
IsmAvatar.com | Examples | Scripts | Particles | DLLs | Credit Me
Email | Registered

#36 tristiano77

tristiano77

    GMC Member

  • GMC Member
  • 349 posts
  • Version:Unknown

Posted 04 October 2007 - 02:16 AM

thanks so much, this is great. VERY FAST!
  • 0

#37 royboyjoytoy2

royboyjoytoy2

    GMC Member

  • New Member
  • 308 posts

Posted 25 March 2008 - 01:05 PM

I incorporated this into a program I wrote for the Nintendo DS .
  • 0
"The world will soon see the most successful game ever."

#38 leif902

leif902

    GreenMan Games

  • New Member
  • 748 posts

Posted 27 March 2008 - 10:46 PM

XOR encryption is only as secure as the key. I recommend the "seed" being as random as possible, and if it's a very short one, hash it. It might also be a good idea to run through a few different keys for best results.


XOR encryption is only as secure as the numbers in it. Any known value and the key can be easily calculated. However, still useful.

Edited by leif902, 27 March 2008 - 10:46 PM.

  • 0
Sam Whited (Leif902)
YoYo Games Wiki | SamWhited.com (blog)

#39 tamper2

tamper2

    GMC Member

  • New Member
  • 369 posts

Posted 24 February 2009 - 04:22 PM

Thank you for the dll...
I used it.
I made me a simple gex file with only the crypt command and used it.
EDIT: hmmm... for some reason decrpytion not working so good...
What am I doing wrong?

Tamper :)

Edited by tamper2, 25 February 2009 - 01:57 PM.

  • 0


#40 Sirosky

Sirosky

    GMC Member

  • GMC Member
  • 1601 posts
  • Version:GM:Studio

Posted 17 August 2012 - 06:52 PM

Necroing on a topic, but just wanted to say thanks, it worked really well. :biggrin:
  • 0

gcjRa8D.png