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"
|
Joel Jordan
|
These are all good ideas in theory. I'm glad we can have such great ideas floating around. I personally can't wait to have 50K of memory on my TI-85 so I can start putting huge programs on it. Except that you need to figure in an average of 1.7:1 compression if you want any decent speed on a z80, then the fact that 2-3K is taken up by the shell, most of which I assume can't be compressed since you can't compress the algorithm doing the decompression. You're at 25K of usable memory, 1.7*25 is still darn close to 50K, then you have to figure in the fact that the programs will have to be decompressed into memory before they're run (unless you can write a dynamic decompression utility), so if your programs are all 4K, you lose 7.8K of compressed potential. 42.5 - 6.8 = 35.7K. TI-BASIC programs, REALs, etc, can't be compressed, so you need uncompressed memory for those. I collect 2-3K of that stuff without even trying. Now we're down to 30K compressed. And no program can exceed 4K. If it does, we lose even more RAM. Seems to me that with compression, we might only have an extra 10K, not another 28K magically appearing. Is it worth it?
|
Reply to this comment
|
7 October 1998, 07:48 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
rp
|
I think it is a great idea.
Another use would be for engineers workingon ideas.
They could encrypt them.
|
Reply to this comment
|
14 October 1998, 23:14 GMT
|
|
Re: Calc Crypto and the GPC
|
Colin Slater
|
I think that an encryption program would be great! I have tried to put RC-6 encryption onto my calc, but I don't have the assembly skills to do it, and, an even biger problem, (At least for the 83+) is that the z80 is a 8 bit processor. RC-6 is designed for 32 bit processors. If someone could wright this prog, it would be great. I don't care about compression, just the fact that it would take you average comp months to figure it out. It would be nice though if it was public key.
|
Reply to this comment
|
29 August 2000, 23:00 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
AGENT-TI
(Web Page)
|
For String Assembly programs:
Compress your data(with some standardized utility) and have the de-compression utility decompress and load the correct characters at one time, re-compress/trash this de-compressed portion of the string. Then move on to the next character.
you would feasably never have to uncompress the entire string leaving only the current command 'active' in memory.
While compressed, the first characters should be the compression ratio (or not if everyone sticks to a standard)
Problem, You may have everything to run the game, but you also need to download the de-compression utility!
Sincerley,
AGENT-TI
ß^)
|
Reply to this comment
|
11 November 1998, 21:32 GMT
|
|
Re: Calc Crypto and the GPC
|
Ryan of NONYA Inc.
|
I know a decent amount about this type of thing. I think it would be nice.
Have you ever heard of PGP? It's like this, except it would take the FBI, like, 1*10^100 years to crack.
Ryan
|
Reply to this comment
|
26 January 2001, 02:15 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Paul Bruner
|
Alright, I like the crypto idea!
But why use such a complcated algorithm for just sending messages in a class room?
If the purpose of this program is to send messages to your fellow classmates, why not use the old german favorit, eignma!
I know, eveyone is saying how you can get a program that can break a message done in eignma in 8-min (IF you have both the cyphertext and the plain text, and IF you know that the eignma box is using standared rotors), but what are you really tring to encrypt here?
The algorithm uses only the 26 letters of the alphabet, so you don't have to worry about useing hex coding to send people messages, you can just use paper!
And the key for it is just 6 letters and 3 numbers! (i.e ANE-EWY-341 (numbers 1-5)), so you can say, "Turn to page 153, first 3 letters of the first paragraph, and the last 3 leters of the last paragraph" as your key.
Heck, you can set eveyone up to turn to a curtan page evey day for the key for that day!
If you notice, I am trying to make this crypt thing sound "fun". Like it or not, lots of these crypt algoritms are rather complcated and copyrighted. Not to mention the export laws of the united states, or the fact that implmenting a public key algorithm requires lots of work (random number generator, how to do key exchange, etc.)
Egnima, its easy and you can write it in BASIC:)
(Just wondering, why use RSA? Isn't Diffman-Hofman public now? Why not use DES? (or better yet 3DES) as that is public as well, might have to bump the key down to 40-bit so it can get passed the export laws but hey, I don't think your teacher will go THAT far with trying to decrypt it:))
|
Reply to this comment
|
20 November 1998, 05:07 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Paul Bruner
|
Alright, I like the crypto idea!
But why use such a complcated algorithm for just sending messages in a class room?
If the purpose of this program is to send messages to your fellow classmates, why not use the old german favorit, eignma!
I know, eveyone is saying how you can get a program that can break a message done in eignma in 8-min (IF you have both the cyphertext and the plain text, and IF you know that the eignma box is using standared rotors), but what are you really tring to encrypt here?
The algorithm uses only the 26 letters of the alphabet, so you don't have to worry about useing hex coding to send people messages, you can just use paper!
And the key for it is just 6 letters and 3 numbers! (i.e ANE-EWY-341 (numbers 1-5)), so you can say, "Turn to page 153, first 3 letters of the first paragraph, and the last 3 leters of the last paragraph" as your key.
Heck, you can set eveyone up to turn to a curtan page evey day for the key for that day!
If you notice, I am trying to make this crypt thing sound "fun". Like it or not, lots of these crypt algoritms are rather complcated and copyrighted. Not to mention the export laws of the united states, or the fact that implmenting a public key algorithm requires lots of work (random number generator, how to do key exchange, etc.)
Egnima, its easy and you can write it in BASIC:)
(Just wondering, why use RSA? Isn't Diffman-Hofman public now? Why not use DES? (or better yet 3DES) as that is public as well, might have to bump the key down to 40-bit so it can get passed the export laws but hey, I don't think your teacher will go THAT far with trying to decrypt it:))
|
Reply to this comment
|
20 November 1998, 05:07 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Paul Bruner
|
Alright, I like the crypto idea!
But why use such a complcated algorithm for just sending messages in a class room?
If the purpose of this program is to send messages to your fellow classmates, why not use the old german favorit, eignma!
I know, eveyone is saying how you can get a program that can break a message done in eignma in 8-min (IF you have both the cyphertext and the plain text, and IF you know that the eignma box is using standared rotors), but what are you really tring to encrypt here?
The algorithm uses only the 26 letters of the alphabet, so you don't have to worry about useing hex coding to send people messages, you can just use paper!
And the key for it is just 6 letters and 3 numbers! (i.e ANE-EWY-341 (numbers 1-5)), so you can say, "Turn to page 153, first 3 letters of the first paragraph, and the last 3 leters of the last paragraph" as your key.
Heck, you can set eveyone up to turn to a curtan page evey day for the key for that day!
If you notice, I am trying to make this crypt thing sound "fun". Like it or not, lots of these crypt algoritms are rather complcated and copyrighted. Not to mention the export laws of the united states, or the fact that implmenting a public key algorithm requires lots of work (random number generator, how to do key exchange, etc.)
Egnima, its easy and you can write it in BASIC:)
(Just wondering, why use RSA? Isn't Diffman-Hofman public now? Why not use DES? (or better yet 3DES) as that is public as well, might have to bump the key down to 40-bit so it can get passed the export laws but hey, I don't think your teacher will go THAT far with trying to decrypt it:))
|
Reply to this comment
|
20 November 1998, 05:09 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
DooMStalK
|
Calculator cryptography would also be a good Idea for IR link chats. That way nobody else can intercept what you say.
|
Reply to this comment
|
5 December 1998, 23:51 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Barak
|
I'm finishing up a C++ program that I think might interest you. The purpose of the program is to convert ascii text into a Ti-Basic file that could be linked and run on an 82/83 (I only have an 82)
Anyhow, the purpose of the program is so that you can read text files (maybe a chapter of an etext) on your calc in a nice format, and display unsupported ascii characters (@ # $ % & ; " \ | _ ` and ~) using drawing (Pxl-On, Circle, etc) functions :) . You can scroll up and down in the file, which is displayed on the graphing screen, and can be 37 screens long (After that another file will be made, starting where the other left off). The program does word wrapping, and allows the user to pick whether line returns will be discarded or not.
Now, how this is related to your article: Before I read your article I was talking with a friend about the program I'm making. He thought that if an assembly program could be made, not only would it be more efficient (obviously), but it could also *possibly* use compression. He thought that
the WinZip codec could be used to encrypt the file on the PC and then linked to the calc. The asm prog on the calc would have to read from this "zipped" file, but only decompress one page at a time. Although I don't know assembly, I thought this was a great idea, but probably hard to implement, although plausible. However, I'm sticking to my "C++, Ti-Basic generating" program: it will probably allow around 90-100 "screens" of text. Not bad, eh? Tell me what you think. (Also, if you're interested in this program..)
|
Reply to this comment
|
10 January 1999, 02:36 GMT
|
|
encryption
|
snb
|
Honestly, is passing secret messages in class that much fun that it would be worth spending large amounts of time writing a program for it?
-About the GPC
Compressing and decompressing anything that you want to run seems like an extreme pain. Personally, I think it would be better to come up with a program (probably asm) that would make programs more efficient, especially longer ones.
No, I am not trying to whine about the lack thereof, nor am I saying that I do not have enough time. I just think it would be nice to have one.
|
Reply to this comment
|
22 December 2002, 00:38 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Barak
|
TextTo82 has been released. Download it under "Windows Utilities"
|
Reply to this comment
|
7 March 1999, 00:28 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Steve Ryder
|
A note, I have programmed a cryptography program for the TI-89 which uses the Hill cipher. It's not 384 bit encryption or anything, but you can make it fairly complex and for practical purposes unbreakable, since no high schooler or college person would care enough to do it. Any bit of encryption would be (most likely) enough to deter someone from reading the message (provided it is not a simple substitution based cipher). My program can handle messages up to 48 characters, although it can be expanded if needed. Email me if you'd like to see it.
Steve
|
Reply to this comment
|
9 March 1999, 11:37 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Jon Mullen
(Web Page)
|
I wrote an encryption program once, but I..uhh..lost the code in a fire (ok, so it was an ASM crash...) Anyway, the way it decrypted was I had the letters A-Z stored in Str1. There was an encrypted message, that the user would type in. That would be converted into it's appropriate number (A=1, B=2...) After that, a math function would be run on it, and one would get a different number. The new number was converted to the approptiate letter. It worked extremely well, though I never got to see it put to practical use...
|
Reply to this comment
|
24 March 1999, 04:02 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Jon Mullen
(Web Page)
|
I wrote an encryption program once, but I..uhh..lost the code in a fire (ok, so it was an ASM crash...) Anyway, the way it decrypted was I had the letters A-Z stored in Str1. There was an encrypted message, that the user would type in. That would be converted into it's appropriate number (A=1, B=2...) After that, a math function would be run on it, and one would get a different number. The new number was converted to the approptiate letter. It worked extremely well, though I never got to see it put to practical use...
|
Reply to this comment
|
24 March 1999, 04:03 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Jon Mullen
(Web Page)
|
I wrote an encryption program once, but I..uhh..lost the code in a fire (ok, so it was an ASM crash...) Anyway, the way it decrypted was I had the letters A-Z stored in Str1. There was an encrypted message, that the user would type in. That would be converted into it's appropriate number (A=1, B=2...) After that, a math function would be run on it, and one would get a different number. The new number was converted to the approptiate letter. It worked extremely well, though I never got to see it put to practical use...
|
Reply to this comment
|
24 March 1999, 04:03 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Jon Mullen
(Web Page)
|
I wrote an encryption program once, but I..uhh..lost the code in a fire (ok, so it was an ASM crash...) Anyway, the way it decrypted was I had the letters A-Z stored in Str1. There was an encrypted message, that the user would type in. That would be converted into it's appropriate number (A=1, B=2...) After that, a math function would be run on it, and one would get a different number. The new number was converted to the approptiate letter. It worked extremely well, though I never got to see it put to practical use...
|
Reply to this comment
|
24 March 1999, 04:03 GMT
|
|
Re: Article: "Calc Crypto and the GPC"
|
Jon Mullen
(Web Page)
|
I wrote an encryption program once, but I..uhh..lost the code in a fire (ok, so it was an ASM crash...) Anyway, the way it decrypted was I had the letters A-Z stored in Str1. There was an encrypted message, that the user would type in. That would be converted into it's appropriate number (A=1, B=2...) After that, a math function would be run on it, and one would get a different number. The new number was converted to the approptiate letter. It worked extremely well, though I never got to see it put to practical use...
|
Reply to this comment
|
24 March 1999, 04:03 GMT
|
|
Re: Calc Crypto and the GPC
|
pyxleII
|
Hey I have a decent idea, why not convert string text
to a string of binary then put it in a picture
(ie pixel on pixel off)? Then you could implement a
wide array of picture encryption methods.The data would be very secure (in relation to "note passing"),
but the only problem would be dec/enc proccess time.
Another possiblity could be to Xor the binary string,
or you could use some sort of matrix encryption with the plain text and do row and collumn swapping.
Reading the matrix would be quick and efficient in regaurds to picture encryption, but matrices do take up a lot of space..=(
if you were to just do simple string ecryption then i would recomend the Nexor method.
It uses the sine wave to encrypt text using 2 different keys, it is fast and simple but strong enough that someone could not brute force it through the rand function.
any questions?
pyxle@sdf.lonestar.org
|
Reply to this comment
|
3 November 2003, 19:48 GMT
|
|
1 2 3 4 5 6
You can change the number of comments per page in Account Preferences.
|