Re: Data Encryption

new topic     » goto parent     » topic index » view thread      » older message » newer message

>I have recently gotten into data encryption algorithms, and just to
>see, I have developed a *very* basic one, implemented into
>the program at the end of this letter.  I can get a sentence
>encrypted and decrypted fine, and I can also encrypt a file
>as well.  My problem is that when I try to decrypt the file,
>sometimes the marker that shows which bit to switch in
>the character ("ch" in the "decrypt_file" procedure)
>sometimes reads in a very strange value, and causes a
>subscript error.  It happens randomly, sometimes not at all,
>and it has me completely baffled.  I think this would be a
>very cool program, and useful too, if I could get it to run!!
>Any help as to what may be causing this weird error would
>be greatly appreciated!!  Thanks a lot.

I'll take a look at it. I have made one that uses password encryption. I
figure that if you use several passwords, and decrypt with the WRONG
password at least once, the file would be impossible to crack, especially
if I make a couple of changes to the basic algorithm. It's fast too.

This is how mine works:

It gets and confirms the password
It performs calculations on the password (adding the ASCII values up and
such and a little bit more) to get a number.
Seeds the randomizer to the number (set_rand(number))
Takes each character in the file, and adds a random number between 1 and
255 to it and puts it into the output file. (or subtracts in decryption)

Since it seeds the randomizer, the rand() results will always be the same
for each different password, but you have to know the password (or at
least a password that would give you the same number) in order to decrypt
it. (And you will need the program if I change a little bit that happens
in the main loop, since you won't know exactly what the formula is)

>  (Oh yeah, I'm a junior in high school, and while it may
>   not seem like much to you guys, my team came in 4th place
>   out of 40 teams in the SouthWest US in a computer
>   programming contest at UCF.  Yay me!)

Cool! That's a lot of competition. I got 1st at the C++ at the Great
Computer Challenge at ODU (i'm a senior in high school :).. But there
were only 5 total teams. The coolest part was beating New Horizons
Government School, who had won the last 3 years. They had 5 people on
their team. We had two, and it was our first time. :) We finished all
four programs (we weren't supposed to have enough time to do that.... :),
and 3 of them had a few bugs (not glitches! :) and grammar errors...
Imagine how well we could have done if we could have used Euphoria! ;)
(We did have Windows NT, so that sorta provided at least some subscript
checking for us....)

I recreated each program in about an hour, I think, in Euphoria at home.
Although I did know what we did and all after then, but I know we could
have done even better with Euphoria.. :)

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu