Re: TIB: Back to TI-BASICs


[Prev][Next][Index][Thread]

Re: TIB: Back to TI-BASICs




Jody wrote:
[...]

> Now THAT sounds interesting. Did you actually finish the encryption
> algorithm?

Yes, I finally settled for a simple one, namely the one that the Danish
Resistance Movement used during WWII.
I did it like this:
Let's say the password is 'encrypt', and the text is 'secret message'.
It's put up in the classical way:

encryptencrypt
secret message

It will then, one by one, take a letter from the text, translate it to
ASCII, translate the corresponding password letter into ASCII, add the
values and finally, if greater than 255, subtract 255.
It then displays the encrypted text, which will usually consist of a
bunch of nonsense special characters.
The reversal is just as simple.
When a new user is created in my blackjack program, he chooses a
password, and gets 10,000$ to play with. "10,000" is then encrypted,
using his password, and every time his account changes, the new values
is stored to the appropriate place in a list, again using his/her
password. The password is, obviously, stored in a local variable.
When the program starts up, you enter a username and a password. The
program then decrypts the appropriate account, using the given password,
and if the result is not a number, the password is deemed incorrect
(admitted, a rare case _could_ occur that allowed someone to decrypt to
another value, but hey, that's a calculated risk :-p)

> I wrote about a dozen programs that all did various
> encryption and decryption stuff from back in the WWII days. Simple
> stuff like a Caesar shift, a Vigenere encryption and decryption (if
> you knew the keyword), a program that could give the highest probable
> shift of a Caesar shift (so long as there wasn't a keyword involved),
> a program that displayed digrams, one that displayed trigrams, a porta
> encipherment, a nihilst encipherment, a program that displayed a
> frequency graph in alphabetical order, another program that let you
> choose between looking at a chart that showed how many of each letter
> and what % each letter took up and a _decreasing_ letter frequency
> graph (it showed the most frequently used letter at the far left,
> followed by the next most frequent...), a program that used the graph
> screen to display the coded text and allowed the user to input what a
> given letter actually was in plain text above the coded text (all of
> those letters would then have the plain text above them), a program
> that used a sequence of dots on the graph screen to encode up to 217
> letters and store them (coded in two different ways) as a picture, and
> finally, a program to decode that picture. Whew! I'm out of breath! :)
> Well, I was getting so into it that I didn't stop to record them as a
> I finished, and I dropped my calc before I got any of them recorded.
> :(((((((((.

*impressive*

> What did you mean by shuffling a list? Do you mean have a list of 52
> cards, and shuffle it?

Precisely.
 - Or, in my case, a list of 312 cards (6 decks). Actually, the program
permits the user any choice of 1-6 decks, with 6 as default.

-- 
          Rene Kragh Pedersen
------------------------------------------------------------------
man: Why did you get a divorce?
man:: Too many arguments.


Follow-Ups: References: