The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: cman on May 06, 2010, 10:41:39 PM

Title: Encryption/Decryption Program
Post by: cman on May 06, 2010, 10:41:39 PM
Anybody written an Encryption / Decryption program for text files? If so , could you post the code? Thanks!  :bg
Title: Re: Encryption/Decryption Program
Post by: qWord on May 06, 2010, 11:15:40 PM
what about RC4 (http://en.wikipedia.org/wiki/RC4)?  :bg
Title: Re: Encryption/Decryption Program
Post by: dedndave on May 06, 2010, 11:44:26 PM
seems like about a year ago, they were playing with base 64 encoding - try the forum search tool
a lot depends on what kind of security you need
perhaps you just want a text file-packer - fast - simple code - but not very secure
i have routines for encoding/encrypting/decoding numeric strings
but they weren't really intended for non-numeric text
Title: Re: Encryption/Decryption Program
Post by: clive on May 07, 2010, 12:33:50 AM
Does the output have to be text/ASCII? Encrypting/Decrypting text files works pretty much the same as binary ones.

I would typically recommend compressing data, text or otherwise, before encrypting it. RC4 or AES are both worth considering.
Title: Re: Encryption/Decryption Program
Post by: cman on May 07, 2010, 07:08:29 PM
Thanks for the information! I am just looking for a application to encrypt text files on my drive ( I know many commercial and free applications are available as well as some included with Windows , but I thought it would be interesting to write one of my own ). Thanks for your input!  :U
Title: Re: Encryption/Decryption Program
Post by: Ossa on May 08, 2010, 01:01:54 PM
I wrote this back in 2004 - i.e. when I was leaning ASM - as a result it is not optimised at all, it has no GUI (it has some console options), it doesn't hash the password before using it to generate the key sequence, and all sorts of other bad stuff... it does, however, work. In addition, it uses RC6... I am unsure about the legal aspects of using RC6 wikipedia has the following to say:

Quote
As RC6 has not been selected for the AES, it is not guaranteed that RC6 is royalty-free. As of January 2007[update], a web page on the official web site of the designers of RC6, RSA Laboratories, states the following:

Quote"We emphasize that if RC6 is selected for the AES, RSA Security will not require any licensing or royalty payments for products using the algorithm".

The emphasis on the word "if" suggests that RSA Security Inc. may now require licensing and royalty payments for any products using the RC6 algorithm. RC6 is a patented encryption algorithm (U.S. Patent 5,724,428 and U.S. Patent 5,835,600).

and, a quick check of the RSA website has nothing more up-to-date regarding licensing that I can see. I'll therefore assume that it is acceptable to have it for personal use and upload it.

Ossa
Title: Re: Encryption/Decryption Program
Post by: cman on May 09, 2010, 06:49:55 PM
Thanks for the code Ossa ! :U