Friday, December 5, 2014

How to safely pass symmetric encryption keys over an insecure channel

Yeah, I post this publicly. You'd have to torture one of us to get the key.




The Unintentionally Kept Promises of Civilization

As a sort of analogue to the Christian's bedtime prayer, I have a ritual with my sons where at night I tell them something to imagine. I'll start a story, get to a pivotal moment, and then leave them with a cliffhanger, saying they have to imagine the rest. This was one of those:

Once upon a time, kids didn't have to go to school. Nobody had a mean boss. Nobody even had a boss. There were no churches, and there was no school, and there was no work. People killed a bird or killed an apple when they were hungry. Sometimes they had to make a shirt out of animal skin, or fix their huts when the wind messed up the roof. Altogether these kinds of things took up about two hours a day. 
During the rest of the day, they attended to the deeper rituals of their bones. They sang and played games. They climbed trees and kissed girls. They had sex. Sometimes they had sex for fun, and sometimes they had sex to end a fight. Sometimes they had sex to say "I'm sorry." They also told stories around the fire. 
Then, one day, some people got sick. People had gotten sick before, but this was the first time that anyone had known why. 
-"Of course you're getting sick," Jakk said, "the moon spirits are proper pissed." 
-"Moon spirits?" Yilla winced. 
-"Yes. They make people sick. And for some reason (I don't understand it any more than you do) they've been upset that you haven't been hunting my birds, and picking my apples for me. That's why you're sick. They told me." 
Yilla was happy that the answer was so simple. For the next two weeks, the people who were sick prepared Jakk's food and fixed his house. And just as he said, all of their sicknesses went away (at the end of flu season). 




In one fell swoop was born religion, state, taxation. Soon came monogamy. For a million years we were one thing and then we became another.

The above story is 10% imagination. We've caught stone-age cultures in the transition to civilization, and we've met Jakk. Usually he also gets to have sex with everyone's teenage daughter. Crazy ass moon spirits. Who can understand them?

Civilization, it seems, has been a meme, a Thing Good at Spreading, which costed humans a lot, and gave them a lot (slaves who don't kill themselves or die of tuberculosis are better), by getting people to endure hard things for the sake of some callously proffered lie or another.

Looking at Christianity (which is where I look first because I know it best), we've got promises of perfect bodies, no sickness, no sadness (arguably, depends on the interpretation of a verse), no hunger, plus peace, abundance, and immortality. Muslim heaven looks like a much better-described resort world, with pretty amazing furniture and food, and depending on how you die (and how you interpret), maybe 72 virgins.

Lies. Actual, slaving lies, with a really cheesy dead-simple unobfuscated links to getting people to give control to the Powers That Be. Coming at these promises, though, as an atheist with Utopian Star-Trek eyes who has read too much Ray Kurzweil, I'm struck by this idea, this possibility. What if:

(1) Jakk lies to us to subjugate us, turns us all into an organized slave camp.


(2) That slave camp, through its miseries and holocausts, makes penicillin and some other good things. And rockets. And the internet.


(3) Nobody believes Jakk anymore.


(4) That slave camp finds that somehow, accidentally, the trade-offs Jakk proposed were RIGHT, even though he didn't know it.


We were promised that if we got in line we'd all have nice furniture, no sadness, and immortality. All of these things are technologically at least possible. We all got in line.

And in the most poetically weird twist of history, I think that decision may take us where we were told we would go.

Polyamory, elective discomfort, and the walls of Sparta

Plutarch (and others) reports to us that Sparta didn't have walls so its men wouldn't turn into pussies.

I got your wall right here.


This kind of logic bugs me sometimes, because I tend to see military badassity as something instrumental, and a means to an end. I mean, who cares if your men read more and train less, if you've got the wall, amiright? Unless there's something intrinsically superior about being a badass tough guy, that is . . . and I guess that's the point.

The no-walls thing was an elective discomfort, a conscious choice to face greater amounts of terror and loss in order to become something better. And that reminds me of stoicism and polyamory, of course.

I'm polyamorous. That means that I have more than one girlfriend who each has more than one boyfriend. If that sounds awesome, it's because it is. But it's a scary Spartan trade-off thing.

When guys see, for example, my super-hot wife and girlfriend dropping by my work to visit me together, their first reaction is "daaaaaayum, tell me how to pull that off", and their second reaction is "WHAT, YOU LET HER DATE OTHER MEN, NO. I COULD NEVER DO THAT."

A barrage of questions.

"What if she starts loving someone else more than you?"
"Don't you get jealous?"

(Imma start trolling bodybuilders at the gym "But isn't that kind of heavy? Isn't that uncomfortable?")

The Stoics practiced something that William Irvine calls "elective discomfort." Sometimes they'd be cold, when they could have a blanket instead. Sometimes they'd go hungry when food was available. The idea was that they could kind of reset their hedonic treadmills and force themselves into a more justly merited level of appreciation for life. I find that polyamory does this.

The fact that my wife and girlfriend can and do love other people, certainly sometimes in some ways more than me, makes me face insecurities. It makes me try to be better. It makes me appreciate every second with them. It also makes life feel real.

Walls are another thing, though. And maybe they're good for some people. I certainly wouldn't have recommended every medieval city drop theirs.

But as for me and mine,

". . . tell me your heart
doesn't race for a hurricane
or a burning building"[1]



Monday, September 1, 2014

On the difficulties of detecting talent: my time with the creator of Adventure Time in a Whole Foods dishroom

Ruth was a portly schoolmarmish aficionado of bread, and possibly an HR genius. She ran the kitchen at the then-nightmarishly dysfunctional Whole Foods Market in San Antonio, TX in the early 2000s, about fifteen years ago.

If the word "hipster" was in use at the time, I had yet to hear it, but Whole Foods was full of trust-fund communists and passionate defenders of Blip-Hop. Ruth's kitchen was staffed with people who had a lot of surface similarities to the tequila-sodden-buddhist men-with-dresses LOOK AT ME crowd that ran the front end, but an uncanny lot of the 19-year-old lieutenants in Ruth's army had names I'd find again in newspapers, ten years hence. I usually couldn't tell one kind of person from the other. I certainly miscategorized Pendleton Ward.


We had a low-volume kitchen. I considered it grueling hard work, because at lunch I'd have to clean plates for an hour. I spent most of the rest of my time drinking the Mexican blend and trading monologues with other would-be celebrity philosophers in my dishroom. My renown had spread as far as the seafood department, from whence Little Mike would come and regale me with tales of the North Pacific, scrimshaw, crabs, and death. We'd talk a lot about how we were special. Different from the other Whole Foods People.

We called the dishroom my salon, and cool people who talked well got in trouble for spending too much time back there. Sooner or later, I was joined by a new hire named Pen. I had to "train" him on dishes, which was a joke, because he had washed before at restaurants with much higher volume. He was not a cool person who talked well.

Pen was heavy-set, quiet, and insufferably weird. He was in love with the juice bar girl, Angel, who had a 2-year plan to lose weight, build credibility, and join the Cirque du Soleil. She wouldn't give him the time of day. She had plans. We all had plans. Maybe everyone but Pen, that is. When he talked at all, it was about bootlegging bluegrass music. He also drew weird cartoon characters on the whiteboard sometimes.

It was only in the days after Pen put in his two weeks that he casually talked loose about his plan. He was working on a cartoon, and he was going to California to make it happen.

I slapped him on the back and said "Whoah man, that's great! Hey, good luck!" and laughed a little, inside. Stupid fat hipsters and their delusions.

Ten years later, walking into a clockless class for the first time at the University of the City of Manila, I asked my students what time it was and they screamed back in chorus "Adventure Time." I relished the opportunity to tell them I trained the creator on dishes. I think being a professor has given me some retrospective perspective on Pen, and on what a genius looks like.

I teach English as a second language. Occasionally, I get a student whose English is better than mine. Maybe they missed the TOEFL dates and needed to enroll somewhere anyways to keep their I-20. Weird stuff happens.

I know what college students are like. They're like Whole Foods team members. Some are quiet, some are loud. Some talk a lot about the work at hand, and some are trying to look pretty. A lot of what goes on is subsurface cold-warring for status.  

But when I get a genius, a genius like Croisille Adanho (whose name I will watch), they don't even seem to want a niche. They're passing through. They don't talk about their plans. (I wouldn't open a Q&A about my career ambitions to the kids on a McDonald's playground.)

Croisille could write a 20-minute essay you might mistake for Borges, in his second language. One that would leave you weak in the knees. He never said a word in class. He turned his shit in, got 100s, and went home.

Other kids would one-up each other and try to impress or seduce each other, but that wasn't Croisille's game. The kid sitting next to him might have thought Croisille was too deficient in English to track what was happening in class. He wrote better than anyone else I have personally met.

Pen had the greatest, boldest, most winning plans in the kitchen, and I think he didn't talk about them because he saw no merit in trading words for prestige among people who weren't his equals. He knew he was onto something that stood a chance at being important, and we were just other passengers waiting in the train station.

And be it with my students or other San Antonio Whole Foods alumni (I tell you, Ruth was a genius at hiring good people), this seems to be the case.

The meek will inherit the earth, because they're not playing for dishroom stakes.

Saturday, August 9, 2014

Incidental Reincarnation

It's not very much fun for me, but I don't believe in anything magical. I don't believe that I was born to fulfill a certain purpose, or that the universe metes out happiness fairly, or that our souls are more than what's encased in our skulls. So I find it hilariously fun that I've come to believe in a kind of reincarnation.




Reincarnation is you coming back--existing again--in some form or another. To settle your beliefs about reincarnation, in my view, there are two things you need to decide:

(1) Who is "you"?
(2) How often does "you" happen?

The first question is the tricker one to answer, because we have no recourse to math.

Traditional adherents to various beliefs in reincarnation have universally allowed for a reincarnated person to be something other than an atom-for-atom re-instantiation of the person before.

Every belief in reincarnation that I've heard of allows for people to come back with different genders and hair colors. Buddhists allow for us coming back as sheep and dogs, and the Sikhs had one guy come back as a book.

I wouldn't feel very much like myself as a book, but I'd tolerate some differences between the me who writes this thing and the Next of Ken. If I were to wake up tomorrow with most of my memories gone and big tits, I wouldn't consider it the death of Ken Before. You may have a different threshold for your own you-ness. Some of my family grieved my grandfather as lost after his brain surgery.

The calculus of you-ness can vary so drastically that at one extreme you can identify your pattern with every living person, so that they are all sufficiently "you" to stand as your continuation, and your death doesn't matter as long as someone else stays alive somewhere (man MDMA is cool), and at the other extreme we can speak of a lost you-ness inside the span of one lifetime.

If you draw your you-circle very widely, you can be assured of your reincarnation, because your incarnations are already living out their overlapping lives all around you. If you draw a tighter circle, though, I still believe that there's hope.

If the universe is infinite (it isn't) and random (it is), then as a logical consequence, every thing that can exist does, somewhere. In an infinite universe, the dice would be rolled so many times as to guarantee another atom-for-atom earth, complete with an exact you reading this exact blog post. (Max Tegmark's math says that this mirror you is about 1029 meters away.)

But even if the universe isn't infinite, it's vast. If you draw your you-circle like I draw mine, you've been around a few times. Maybe sometimes as a girl in Iceland. Maybe sometimes as a squid overlord on Zebulon. There have been people who think and feel like me, who feel as me as I feel--much more than the Dalai Llama feels the same as his alleged past selves. With enough rolls of the dice, it's even likely that some of my incarnations have had false memories of each other's lives.

And so I've come to believe in a kind of reincarnation. Incidental reincarnation.

And yet it's nothing special. There are no magical levers, or god-made plans.

Like the galactic spiral on a seashell, I am just a pattern that the universe tends to repeat.

Everything Good Correlates (a bash-scripted thought experiment thing about the clustering of sexually desirable traits)

I was on Ashford Street in San Juan, Puerto Rico, 2011, at a video bar called Video Bar, drinking a Medalla and sitting across from an outlandishly handsome man of Chinese descent whose competence in English I was trying to ascertain for my wife so she could challenge him to a game of pool.



-"You here for spring break?"
-"Yeah."

(English level: native)

-"Where do you go to school?"
-"In Boston."

(A bit evasive, answering with a city, there)

-"Oh cool, what school?"

Bobby answered almost under his breath: "Harvard."

Fucking Bobby Chen. Bobby and Ben. Toned bodies, high IQs, musical virtuosity, money in the bank, social graces and handsome faces. They made Puerto Rico a blast. I hope they perish in a fire.

Some awesome people inspire you to be more awesome. Some inspire you to give up and die.

Others inspire you to write crude population genetics simulations in bash. Here's what I was thinking:

Let us imagine that people's genetics don't make them die anymore. This is totally untrue, but it's closer to being true than it ever has been before. Nowadays and hereabouts if your eyes suck you get glasses, and if your legs don't work you get a wheelchair.

Let us continue imagining that of the four drives of natural selection--feeding, fighting, fleeing, and fucking--the only one that continues to have a significant impact on population dynamics is fucking.

Now it's a fact (we don't have to imagine this part), that people size each other up as potential partners-in-reproduction based on a complex and multivariate equation that's mostly handled subconsciously.

Women seeking men seem to value height, brawn, brains, wealth, and a slew of other things that are helpful for keeping children alive who will have more children and keep them alive. Men seem to emphasize waist-to-hip ratios and youth.

Ok, let's go back to imagining.

Imagine everyone has five numbers tattooed on their heads that correspond to a really oversimplified genetic code, where the number 1 means you rank low for something and the number 5 means you rank highly.

In this made-up world, the first number on your head indicates how smart you are, and the second has to do with how pretty your face is, so that someone with the numbers 5,1,2,3,3 tattooed on his head is as smart as can be, (5), but at the bottom of the ugly barrel (1), and mid-range in everything else.

In our imagined and oversimplified people-tank, there are only 100 people, and they're all sharing a one-room universe, and they all choose one person to produce offspring with (it's one of those parties), and they all pick according to each other's sex ranks, which are the sums of the five numbers on a person's head. They have no religions or politics, and no weird fetishes. They aren't drawn in by each other's life stories or anything like that. They play strictly by the numbers.

The hottest person in the room is a freakish 55435. Adding these numbers together, she gets a sex rank of 22. Because everyone is playing by the numbers and going for the best match they can get, she can have anyone. Because she, in our imaginary world, is also compelled to play by the numbers, she goes for the best thing she can get: a 35534 (20 total).

They do the reproduction dance and immediately produce two offspring and then fall over dead of old age. For each trait (physical attractiveness, intelligence, sense of humor, whatever), there's a coin toss which determines whether each of the offspring takes their mom's number or their dad's. Heads for mom, tails for dad.

The way things play out for their first offspring is like this:

I'm a master of info-graphics

Not bad. Offspring #1 is a 35535, and comes out as the new best hottest thing with a total sex rank of 21.

Offspring #2 had shitty dice rolls and got the worst possible outcome: 35434. Still not bad though. She's a 19.

This process happens over and over, all throughout the party, with all of the best possible couplings reproducing their two kids and then dying.

Now we should keep in mind that this world is not like the one we live in. In the world we live in, a trait that might make a man desirable might make a woman undesirable. In the world we live in, the two people with the lowest sex rank might decide to have 26 kids and the two at the top might have none.

I the world we live in, a low sex-rank person might kidnap a high sex-rank person and brainwash them.

In the world we live in, a 55555 might be born in an inescapable village with only two potential mates who only have half of that sex-rank between them.

BUT, in my efficient and simplified world, at least, something interesting happens.

I wrote a program that made a bunch of random 5-number strings and efficiently matched them, playing out the story of our simple world for generations.

The population of this microcosm started out looking like this (random):


54132
12113
13134
12344
. . . and so on.


When things were over, the population looked like this:


55555
22222
11111
44444
. . . and so on.
         

If mate-finding is efficient and there are no environmental pressures, in the end everything good correlates.

Years after meeting Bobby and Ben, I've heard other first-generation Harvard students lament their relative ugliness and lack of charms when compared with the Harvard-bred.

Even though the real world is not our one-room world of tattooed numbers, genetic determinism, and reproduction parties, it is my suspicion that the trend towards the aggregation of sexually desirable traits is a real thing.

What does this mean for average people like me? Not that much. We will play, as we have, at our stations in life, and our offspring will play their best hands, too. We will hold our genes, for a season, and pass some on. That which is exceptional about us will be passed up the ladder, and our flaws will be passed downwards, until, as in a centrifuge, the layers of human qualities are cleanly distributed by their weights.

When things find their fixity, Jim LaPeyre's wit may find itself in the same person as Megan's eyes, Chandler's voice, and Patti's skin. Maybe some part of you will be there too.