Calc Crypto and the GPC
|
Posted on 3 September 1998
The following text was written by S.T.L.: Well, it's late at night (yet again) and
I'm in the mood for a good rant. Well, this article explores one particular idea, but it's
also about a general issue. And somehow, I get to another particular idea after the middle.
Ah well. I initally had a long 2-line name, but I suppose "Calc Crypto" is acceptable for
"Calculator Encryption". Quite a while ago, I started to become fascinated with
Number Theory (primes and such) and I had a TI-85. Obviously in class, when I had all my
work done, I fiddled around with it. I made primality proving programs and all sorts of
stuff. But the TI-85 was pretty limited because much of Number Theory involves really huge
numbers. Anyways, that meant that if I *wanted* to do anything remotely nifty, I
had to whittle it down into a smaller version so my TI-85 could run the thing. Thus, after
reading one of my books, I had an idea. It basically goes back to something that a lot of my
classmates do, but I hardly ever: passing notes. Now, I'm not one to advocate
passing notes. But, I know enough to know some features of them: - A passed note has
to be done in relative secrecy. After all, the teacher certainly can't know what's in the
note, eh?
- A passed note has to be done quickly. This is more of a side-effect of writing
them on paper, because if it is passed slowly, then anyone can open it up and read it. You
*could* give it to Al, "Hey Al, give this to Bob in your next class, cause I don't have him
in any of my classes" but then you have to trust Al.
- A passed note doesn't contain that
much information, but it can contain a fair amount, up to a written pages' worth.
This got me thinking. What if industrial-strength encryption was provided on TI
calculators? Now, I'm not talking about cheesy, "I dreamed this up last night" encryption,
because every programmer seems to fancy himself a cryptographer. I'm talking about an
encryption algorithm that is used in commercial software, and has no easy way to break it.
(Yes, it's related to Number Theory.) This could solve problems of classroom communication.
(And yes, it could be used elsewhere.) But first, an interlude. Words used here:
- Encryption: Scrambling a message so no one can read it, without a
Secret Key.
- Decryption: Descrambling said message with the Secret Key.
- Public Key Encryption: Most encryption involves two people sharing one
secret key. The stuff I'm thinking of allows one person to give everyone their Public Key,
which allows messages to be SENT to them, but only their Secret Key would let them read it.
- Compression: Making a message take up less space.
And we're
back.... Now, what would public-key encryption do for note passing? First of all:
- Forget secrecy. You can scrawl the note on the blackboard, and the teacher won't be able
to read it, without intercepting your TI. (Solution: decrypt the message in another class,
or get a locking program.)
- Forget timeliness. You can (w/o scrawling the note on the
blackboard) write it down on a sheet of paper, and get your classmates to give it to someone
- but you could let them do it next class. Then you don't have to trust them not to read it.
Of course, all these things would be hard unless the program could compress
messages. With the ideas I currently have, public keys would be a string of 64 characters,
and messages 64 or 128. This is because I know a way for extremely simple Special Purpose
Compression, it would really only work for the Calculator Encryption project. And,
importantly, all someone would have to do is give out their Public Key to everyone who has
the encryption program. Their Secret Key remains on their calculator, their Public Key goes
everywhere. (Public encrypts messages, Secret decrypts messages.) Well, I've done
this for the TI-85 already. Problem was, it used really, really cheesy 8-bit encryption. I
can crack that in my head. But with the TI-92, I could program 384-bit encryption. That's
the low end of commercial PC software, and the best part is: while it's not immune to the
government, or even to a large corporation, it will defeat most anyone a high schooler
fears. (Though a large, well-funded university could be amused for a month trying to break
it.) I've already got plans as to how to actually implement this thing, too. My
question to everyone, is this concept of Calculator Encryption USEFUL or WORTHLESS? I've
only thought of one application for this, but it probably has more. And there are more
questions along with this: exactly what SORT of programs would be useful on a TI calculator?
For example: - I got this idea for Calculator Encryption off of the PC program PGP.
- The TI-92 Text Editor is basically a PC's NOTEPAD.EXE.
- Spreadsheets?
- Games?
(Well, I know the answer to this one, but I had to mention it, else everyone would tell me I
forgot it.)
- General Purpose Compressors? (Very, VERY hard to implement, I would guess,
but possible.)
- Other programs?
Actually, the idea of the General Purpose
Compressor is VERY interesting. Probably more interesting than Calculator Encryption. *ahem*
I think I want to talk about that for a little while. Well, I've gone from a particular
idea, to a general idea, back to a particular idea that will turn out to be pretty general.
Hehehe. Anyways... If one had (let's use an abbreviation) a GPC, what TI
calculators could it run on? Of course, the TI-92+, the TI-92, and the TI-89. (After all, if
it won't run on them, where WOULD a GPC run?) Most likely I could see a TI-86 or TI-85
assembly program running it. Putting a GPC on a TI-83 or TI-82 is doubtful, but maybe a
programmer would find a way. Ironically, the more lower-end the calculator, the nifiter a
GPC would be. A General Purpose Compressor would crunch programs/data into a smaller space,
thus (in effect) giving you more memory, at the cost of not being able to use the compressed
program until uncompression. Sort of like the TI-92+ data archive. Now, I envision
a BRIGHT future for a GPC. Imagine being able to store twice the amount of data your
calculator should hold (it would probably be closer to 1.5x, but let's stick with 2x). For a
TI-85, that's about 40K (or is it 50? I don't remember). For a TI-92, that would be 120K.
For a TI-92+, it could store an absolutely amazing 1MB of data! (Though still, no single
uncompressed program/data could be more than 180K. Ah, I'll live with it.) In fact,
games (arrrgh! Ah well, I suppose I have to explore what a GPC means to them too) could have
a large compressed bundle of levels included with them. When one level is needed, it could
be uncompressed, used, then recompressed to make room for the next level. Thus you could
create truly massive games with 2x the amount of levels you'd have without a GPC.
And I bet there's all SORTS of nifty applications for a General Purpose Compressor. Though
it's 3 in the morning, and I can barely think coherent thoughts. *ahem* I, for one, would
love to craft a GPC, though I don't have the assembly skills to do so. Probably it'd be a
project close to making a shell. Right now, the Special Purpose Compressor I have
in mind doesn't really compress at all. All it does is transform integers into strings. What
it does it convert an integer into base 2. Then it converts the base 2 to base 64. This of
course saves space, and makes a 384-bit integer into a 64-character string. This is because
the binary expression "110010011011" can be represented as the hexadecimal (base 16)
expression "C9B". I think. I'm rusty on my Bin-Hex translating skills. But a General Purpose
Compressor could work on real numbers, strings themselves, lists, matrices, and programs.
What's odd is that a list on the TI-92 seems to take up less space than the
identical list on the TI-85. Hmmmm. I do't have time to explore this further. (The reason
follows). Perhaps it uses some sort of compression already. Ah, a quick note: I've
been writing articles with a very short amount of time between them, but I'll slow down - I
go back to school soon. And it does take me a while to become obsessed enough about
something to write a good article. :-D Well, thank you for sticking with me through
this long rant. I have enough of my thoughts, what I'd appreciate are YOUR thoughts! Let's
see.... - Would Calculator Encryption be a useful, or worthless idea?
- Where else
could Calculator Encryption be used?
- What other programs would be useful or worthless?
- Would the General Purpose Compressor be useful or worthless?
- What could the General
Purpose Compressor be used in?
- Anything else?
|
|
Reply to this item
|
Programs that use weak encryption
|
Olathe
(Web Page)
|
imcode(), a TI-89 BASIC program, uses weak encryption (it doesn't even use a key) :
1) It reverses the words in the message
2) It reverses the characters in the message
3) It adds a random character on the right and on the left of each space
4) It adds a random character to the beginning and to the end of the message
5) It goes through and converts the string to a list (at the same time encrypting each character) using the following :
seq(ord(mid(string,x,1)) + x xor x,x,1,dim(string))
To decrypt it, simply undo step 5 through step 1.
It may not work exactly like this (I couldn't see the actual program because it is edit-locked), but this will do exactly the same thing as the program.
This took six hours of free time, because I couldn't look at the BASIC program. It is even easier for a math teacher to just copy the program (when they take your calculator for the rest of the class) and use it to decrypt any future messages they come across.
|
Reply to this comment
|
19 August 1999, 21:26 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Sean
|
wow, what a great idea
im the first one!
|
Reply to this comment
|
4 September 1998, 02:06 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Ю.Þ£ÞÞ£®
(Web Page)
|
The encyption would have to work with an ir link or something to that effect for it to be worthwhile *IMO*
|
Reply to this comment
|
4 September 1998, 02:22 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Paul DeLeeuw
|
Encryption can be done and done well, but I don't see it as useful. It would be, to me, no more than a toy. And 8 bit encrypion would still be plenty as long as the teacher doesn't know the method of encryption. As for the compression, compressing a 384-bit integer into a 64 byte string results in 520-bits (63 bytes) of space taken up by that string! Breaking it down:
8 bits * 64 characters in the string = 512 bits
8 bits null character to end the string.
This makes it increadably inefficient! In fact, compression at the bit level takes an increadably complex compression routine. Compressing, say, level matrices is much easier, but it would have to be greatly modified to be a "GPC". Thats my 2 cents, although it looks more like 2$ to me.
|
Reply to this comment
|
4 September 1998, 02:29 GMT
|
|
MY opinions about the ideas in question.
|
Leon Pierre
|
IMHO, Compression very good, as long as it doesnt take too long. Encryption seems like one of those ideas that not everyonr would use. Sort of like the IR-link. Some people use it, but not everyone does. If the encryption could be used in any other way than to "pass notes" on your calc, then I might see a better use for it. Maybe storing sensitive data (locker combination, some of use are forgetfull..)? Encryption could be useful, but it doesnt seem greatly useful now, but maybe someone would find that "killer app" that would make it very useful. A program that would be useful though, imho, would be a shell that could send and receive programs and stuff w/o exiting to the linking screen, but that is out of topic (but you did ask "What other programs would be useful..."). But if the compressor idea could be ideally and efficiently executed, then it would take off. This is my opinion.
|
Reply to this comment
|
4 September 1998, 02:36 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Jbrett
(Web Page)
|
There is a LZSS based compression program for the ti-86 called BLOAT. It is by Matthew Shepcar.
|
Reply to this comment
|
4 September 1998, 02:38 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Alan Wong
|
I'll keep this short and too the point. The following comment will defeat all other comments made against this possibly very useful tool (still can't think of how it can be used yet, but it can be):
Why not?
Wouldn't it be useful just to have it? Its like owning a computer that costs a million dollars. Everyone wants it. Its there, and its elusive. But when you get it, you have no clue what to do with it since its so damn powerful!
Alan Wong
Damnation
|
Reply to this comment
|
4 September 1998, 02:53 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
John "Cryect" Rittenhouse
|
I think instead of using public key algorithms how about using the IDEA encryption algorithm
I did write my own algorithm and programed it in basic that used like a 64bit password and saved the message as a picture(even sneaker than a string caus who would guess else than it looks wierd). THe only problem it took forever to encrypt and my friends calculator link port got damaged which I programmed it on since at the time I didnt hve a ti-86.
|
Reply to this comment
|
4 September 1998, 03:02 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Cody Zimmerman
|
I think that compression idea is great but I think having to decompress the program to use it is a pain in the ass even if decompression time is short. What we need is a compression program that can compress as well as the program you described but doesn't need to decompress programs for them to work. Being able to have double or even 1.5x the memory would be useful especially for the TI-82 and 83 and even better and cooler when you have 98K of memory like on the TI-86. That's like 147K to 196K of memory for the TI-86!!! That would be absolutely and undeniably AWESOME beyond comprehension. Especially if you had a TI-89 or TI-92 or 92+.
|
Reply to this comment
|
4 September 1998, 05:26 GMT
|
|
1 2 3 4 5 6
You can change the number of comments per page in Account Preferences.
|