Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Community :: Articles :: Calc Crypto and the GPC
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

Re: Article: "Calc Crypto and the GPC"

Matt Reed-
I have see similar things done about notes. One time my teacher saw some girls in my class passing notes. He stopped them, took the note, read it to the class, recorded it on a tape reocrder, gave the note back to the girls, called the principal in, and played the tape to him. Just to embarass the girls. It took the whole class time for this. I have seen other things done. Many teachers use embarassment as a means of punishment....and many will go to EXTREAMES to embarass the "note passers."

(Did I spell extreams right?)

Reply to this comment    4 September 1998, 08:53 GMT

Re: Re: Article: "Calc Crypto and the GPC"
Micah Gibson
(Web Page)


It's spelled "extremes"

Sorry if this is a superfluous message.

Reply to this comment    4 September 1998, 14:02 GMT

Re: Article: "Calc Crypto and the GPC"
Master Nick
(Web Page)

I think both the encryption and the compressor would be very useful. As for using it for note passing, this would be really cool! I don't pass notes myself, but I would start just to use the encryption. What I do to pass notes electronically on the calc is save the message on the E2 and give it to someone to give to my friend recieving it. Since everyone in my school has 85s, this is a big problem for intercepting messages. I pretty much solved my problem with my encryption program(uses the most advanced algorithm I have seen for the calc). As of yet, no one has been able to crack it. This was written in basic so just imagine the potential of an ASM version! I also think the compressor is very useful too. I also wrote one of the above types(convert to string) but it didn't work out(my calc crashed and I didn't feel like redoing it). I think it would be easy to do. Just port some compressor for the Z80 from the '80s to Usgard or something. I'm shure by now that source code should be available.

Reply to this comment    4 September 1998, 12:57 GMT

Re: Re: Article: "Calc Crypto and the GPC"
(Web Page)

I would very much appreciate it if you would E-mail me with an English (no TI-Basic source code please) description of your encryption program. I hold that every programmer fancies himself a cryptographer, and if they have not had formal training, then, without exception, they will suck. No offense. I made a Simultaneous OTP program for the 85 a while back... I now realize that it was probably breakable.
Also please don't say "most advanced algorithm". If it is your own homemade thing, it frankly, sucks. Sorry, but you're not a cryptographer. And neither am I - that's why I'm implementing a well-known algorithm.

Reply to this comment    5 September 1998, 00:57 GMT

Re: Re: Re: Article: "Calc Crypto and the GPC"
a TI owner

Not to be rude or anything, but I think this statement:

>Also please don't say "most advanced algorithm". If it is your own homemade thing, it frankly, sucks. Sorry, but you're not a cryptographer.<

isn't necessary. Just because a person did their own encryption program doesn't mean it sucks. I'm sure you know that there are some people out there that can do things better than some trained professional can do. Why don't you try encouraging people? This person might be the one who makes this encryption program you want.

Reply to this comment    6 September 1998, 06:05 GMT

Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
(Web Page)

You see, I frequent the USENET newsgroup sci.crypt, and I've learned a few things. First of all, cryptology is a very mathematical business, and also very difficult. Second of all, there is a LONG history of average joe's algorithms being used in commercial products, and then cracked wide open. The only algorithms that withstand the test of time are those made by experienced cryptanalysts, and even then, most of them get cracked. I'd like to see if any average joe's algorithm could resist linear or differential cryptanalysis, known-plaintext attacks, etc. There are SURPRISINGLY few encryption algorithms that are still good today. I, for the life of me, cannot think of even ONE of them that was designed by an average joe.

Reply to this comment    6 September 1998, 23:05 GMT

Re: Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
Chris schmidt

Who is going to attack the crypto on the calculator with things like known-plaintext attacks? We are still talking about a calculator, and this idea began with passing notes. No one said at the beginning that we were going to try to make this good enough to be industrially used! I'm sorry if I insulted you, but don't get so uptight!
And This is a first time post at 4:02 A.M. by chris Schmidt

Reply to this comment    8 September 1998, 11:06 GMT

Re: Re: Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
Olathe  Account Info
(Web Page)

I would be one of those people. Just to see what fellow students are saying :)

Reply to this comment    19 August 1999, 11:03 GMT

Re: Re: Re: Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
Ryan of NONYA Inc. Account Info

Actually, about algorithms only being written by professionals, YOU'RE

RSA was written by three inexperienced people, yet became one of the most
famous algorithms. Yes, most programmers' encryption programs SUCK. But not

BYW, everyone should use PGP.

I didn't use it on this msg cuz it won't take words over 50 chars, and I was to lazy to change the word wrap thing.

Reply to this comment    6 February 2001, 23:02 GMT

Re: Re: Re: Re: Re: Re: Re: Re: Article: "Calc Crypto and the GPC"

RSA was NOT developed by three "inexperienced people". Quite the opposite: It was developed by three MIT computer science researchers who were the first people outside of a government agency to develop a reversible one-way function and realize the applications to the field of cryptography.

Reply to this comment    18 February 2003, 06:04 GMT

Re: Article: "Calc Crypto and the GPC"
Ben Fuhrman

This could potentially be the best damned thing to happen to a calc. The possibility of increasing your mem from 1.5x to 2x is astounding and should be implemented ASAP. But what would be even better would be a password program that uses 384 bit encryption. Imagine a program that if the wrong password is entered, would encrypt every damned thing on your calc, so that the only thing you could do is turn it off, and then back on again, to get the password prompt. This would be extremely usefull for those of us who are sick of not being able to use a Ti-92 in school because of the mob of idiots who want to play games, and will grab the calc out of your backpack to do so. Also, compression would be extremely useful for those of us who like to read in class, yet hate to carry huge books (like The Wheel of Time), imagine reading a full sized book on your calc in math when your (idiot?) teacher thinks your doing a math problem. Aside from these few thoughts I have to offer, the possibilities are endless...

Reply to this comment    4 September 1998, 16:32 GMT

Re: Re: Article: "Calc Crypto and the GPC"
(Web Page)

I completely agree with you. Though my school is a tad more sane than yours, apparently. I, frankly, have neither the skills nor the time to make a GPC. Though it is a damned good idea. I do have the skills and time to make calculator encryption. With a new modification I realized while reading these boards, anything could potentially be encrypted with an 8-character password. Thus no one without your secret key on your calc would have access to the encrypted stuff, and even with the calc, they must brute-force the 8-character password.
The book "FlatLand" has no copyright on it any more, it is over 100 years old. I have a copy of it on my computer. When I get the time, I will break it into 40K chunks and make them into TI-92 Text Editor files, probably 5 or 6 in total. This way, a normal TI-92er could read 1 part a day (load a new one from your computer the next day) and a TI-92+er coould read the whole darn thing. :-D

Reply to this comment    5 September 1998, 01:07 GMT

Re: Article: "Calc Crypto and the GPC"
Justin Marrese

About encyrption: If the teacher doesn't even know the encryption technique, it doesn't matter how simple it is...

About compression: I have a ti83. If the compression proggie will give me 2x, this will add 27k or so... The problem is that it probably will only add 1.5x (14k) and the compress/decompress programs will have to be on my calc...

If the compress program is more than 10k, Its not worth it. (dont' forget to leave space to run the uncompressed program!)

-- Justin

Reply to this comment    4 September 1998, 17:37 GMT

Re: Re: Article: "Calc Crypto and the GPC"
Jonah Cohen

it's only not useful on an 82, 83, or 85 if it's over 10k (which it probably would be)

keep in mind there is the 86, 89, 92, and 92+, all of which would gain more than 50k by a compression program which would only take up around 10k itself.

please think of others rather than just yourself. the ti-83 is not the _only_ calculator.

Reply to this comment    4 September 1998, 19:06 GMT

Re: Re: Re: Article: "Calc Crypto and the GPC"
(Web Page)

Yes, I agree. Other calculators than the TI-83 exist. The 83 isn't that good, anyway. Follows are my opinions on the TI calculators. Please note two things:
1) These are MY opinions. They are just here so you can know what I think.
2) Please do not respond to this post. I do not desire nor want a TI calcuator argument to spring up.

TI-73: Middle school, *gag*. I hope assembly shells are never made for it. Geez, I went through Algebra I with a TI-30, anyone else can too. Assembly shells would mean games, and considering the sorry state of middle schools, that means the decline of math and the rise of games.
TI-80: This calculator is simply too weak. It is not desirable for any higher math.
TI-82 and TI-83: Undesirable. They are too weak, and too close in price to the 85. They are used by high school students taking Algebra. *sigh* Algebra should be taught in middle school.
TI-85: Finally, a calculator that deserves respect. It can be used for Calculus classes, and is very powerful. There is a disturbing amount of games for it, though.
TI-86: A calculator, that, while more powerful than the TI-85, deserves less respect in my opinion. Too many people play games on it, I have seen.
TI-89: A stripped-down TI-92+ with a smaller screen and no geometry. This is less desirable than the TI-92+. Besides, no one needs this thing on the SAT. I got a 1600 with a TI-85 with 1K of free memory.
TI-92: A VERY good calculator, and large screen also. Not to mention that it has very few games for it.
TI-92+: This is the best. A TI-92+ deserves respect. And few to no games. :-D

