Page 1 of 1

Tupper's Self-Referential Formula

Posted: Tue Apr 28, 2015 5:36 pm
by Hashi Lebwohl
I saw a Numberphile article about this yesterday and I didn't believe it at first: Tupper's Self-Referential Formula. Basically, if you plot this function for some ridiculously high value of k (they list the value in the article) with a grid-based value of x and y (look at a piece of graph paper then make x = 1 the first vertical box, not the first line) the result is the function itself. Self-referential things were always a favorite of Douglas Hofstedter, whose work sometimes surpassed my ability to comprehend it even after two or three readings.

This particular function also touches on an idea I have toyed with for encryption--making the output part of then encryption process itself. For example, if my encryption algorithm is described as the function f(x) then your first letter is encrypted as f(1) = a, the second letter is encrypted as f(a+2) = b, and so on, so each encrypted letter becomes input in the next encrypted letter. Combining that with recursion to make incredibly complex equations and you get a result which is not crackable by any feasible means, even with the most sophisticated computers in the world. Consider x^3 - x, a fairly simple equation which is simple to graph and easy to understand. Now recurse it once to get [x^3 - x]^3 - [x^3 - x] and, although not impossible, gets more complex. It gets weirder when you make the original equation more complicated such as x^2 - 5x + 3.

Anyway....I have never heard of this thing before even though it is apparently nearly 15 years old. That's just weird.

Re: Tupper's Self-Referential Formula

Posted: Tue Apr 28, 2015 5:49 pm
by Vraith
Hashi Lebwohl wrote:
Anyway....I have never heard of this thing before even though it is apparently nearly 15 years old. That's just weird.
Huh. Cool.
Just the other day, I was roughly quoting H to someone [everything takes longer than you plan for, even if you take into account that everything takes longer than you plan for].

On your encryption thing: I'm almost positive that is already a thing. About 90% sure related thing is described by someone in Stephenson's "Cryptonomicon."
Have you read it BTW? It was nothing like my favorite [there's something in the tone/voice that bugs me]---but the subjects and plots::::
I don't think anyone who has read your posts here could read the thing and NOT have "Hashi" constantly popping into their heads.

Posted: Tue Apr 28, 2015 6:10 pm
by wayfriend
I remember challenging someone to write a program that, when you ran it, produced output that was a program that, when you ran it, produced output that was a program that, when you ran it ... . I thought it was one of those clever things that seemed easy but was actually impossible. But then he wrote it. It was pretty complicated. I owed money.

Tangential? Yes. Bumps the post count? Yep.

And yes, my impression is that standard encryption algorithms work that way - the output of one block of text becomes the input for the next block. But the blocks are much larger than one character. If you have a 4096-bit key, you encipher 512 bytes at a time.

And Cryptonomicon also tells you that any encryption algorithm that hasn't been made public hasn't been attacked and so hasn't been checked for weaknesses.

Posted: Tue Apr 28, 2015 6:31 pm
by Hashi Lebwohl
Yes, I read it--a pretty good book even if it ran a little long.

Yes, writing a program whose output is a viable program is more difficult than it initially appears--I tried it once, but failed.

Also true--any algorithm not available for testing is, at best, a hypothetically good system that may have previously unforseen weak spots.

Posted: Tue Apr 28, 2015 7:06 pm
by Fist and Faith
Hofstadter is very cool. Maybe I'll try to finish GEB one day.

Alas, I have little idea what you guys are talking about. Where would one begin to learn about this crap? What's the beginning point for algorithms? Programming?

Posted: Tue Apr 28, 2015 7:29 pm
by wayfriend
Yes, encryption algorithms, while they are designed and documented mathematically, presume that they will be executed by a software subroutine, and so you need to know programming to get beyond the theory. You certainly could not encrypt or decrypt data by hand unless you were prepared to spend a very long amount of time performing math on 512 digit numbers without making a mistake.

One of the reasons Cryptonomicon is such a cool book is that it does a very good job of explaining how this stuff works for "the layman". It even goes so far as to show the reader a [sound] encryption algorithm which can be executed using an ordinary deck of cards. Plus, it's a really entertaining story, so, hey, I recommend it.

To whit:
www.cryptonomicon.com wrote:Avi sent him encrypted e-mail:
  • When you get to Manila I would like you to generate a 4096-bit key pair and keep it on a floppy disk that you carry on your person at all times. Do not keep it on your hard disk. Anyone could break into your hotel room while you're out and steal that key.
Now, Randy pulls down a menu and picks an item labeled: ``New key. . . . ''

A box pops up giving him several KEY LENGTH options: 768 bits, 1024, 1536, 2048, 3072, or Custom. Randy picks the latter option and then, wearily, types in 4096.

Even a 768-bit key requires vast resources to break. Add one bit, to make it 769 bits long, and it becomes twice as difficult. A 770-bit key is twice as difficult yet, and so on. By using 768-bit keys, Randy and Avi could keep their communications secret from nearly every entity in the world for at least the next several years. A 1024-bit key would be vastly, astronomically more difficult to break.

Some people go so far as to use keys 2048 or even 3072 bits in length. These will stop the very best codebreakers on the face of the earth for astronomical periods of time, barring the invention of otherworldly technologies such as quantum computers. Most encryption software--even stuff written by extremely security-conscious cryptography experts--can't even handle keys larger than that. But Avi insists on using Ordo, generally considered the best encryption software in the world, because it can handle keys of unlimited length--as long as you don't mind waiting for it to crunch all the numbers.

Randy begins typing. He is not bothering to look at the screen; he is staring out the window at the lights on the trucks and the jeepneys. He is only using one hand, just flailing away loosely at the keyboard.

Inside Randy's computer is a precise clock. Whenever he strikes a key, Ordo uses that clock to record the current time, down to microseconds. He hits a key at 03:05:56.935788 and he hits another one at 03:05:57.290664, or about .354876 seconds later. Another .372307 seconds later, he hits another one. Ordo keeps track of all of these intervals and discards the more significant digits (in this example the .35 and the .37) because these parts will tend to be similar from one event to the next.

Ordo wants randomness. It only wants the least significant digits--say, the 76 and the 07 at the very ends of these numbers. It wants a whole lot of random numbers, and it wants them to be very, very random. It is taking somewhat random numbers and feeding them through hash functions that make them even more random. It is running statistical routines on the results to make sure that they contain no hidden patterns. It has breathtakingly high standards for randomness, and it will not stop asking Randy to whack on the keyboard until those standards are met.

The longer the key you are trying to generate, the longer this takes. Randy is trying to generate one that is ridiculously long. He has pointed out to Avi, in an encrypted e-mail message, that if every particle of matter in the universe could be used to construct one single cosmic supercomputer, and this computer was put to work trying to break a 4096-bit encryption key, it would take longer than the lifespan of the universe.

``Using today's technology,'' Avi shot back, ``that is true. But what about quantum computers? And what if new mathematical techniques are developed that can simplify the factoring of large prime numbers?''

``How long do you want these messages to remain secret?'' Randy asked, in his last message before leaving San Francisco. ``Five years? Ten years? Twenty-five years?''

After he got to the hotel this afternoon, Randy decrypted and read Avi's answer. It is still hanging in front of his eyes, like the afterimage of a strobe:
  • I want them to remain secret for as long as men are capable of evil.

Posted: Sat Nov 28, 2015 5:43 pm
by Cord Hurn
I want them to remain secret for as long as men are capable of evil.
Uh, yeah, okay. A high standard for secrecy, indeed! :lf: