<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Articles tagged story at null program</title>
  <link rel="alternate" type="text/html"
        href="https://nullprogram.com/tags/story/"/>
  <link rel="self" type="application/atom+xml"
        href="https://nullprogram.com/tags/story/feed/"/>
  <updated>2026-04-09T13:25:45Z</updated>
  <id>urn:uuid:1f7c4b50-51dd-40c2-b6dc-75c024e2071e</id>

  <author>
    <name>Christopher Wellons</name>
    <uri>https://nullprogram.com</uri>
    <email>wellons@nullprogram.com</email>
  </author>

  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  <entry>
    <title>Flip Foolflim the Dragon Traitor</title>
    <link rel="alternate" type="text/html" href="https://nullprogram.com/blog/2011/01/10/"/>
    <id>urn:uuid:f36fc6c4-7a77-31a9-6fd2-5b4bfd7d095b</id>
    <updated>2011-01-10T00:00:00Z</updated>
    <category term="story"/><category term="game"/>
    <content type="html">
      <![CDATA[<p>So <a href="/blog/2010/07/19/">I’ve been playing a bit of tabletop role-playing games
lately</a>, so here’s another game story like my
previous <a href="/blog/2008/12/22/">Fire Gem tale</a>. I didn’t think it was
<em>that</em> interesting, but I found out that some of my friends were sharing
it with each other when I wasn’t around.</p>

<p>A recent character was named Flip Foolflim, a chaotic evil halfling
rogue. I had selected his secondary language by the roll of the dice,
Draconic, and by coincidence we happened to be fighting a lot of
dragonborn. Flip could always understand them when they spoke to each
other. I was asked why my halfling would know Draconic, so here’s his
story.</p>

<p><img src="/img/rpg/dragon-slay-small.jpg" alt="" class="right" /></p>

<p>Flip had made friends with a dragon — not a typical friendship,
obviously. During their initial encounter this dragon realized a use for
the little halfling. Flip would regularly head out from the dragon’s
lair to one of the local towns where he would round up a group of naïve
adventurers who volunteered slay a “treacherous dragon.” Once at the
lair, he would turn on them and join his dragon friend in killing the
adventurers and keeping the spoils. It was an arrangement both of them
enjoyed.</p>

<p>This little scheme went well for some years until Flip, blinded by his
greed, greatly underestimated one particular group. Fortunately for
Flip, he discovered his mistake before attempting to backstab the
adventurers, and instead joined them in slaying his dragon friend.</p>

<p>Without his home in the dragon lair, he wandered for some time before
joining a party of adventurers (the PCs of the recent adventure). He
worked with them for some time, though not making any close friends.
None of his companions appreciated his thumb collection, cut from the
right hands of everyone his party struck down — for those who had hands.</p>

<p>One particular fight wasn’t going so well for his side, a situation that
he had experienced before back in the dragon lair. In the middle of the
fight Flip kneeled before the opponent, swearing his allegiance, and
attacked his own party members (other PCs, including my wife’s
character). Neither side liked this change, so he found himself with no
friends, meeting his end in that battle.</p>

<p>However, when my friends were discussing this I think it wasn’t so much
about the story being interesting but something like, “Hey, did you hear
Chris had his character attack the other PCs last week?!”</p>

<p>No hard feelings, guys!</p>
]]>
    </content>
  </entry>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  <entry>
    <title>A Fractran Short Story</title>
    <link rel="alternate" type="text/html" href="https://nullprogram.com/blog/2010/03/09/"/>
    <id>urn:uuid:8f7a913f-5d94-3fc0-b692-f536c10ad8f1</id>
    <updated>2010-03-09T00:00:00Z</updated>
    <category term="story"/><category term="compsci"/>
    <content type="html">
      <![CDATA[<!-- 9 March 2010 -->
<p>
<a href="http://en.wikipedia.org/wiki/Fractran">Fractran</a> is a
Turing-complete esoteric programming language. A Fractran program is
just an ordered list of positive, irreducible fractions. The program's
output for an input <i>n</i> is the output of the program run
on <i>n</i> multiplied by the first fraction in the list that results
in an integer. If no such multiplication results in an integer, the
output is the input <i>n</i>. Variables are encoded in the exponents
of the prime factorization of the input and output.
</p>
<p>
Some time ago I thought up an idea for a short story involving
Fractran. A mathematician accidentally creates a Fractran program that
can trivially factor large composites. Think something like
O(log <i>n</i>). It's just the right magical string of, say, 31
fractions.
</p>
<p>
The story would be a first-person narrative of the mathematician's
thoughts during a short time after the discovery, considering many of
the consequences of the program. For example, it would render much of
cryptography, which plays an essential role in the modern world,
useless. He would also wonder if mankind should deserve such a
discovery, considering how accidental it was.
</p>
<p>
This whole idea vanished once I realized that this Fractran program is
actually completely trivial. It even runs in O(1) time. It's so
trivial as to be worthless. Remember that Fractran stores its data in
the number's prime factorization? The Fractran program that can factor
any number in constant time is the identity function. To decode the
output, which matches the input, all you need to do is factor it!
</p>
<p>
Interestingly, it doesn't seem to actually be possible to implement
the identity function in Fractran (<i>But somehow it's
Turing-complete? Hmmm... more investigation needed.</i>), unless you
can define your program in terms of its input. For example, the
program <code>1/(n+1)</code> is the identity function for
input <i>n</i>.
</p>
]]>
    </content>
  </entry>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  <entry>
    <title>The Fire Gem</title>
    <link rel="alternate" type="text/html" href="https://nullprogram.com/blog/2008/12/22/"/>
    <id>urn:uuid:54ba3933-0a03-3701-530c-9616a64bec9d</id>
    <updated>2008-12-22T00:00:00Z</updated>
    <category term="story"/><category term="game"/>
    <content type="html">
      <![CDATA[<!-- 22 December 2008 -->
<p>
  <img src="/img/rpg/fire-gem.jpg" alt="" class="right"/>

If you are at all familiar with <a
href="http://www.wizards.com/default.asp?x=dnd/whatisdnd"> Dungeons
and Dragons</a>, you may have already heard of the stories of <a
href="http://www.netfunny.com/rhf/jokes/98/Jul/gazebo.html"><i>The
Tale of Eric and the Dread Gazebo</i></a> by Richard Aronson and <a
href="http://www.blindpanic.com/humor/vecna.htm">The Head of
Vecna</a>. These are real classics. Read them now, if you haven't
already, before you go on. If you are unfamiliar with <a
href="http://en.wikipedia.org/wiki/Role_playing_game"> tabletop
role-playing games</a> you should go learn a little about them first.
</p>
<p>
I would like to share one of my Dungeons and Dragons stories. It won't
be anywhere as interesting as the two stories I mentioned, but I have
gotten some laughs out of people I tell it to.
</p>
<p>
Back in my college days, a friend was running a 3.5 campaign and asked
me to join in. The other players had rolled up their characters and
done a couple practice sessions before I joined, so I was jumping into
a group that had already had their start.
</p>
<p>
It was an evil campaign. Everyone in the group was either evil or
neutral. We were serving some kind of evil sorcerer. I felt that being
evil allowed much more variety of play and usually gave us more
freedom in the game world than being good. If things started to get
dry, someone would do something stupid like burn down the nearest town
inn. The lawful evil characters weren't so happy about this, though.
</p>
<p>
I rolled up a chaotic evil half-orc barbarian named Gnohkk. I was
lucky on my rolls and had some wonderful stats, so he was very big and
strong. Gnohkk started with a two-handed axe that contained a magic
fire gem in its head. After some training he was able to cause a fiery
explosion at will centered at the location of the fire gem. If an
untrained character wielded the axe, upon striking anything he would
have to make a saving throw to prevent an explosion.
</p>
<p>
Because Gnohkk would also suffer from the explosion, this wasn't
terribly useful at first, except against targets particularly
vulnerable to fire, like trolls and magic trees. The training was
mainly to make the axe usable.
</p>
<p>
At some point during the campaign the party got a hold of a ring of
fire resistance, which was then used by Gnohkk. With this ring he was
invulnerable to his own explosions, making the axe very powerful. The
ring also provided a handful of simple fire spells that made combat
more interesting.
</p>
<p>
Sadly, not long after the ring was found the fire gem axe chipped
broke. Before discarding the broken axe, Gnohkk carefully removed the
fire gem for safe keeping.
</p>
<p>
After an intense battle against some type of monsters with big horns,
Gnohkk found himself a nice metal helmet. He also managed to scrounge
up 10 horns from the monster corpses, which gave him a great
idea. When the party got to the next town, Gnohkk visited the
blacksmith, and requested to have him affix the 10 horns around the
outside of the helmet. In the front of the helmet he wanted to have a
socket created and the fire gem embedded inside it. The blacksmith
said it would take a couple of days.
</p>
<p>
I was hoping this giant helmet would make Gnohkk more intimidating. So
far in the campaign, every time he had attempted to intimidate an NPC
he failed his rolls and came off looking stupid instead.
</p>
<p>
So, this was pretty cool: a giant horned helmet with a gem in the
front. With the helmet on, Gnohkk could explode into a ball of flames
at will and without warning. What a wonderful toy for a chaotic evil!
</p>
<p>
When Gnohkk returned to the blacksmith a couple days later he found
the shop was destroyed. Some of the walls remained, the roof was gone,
and weapons and tools were thrown all over the area. The blacksmith's
charred body had been dead for some time. However, the helmet
<i>was</i> completed and basically intact. Gnohkk shrugged, grabbed
the helmet and left, all without having to pay a single copper to the
now dead blacksmith.
</p>
<p>
We figured out later what happened (the GM probably just told
us). Gnohkk failed to tell the blacksmith about the properties of the
gem. When the blacksmith tapped the gem into the socket, the fire gem
activated and exploded, killing him and destroying his shop.
</p>
]]>
    </content>
  </entry>
    
  
    
  <entry>
    <title>Controlling a Minefield</title>
    <link rel="alternate" type="text/html" href="https://nullprogram.com/blog/2008/12/16/"/>
    <id>urn:uuid:0db94fda-0de6-3cec-fcdd-5b2d2e1d23ea</id>
    <updated>2008-12-16T00:00:00Z</updated>
    <category term="story"/><category term="crypto"/><category term="netsec"/>
    <content type="html">
      <![CDATA[<!-- 16 December 2008 -->
<p>
  <img src="/img/misc/naval-mine.jpg" alt="" title="Not a space mine."
       class="left"/>

Some time ago I was watching through the entire series of <a
href="http://en.wikipedia.org/wiki/Deep_Space_Nine">Deep Space
9</a>. It was a Star Trek television show about a space station that
rests next a <a href="http://en.wikipedia.org/wiki/Wormhole">
wormhole</a> that connects to the other side of the galaxy (The Delta
quadrant).
</p>
<p>
The Delta quadrant is ruled by a group called the Dominion, and they
are looking to conquer the Federation side of the galaxy (the Alpha
quadrant). At one point during the series, the Federation needs to
temporarily disable the wormhole to prevent Dominion ships from
crossing through. They do this by <a
href="http://startrek.wikia.com/wiki/Second_Battle_of_Deep_Space_9">
mining the wormhole</a> with identical, cloaked, self-replicating
mines.
</p>
<p>
If a mine is destroyed, the neighboring mines will replicate a
replacement. The minefield repairs itself. This makes removing the
minefield within a reasonable amount of time difficult to
impossible. If even a single mine is left behind, it can replicate the
entire minefield again.
</p>
<p>
The most interesting question here is this:
</p>
<blockquote>
  <p>
  When the Federation returns and wants to remove the minefield, how
  would they do it? What would stop the Dominion from doing the same
  thing?
  </p>
</blockquote>
<p>
The first thing that comes to mind is having a kill signal, but what
would this signal be? It could simply be a plain "kill" command, but
the Dominion could also broadcast such a signal to disable the
minefield. Consider that the Dominion could capture a single mine and
study everything about its workings. The minefield itself could
therefore hold no secrets whatsoever. This leaves out any possibility
of a secret kill command stored in the mines.
</p>
<p>
Here's what I would do, assuming that humans or aliens have not yet
discovered some giant breakthrough in factoring in the Star Trek
universe. I would randomly generate two very large prime
numbers. Today, two 1024-bit primes should be more than enough, but in
350 years even larger numbers would probably be necessary. Then, I
multiply these two number together and store this number in the mine
software. To disable the minefield, I simply broadcast these two
numbers into the minefield. The mines would be programmed to take the
product of any pairs of numbers it receives. If the product matches
the internal number, the mine shuts down.
</p>
<p>
Voila! A method for shutting down the minefield. The enemy can know
everything about every single mine's construction, including the
software and data stored on every mine, but will be unable to disable
the minefield without factoring a very large composite number, which
would presumably be difficult or impossible (within a reasonable
amount of time).
</p>
<p>
Another possibility would be using a hash. Come up with a strong
passphrase, then use a hashing algorithm like SHA-1 or MD5, or
whatever is available and appropriate in 350 years, to hash the
passphrase. Store the hash in the mines. When you want to disable the
minefield, broadcast the passphrase. These mines will hash the
broadcast and compare it to the stored hash. It's really the same
solution as before: a one-way function. This is also similar to how
passwords are stored inside a computer today.
</p>
<p>
If we wanted more commands, like "don't blow up any ships for awhile"
or "increase minefield density", we could generate more composites
corresponding to each command. However, once a command is issued, the
secret — the two prime numbers — is out, and it cannot be used again.
In this case, I would go into the realm
of <a href="http://en.wikipedia.org/wiki/Public_key_cryptography">public
key cryptography</a>.
</p>
<p>
I would issue a command, along with a timestamp, and maybe even a
nonce that could double as a global identifier for the command, and
sign the whole deal using my private key. On each mine I would store
the public key. When a command is received, the mines would check the
signature before executing the command. I could then issue repeat
commands, as the timestamps would change each time. An adversary
learns nothing when a command is issued, because the time stamps would
make any replay attacks useless.
</p>
<p>
Minefields just like this exist today all over the Internet, as <a
href="http://en.wikipedia.org/wiki/Botnet">botnets</a>. Thousands of
computers all around the world become infected with malware and come
under the control of a single individual or group. Individual machines
in the botnet could be taken out, but removing the entire botnet is
difficult as it grows and repairs itself. Any security researcher
could disassemble the botnet malware and learn anything about it, so
the malware can store no secrets. How does a malicious person control
the botnet, then, without someone else taking control?  Public key
cryptography, just as described above.
</p>
]]>
    </content>
  </entry>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  

</feed>