As you can tell, I don't like games that much. The only - ONLY - game I retain on my TI-85 is the Insane Game. I discovered it a while back, while it was in an early version, and I believe it's worthwhile to keep on my calc.
As I said before, these are my opinions. Disagree or agree with them as you may. But let's not start a "Which TI is better" feud.

Reply to this comment    5 September 1998, 01:19 GMT

Re: Re: Re: Re: Article: "Calc Crypto and the GPC"

*This is not meant as a which calc is better post*

I know over 20 people who used an 82/83 on the AP Calc test and managed to get a 5 on it, so they are not only meant for middle school algebra.

As for your feelings about the 86, it has some very decent math programs for it, such as the asaps and stuff that add more trig functions like sec,csc,cot and so on. Just because some people play games on it doesn't mean it isn't a good calculator.

Reply to this comment    5 September 1998, 02:05 GMT

Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
David Yenoki
(Web Page)

>TI-82 and TI-83: Undesirable. They are too weak, and too close in price to the 85. They are used by high school students taking Algebra. *sigh* Algebra should be taught in middle school.

The TI-82 is weak, however, the TI-83 is quite adequate for all your computing needs. I know many people including myself who took Algebra in middle school, and take more advanced course (PreCalculus onwards) with their beloved TI-83.

>TI-85: Finally, a calculator that deserves respect. It can be used for Calculus classes, and is very powerful. There is a disturbing amount of games for it, though.

The TI-85 is an impotent waste of silicon... When compared to more recent developments. Trying to port programs from the 83 to the 85 is impossible, due to a lack of a function that will (quickly) search a string for a subset, starting from a character. This problem also plagues the 86.

This is in the rudimentary programming language inherent within the system, of course.

Reply to this comment    7 September 1998, 20:59 GMT

Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
Steve Herrin

>*sigh* Algebra should be taught in middle school.

Last time I checked (which was Friday) Algebra was taught in middle school, I take it :P

BTW off that response

I hate people who will steal my calc out of my pocket, backpack, binder, etc. the only way to keep them off is to clear the memory and tell them I had a math test and the teacher made me clear it. Whoever suggested a program that encrypts everything if the wrong pw is entered had a good idea.

Reply to this comment    27 September 1998, 04:12 GMT

Re: Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
Rich D.

There are already programs (at least for the 86) which will put a password on the calc, and refuse to start up if you don't type it in correctly. ASE, an assembley shell, does this. Also, I use matrix encryption with a program I wrote, but it's so simple to crack (of course, i wrote it, so it wasn't too hard to figure out a way to bypass it). (It is a one-way encryption, but if you fill the result matrix, and the encryption matrix (filled with random #s when the program is installed) with zeros, it thinks that any password you type is the correct one.

Like the original author of the message said, even if you think your encryption scheme is great, it can be cracked, if you're not a professional. And it's probably simpler to do than you think.

However, no average high-schooler or teacher will know a thing about how the encryption program works, and they won't want to bother trying to crack it either. So it really doesn't matter how weak the encryption scheme is, as long as it's fast. The method I'm using now (the second one i made) gets the password you type from a getkey loop (in basic) and then just one-way encrypts that, and compares it to the encrypted real password (which is why if you set the encrypted password matrix to all zeros and the translation matrix to all zeros, the encryption is useless. It uses matrix multiplication, so anything you type turns into a matrix of zeros.)

Sorry if I rambled. The point is, even crackable encryption methods are fine, if nobody is going to bother to take the time to try to crack them.

Rich D.

Reply to this comment    8 July 1999, 18:41 GMT

Re: Re: Re: Re: Article: "Calc Crypto and the GPC"
Eric Tollefson

I personally own an 83, and I think it is a very capable calculator. People seem to think it is a weak calculator with few features, but that is not the case. I can only think of one thing that I would change about it, the memory. Sometimes it is a little small. But otherwise, it is good, and I would not trade it for an 85 or 86 for the world. As for the 89, 92, and 92+, I'm in high school and I don't need that kind of brute force. I'm a pretty decent programmer in Basic and I've done some nice things with my 83.

Reply to this comment    25 July 1999, 06:24 GMT

Re: Re: Re: Article: "Calc Crypto and the GPC"

Over 10k?!?!
do you know anything about compression, or asm programming? Take a look at Lempel-Ziv. A program using this kind of algorithm would not be larger than 1k.

Reply to this comment    5 September 1998, 15:18 GMT

Re: Re: Article: "Calc Crypto and the GPC"
Olathe  Account Info
(Web Page)

I am presently cracking a fairly simple keyless encryption program for the TI-89 called imcode(), which is set where you can't edit it. I am almost finished solving it, and I haven't seen the actual program once.

Reply to this comment    19 August 1999, 11:01 GMT

1  2  3  4  5  6  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2012, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer