Computer Science Canada Encryption module |
Author: | Geniis [ Mon Nov 16, 2009 9:11 pm ] |
Post subject: | Encryption module |
This is just a simple little module i coded named Crypto that can encrypt and decrypt files. Its easy to use, its explained in the readme. Just use Crypto.EncriptFile to encrypt a file and Crypto.DecryptFile to decrypt a file (i recommend only decrypting files encrypted with Crypto). There is also a way to change the keys used. Leave feed back if you fell like it, or if you find bugs... i might release a better version of it later on. |
Author: | SNIPERDUDE [ Tue Nov 17, 2009 1:25 pm ] |
Post subject: | RE:Encryption module |
Great job + bits |
Author: | mirhagk [ Tue Dec 15, 2009 12:03 am ] |
Post subject: | Re: Encryption module |
This reminded me of an earlier encryption program I created, it uses a key, and you can create keys for it (that way even if someone has the program they can't do very much cuz need the exact key) |
Author: | yazdmich [ Thu Dec 06, 2012 10:04 am ] |
Post subject: | Re: Encryption module |
mirhagk @ Tue Dec 15, 2009 12:03 am wrote: This reminded me of an earlier encryption program I created, it uses a key, and you can create keys for it (that way even if someone has the program they can't do very much cuz need the exact key)
I edited your program as a module and added a few features. |
Author: | mirhagk [ Thu Dec 06, 2012 5:46 pm ] |
Post subject: | RE:Encryption module |
Ahh code from my very early days of Turing, it makes me realize just how much I've learned over the past 3 years. I'd suggest allowing the programmer pass in file names in the module's functions, so that it can truly be used as a module. I would then suggest using a better encryption algorithm, a one time pad would actually be pretty good for this scenario, is easy to implement, and is actually the most secure algorithm (so long as it's used right) |
Author: | yazdmich [ Thu Dec 06, 2012 6:32 pm ] | ||
Post subject: | Re: RE:Encryption module | ||
mirhagk @ Thu Dec 06, 2012 5:46 pm wrote: Ahh code from my very early days of Turing, it makes me realize just how much I've learned over the past 3 years.
I'd suggest allowing the programmer pass in file names in the module's functions, so that it can truly be used as a module. I would then suggest using a better encryption algorithm, a one time pad would actually be pretty good for this scenario, is easy to implement, and is actually the most secure algorithm (so long as it's used right) 2 things: I thought I did allow for variable pass-through? I'm actually relatively new to Turing (and programming in general) so I'm not quite sure how to implement a one-time pad cipher
|
Author: | mirhagk [ Thu Dec 06, 2012 11:54 pm ] |
Post subject: | RE:Encryption module |
Ah I only really looked at the GenKey method, the only one where variables aren't passed through lol. A one time pad basically generates a really large list of random characters, and uses this as the key (the key must be as long as the message in order to be perfectly secure). You can then go through and use some method to encrypt the message in such a way that you can reverse it. A very common method is to use the XOR operator, which basically works by comparing the bits of each number and puts a 1 every time they are different, and 0 every time they are the same, eg: 110001 message 101010 key ===== 011011 result Then you can XOR the result with one of the values to get the other one: 011011 result 101010 key ===== 110001 message |
Author: | yazdmich [ Fri Dec 07, 2012 9:03 am ] |
Post subject: | Re: RE:Encryption module |
mirhagk @ Thu Dec 06, 2012 11:54 pm wrote: A one time pad basically generates a really large list of random characters, and uses this as the key (the key must be as long as the message in order to be perfectly secure).
I'm guessing 255 chars long would be best, so that any line passed through can be encrypted. Also, should it be completely random (with repeated characters)? |
Author: | AntoxicatedDevil78 [ Fri Dec 07, 2012 10:29 am ] |
Post subject: | RE:Encryption module |
Amazing!! |
Author: | mirhagk [ Fri Dec 07, 2012 12:18 pm ] |
Post subject: | RE:Encryption module |
Yep completely random is best. So long as you use the exact same key it will decrypt and encrypt fine. Technically you should have perfect randomness (random in turing isn't fully random), but the concept is the same. |
Author: | yazdmich [ Fri Dec 07, 2012 1:50 pm ] | ||
Post subject: | Re: RE:Encryption module | ||
Is this good for the key generator?
|
Author: | mirhagk [ Fri Dec 07, 2012 2:56 pm ] |
Post subject: | RE:Encryption module |
Yeah that will generate a long enough key (again it's not perfectly secure, but you can't make it perfect without true random numbers). Just curious, is there any reason for using cha instead of just using alphas? |