Friday, February 14, 2025

The Reality of Free Will

Several years ago, I encountered an interview with Sam Harris by Dave Rubin (this may be the interview, but I'm not 100% sure), who made a rather convincing-to-me (at the time, at least) case that there's no such thing as free will.  He talked about determinism, how quantum mechanics isn't enough to save us from that determinism, and that even if we had a "soul", that soul is still telling us what to do -- so we have no free will whatsoever!  He then insisted that if we just embrace this, we can be more forgiving of everyone around us, and in general, live a happier life.

It wasn't "convincing" enough to me to agree with his conclusions, but for a week or so, I kept catching myself thinking "I have to do this because I do not have free will" or "I can't do this because I have no free will" and I started wondering -- what the heck was going on?  Apparently, if free will doesn't really exist, I need the illusion of free will just to function!  When I accepted this, I was able to function normally.

Over the next several months, after encountering others who made similar cases (some of whom I respect to one degree or another), I continued to reflect on what happened that week.   As I tried to puzzle out what happened ... I noticed a certain free will strawman that opponents of the notion of free will fall back on, to discredit the entire notion.  "No one has free will," they say, "because everything is determined by the laws of physics, and so no one can do anything random, and thus free will is impossible."

Just how is this a strawman?  The problem rests in the fact that no one sits down and defines "free will".  Most people generally think of "free will" colloquially as "the ability to make choices" -- and these opponents of free will observe that everything is determined from the beginning of the universe -- and then they conclude that, because we can't do anything random, we have no free will.

But this deserves a little more delving into.  What do people generally mean when they say "the ability to make choices"?  Do they really mean "the ability to act at random"?  I would propose that the answer is "no" -- that most people, when they intuitively think about "free will", are generally thinking that people have the ability to take in their environment, logically think about it, and then make conclusions on how they can alter their own behavior.

Granted, the "logic" involved here might not be the best -- we're naturally pattern-seekers, after all, and our logic isn't always sound -- and we nonetheless have things we cannot do, due to our circumstances -- for example, I cannot sprout wings and fly, nor can I regrow a leg if I lose one, or walk afterward -- but I do have the ability to think about how I might make wings, or create a prosthetic, or get a wheelchair, and then think about how I might use these things, and then act on it.  To the degree that we can do this, limited only by the physics of this world, is the degree we have free will.

For example, a female ferret doesn't have free will when it comes to mating:  if she doesn't mate when in heat, she dies.  That doesn't mean, however, that she has no choices.  She can be trained to do things, if she decides she wants the offered rewards, and if given things to play with, she can investigate them and try them out.

As a human, I have much more free will, because I can sit down and think about mathematics, or work out a story, or sit and think about the conversation I had the other day trying to figure out what I did right or wrong ... and I can seek out help when I need it from others, to fulfill goals I set out for myself.  I can also take the advice of others, and think about how it might apply to me -- and I may try it or not, to see if I like it, or I might recognize something about myself that allows me to conclude the advice is nonsensical for me.

Do computers have free will?  The underlying silicon does not -- the silicon very strictly follows the laws of physics, which have been forced to process electrical signals in certain ways.  I have spent some time trying to justify the idea that a thermostat has free will, but now that I realize that free will needs both behavior and the ability to change it, I realize that thermostats don't have free will -- and that silicon of a computer has as much free will as a thermostat.  Software, however, can have behavior, and the behavior can even be emergent -- but I cannot help but see hints of free will, with the fairly recent report that the algorithms set to process satellite images for Google Maps will generate random photos to fit in to a deadline given by the software engineers.  I don't think we can purposely "give" a computer free will -- but I think we'll see it as an emerging property in any system that has sufficiently complex behavior.

It is a mistake to assume that determinism means we cannot have free will:  if we cannot depend on ourselves to make the decisions we like, can it really be said to be free will?  We need a predictable universe in order to have at least somewhat predictable outcomes so we could figure out our own preferences -- and we cannot do that if we act randomly for every decision we have to make!  And what's more, there's likely a certain amount of randomness built in to our behavior, anyway:  after all, discovering our preferences requires numerous trials and comparisons to figure them out -- and when we see the frequency of randomized trials will decrease over time, we do so only because we have learned the lessons of the experiments, and will choose accordingly.  After all, how many times do I have to try peas to know I hate them with the passion of a thousand suns?  Free will doesn't disappear with this lack of randomization -- on the contrary, developing preferences over time is at the core of free will!

Thus, contrary to the notions of opponents of free will, determinism doesn't cancel out the possibility:  it's a requirement!

So go, follow the advice that free will opponents paradoxically seem to always give, after they make their case:  go do good things, for yourself and others, knowing that you can make a difference in the world!  And don't necessarily expect to be able to change others, for good or ill -- they also have free will, even if they don't see the wisdom of your suggestions!

Thursday, February 13, 2025

Curious Treehouse Musings: An Introduction

I have always wanted to design a computer language.

Growing up, I only had access to BASIC of various flavors -- Atari, IBM, and a weird beast of a computer that had 8" floppy drives and a dumb terminal that my Dad brought home from Sperry Univac -- so, when my Dad noticed I had an interest in games programming, he suggested I learn C -- and I found the fantastic "C++ Primer Plus" and fell in love with the ways this new language made programming more practical!

Shortly after that (and this was theme of my first year of college, in particular) I hunted down and explored as many languages as I could.  I found Modula-2 on the only Mac in the college computer lab.  I was exposed to Parallel Pascal, and I ran into Forth, Lisp, APL, Snobol, Assembler, Ada, and several other languages.  In the process, I discovered something interesting:  my favorite languages were anything that was as different as C as can be ... and while I came to despise anything that resembles C, mostly because they had stupid conventions that drove me nuts (take Modula-2, for example:  ALL CAPS keywords, BEGIN and END blocks, among other irritating issues).  It was bad enough that, when I took a 3-year hiatus from college, and returned to find the department had switched from C++ to something called Java, I was nervous ... until I saw it was pretty much like C!

The only exception to this is Python, which, when I first discovered, I breathed a sigh of relief:  I no longer have to think about linked lists!  Python can get away with departing from C's syntax because Python makes things simpler, and tends to avoid a lot of the superfluous syntax that's as much as a hindrance as it is a help.  (In particular, I will never forgive Pascal for requiring a semi-colon after an "else" keyword -- what the heck, how does this help with anything?)

As I look back on this, I realize I had unintentionally absorbed certain principles that have influenced my desires and abilities to learn languages:  that syntax is evil, and that the more a language can provide for you (at least in terms of data structures, and to some degree libraries), the better.  Over the years, I have also discovered that precedence of operators itself is evil.  And over time, I have come to realize that I struggle with learning a language when I am not convinced it has something new to teach me, and don't have an outside force compelling me to learn.  (This is why I have been unable to learn Ruby -- I cannot convince myself it's sufficiently different from Python to be interesting to me.)

Now, however, as I have become more familiar with computer languages and environments, I realize that it's probably impossible for me to create a language from scratch, particularly if it isn't substantially different from all the different languages available today!

At the same time, I also recall years ago encountering an interesting question:  "If you were on a desert island, with a single computer, a single language, and all the documentation you want, what language would you choose?"  The answer given made some sense to me at the time, "I'd choose C, because it would give me performance, and I could always write up my own Lisp system", but over the years, I came to realize the folly of this answer, which could be summarized by Greenspun's Tenth Law:  "Any sufficiently complicated program written in C or Fortran will have a buggy, ad-hoc, half-implementation of Common Lisp", along with the corollary "including Common Lisp".

And that's the catch:  a language isn't just syntax!  It's a compiler.  It's an interpreter.  It's libraries.  It's conventions and idioms and optimizations.  It doesn't matter how simple or complex the syntax of any language in general, and Common Lisp in particular, may be:  syntax is only one part of the language!  You need ways to allocate memory (malloc and garbage collection), juggle the scheduling of functions, reading and writing to disk, and so forth.  Even with a language like C, every compiler offers optimizations no other compiler has -- yet every compiler misses optimizations too.  In short, any single computer language worth its salt offers so much, it would be a major effort to implement it!  What's worse is that Common Lisp is almost just as capable as C for optimization -- you just have to consult the docs, add optional type declarations, and maybe resort to assembly language for the particularly fiddly bits -- but the performance can be eeked out, nonetheless!

So, as much as I would like to create my own language, I have to accept I don't have the time and energy to do so -- and thus, I have to choose among the languages that are available to me instead.  And the language I am most attracted to, at this point, is Common Lisp -- it has a weird dynamic of "purity" and "practicality" that appeals to me, and it has a certain flexibility I admire for experimentation -- which means that I have a certain amount of freedom to experiment with language design without having to re-invent an entire language ecosystem!

Yet people for years have been complaining about Common Lisp, how it needs to be "modernized", how parentheses should be eliminated, how it needs up-to-date libraries and tools, and how it is so misunderstood -- everyone thinks it's about "lists" when it's really about "trees", and everybody thinks it's slow, and besides which, "Lisp" is a stupid name, why would anyone want to adopt something that doesn't have a cool name?  It would be like saying you drink "Slug Cola".

With those objections in mind, I decided to start a "Treehouse Initiative".  Originally, it was intended to be a new language in its own right, but at this point in time, I merely want it to be a layer over something well-established.  What's more, however, I have also come to accept that all these objections to Common Lisp are flawed in a major way -- mostly, in that they are matters of opinion.  Thus, I have decided that this Treehouse Initiative shouldn't be an effort to "fix" Common Lisp.  Instead, it is going to be an effort for me to create a language and environment I like.  I will invite other people to join in on the fun, and to create changes they like, too, and to discover and/or create new libraries that would be useful for their projects, as I will for my own.  But I'm not going to pretend that this is the "best" way to do things, or the way that Common Lisp (or anything else, for that matter) needs to be "fixed".

Like the attempts to fix Common Lisp that have come before it, I kindof expect this attempt to stagnate and even fail -- in particular, if I get bored with it, or if no one else finds it interesting, it will almost certainly be doomed -- but if enough people take an interest in this approach, it may very well take on a life of its own.  It will be fun to see what happens!

What kinds of things do I have in mind for this little initiative?  The first, ironically enough, is syntax.  The notion that the parentheses just "disappear" has never been true for me -- and this is true as much for C-style languages as it is for anything else -- indeed, if we ever ran out of curly braces, C-style languages will be in trouble!  While Python's whitespace syntax helps alleviate the need for braces, I've generally thought that commas get in the way as well, and would appreciate a syntax that doesn't use commas for data structures or separators.  Hence, I am in the process of trying to debug the "Sweet Expressions" library, both to fix a bug with comments, and to expand it to include things I appreciate.

The second are libraries.  I would like to use Elixir-style actors and pattern matching.  I need to explore libraries that try to implement these things.  I would also like to figure out how to use the "Cells" library, too, for dataflow management -- which I expect to be helpful when I explore "parameterized dependencies" in computer graphics.  And I need to come to terms with GPU programming in Common Lisp.  I intend to put some effort into keeping track of and even recommending libraries I like.

The third, I'd like to improve documentation for these libraries, and get into the habit of writing out notes as I explore things.  As I have explored some of these libraries, I have struggled to understand how to make use of them, and I figure if I can get good at documenting my discovery process, it will be helpful for other people.

Now, I wanted to have a name for the ideas I want to throw out there -- maybe these kinds of things should be in some sort of forum, so that various topics like these can be discussion points -- but for now, I am just throwing things out on my blog, to see how things will go.  Nonetheless, I'd like a name for them -- I like the humble "Request for Comments" used to propose standards for the Internet, named when the original research group had no idea what they were doing, nor whether there were other researchers who were supposed to supervise them somehow -- but it's also a name already in use.  Similarly, Python has PEPs -- "Python Enhancement Proposals" -- but I don't particularly want to think of these as "enhancements", in no small part because I want to recognize that what might be an "enhancement" to me might be "detrimental" to someone else, and vice versa -- and I figure that, with a language as flexible as Common Lisp, it shouldn't matter what any one person thinks is an "enhancement" or a "detriment" -- they can all co-exist just fine!

So, I decided I'd call these rambling things "Curious Treehouse Musings", and let people figure out for themselves what works, and what doesn't, be it as it may.

Wednesday, February 12, 2025

The Completion of My Internship

Last Thursday, February 6th, I concluded my internship.  I was originally going take a moment to analyze what I have learned, but I realize I've pretty much covered everything in "The State of the Blogger", and I don't see anything I ought to add from there.  Indeed, of the three options I had, I had come to the point where I accepted this as the "best" option -- I may have been able to continue working as a part-time Intern (which would have been the "second best" option), although it would have been a recipe for perpetual burnout -- but I am very glad I wasn't asked to join work full-time, which I considered the worst option for me.

When my internship had come up for review, I was given the option to continue working for two weeks after the internship lapsed.  At the time, I accepted this, wondering "Am I just doing this for the money?  Why don't I cut my losses immediately, and move on to my next adventure?" but as I was completing these two weeks, I came to appreciate the opportunity to wrap things up -- to finish one more project (albeit with dangling bits I didn't have time to fix), and to appreciate the environment I was working in.

Aye, that's the rub:  no matter how ill-fitting I am in an organization, I almost always appreciate the people I'm working with, and I almost always appreciate their missions.  In particular, I have come to realize that functional businesses that successfully provide goods and services are just as noble -- if not more so -- than even the best non-profit organizations, because those goods and services provide value to the customers!  The only problem I've always had with this, though, was that I never really got to work on things that interest me -- the problems I worked on were almost always dictated by the needs of the organization, and often I would be relegated to work on the "mundane" aspects of those problems -- and this, in turn, would lead to burnout, which would cause a drop in performance, which, more often than not, would lead to unemployment ... which would then lead to lousy attempts at networking and eventual job search burnout until I found the next position ... which always started out exciting, but that's merely the start of the cycle!

What's more, I have come to realize that the standard formula for financial success (which can mean anything from having a comfortable home and paying off the bills to becoming a billionaire and starting your own space program), regardless of becoming a full-time employee, or becoming an entrepreneur, or going the hybrid route and becoming a freelancer, is simple -- network like mad, figure out what people need, and specialize (ie, do it over and over again) to provide that which people need -- but this formula is out of reach of my abilities .  I cannot network when I cannot initiate conversations with strangers, and I get burned out when I do the same thing over and over again!  (Granted, the first time I do something, it's interesting, but it gets old after a while.)

So, what should I do instead?  As of right now, I'm trying to stabilize my routine:  sleep from midnight to 8 or 9, wake up, study Scriptures, "brain dump" onto this blog, and then work on a personal project.  And I have a lot of projects to work on!  Just a few things, in no particular order, as a sample:

  • Explorations of Common Lisp syntax called Sweet Expressions, to take advantage of whitespace similar to Python,
  • A 3D GPU-accelerated graphics environment, based on dual quaternions instead of matrices, that would hopefully grow into a CAD environment that can be used to design a liquid-salt thorium space station,
  • A command for Bash that will view any type of file, so I don't have to "context switch" between "ls", "cat", "okular", and perhaps even "diff", among other things,
  • A simple operating system for a Propeller processor-based electronic conference badge,
  • An eight-bit stream binary format for generic complex yet structured data,
  • An app to edit a "syzygy" of file formats that combine text, audio, photos, video, location data, and changes (among other things) in a single digitally-notorizabe format,
  • A "computer easel" that combines my favorite keyboard, mouse, 2-in-1 laptop, and portable monitor into a single portable environment,
  • An "armadillo" trailer that can expand from a simple box into something that can resemble a camping space or workshop,
  • A table-top role playing system using playing cards (and card-counting!) instead of (or, more likely, in addition to) dice to generate randomness,
  • Airplanes and helicopters of all sorts,
  • A custom keyboard and mouse (designing mice is particularly hard, since it's not nearly as obvious on how to collect the parts).
Perhaps some of these things might be marketable -- I have shown a cardboard prototype of my "computer easel" to a couple of people, who have really liked what I have done -- but I am not particularly interested in finding customers, doing market research, or running a business once the basics of manufacturing are figured out; on the other hand, maybe I'd be interested in figuring out the details for bringing something to production ...

I plan on sharing what I work on, including design notes, as blog entries, often with photos and video; since I don't want to run any businesses (although I'd be more than happy to start them! perhaps on a short-term part-time contractual basis), I hope I can sustain myself on donations, and in particular, I hope that someone who wishes to try to bring one of these things to market would be willing to offer monthly donations.

To do this, I will naturally need to ask for funding, so I have set up a Campaign at GiveSendGo:  The "Trash Panda Arcane Research Center".  Additionally, as I write blog posts, I also intend to collect various posts, perhaps refine them for a bit, and then publish them as e-books or books-on-demand.  Come to think of it, I may even discover it's possible to do "manufacturing on demand", at least for smallish items.  And who knows?  If I get a substantial enough fan base, maybe I can produce merch!

In any case, this is the direction I've been thinking of going in the last days of my internship.  Heck, I've been thinking about doing something like this since at least my college days!  So it will be interesting to see what happens, as I forge ahead in this direction.

Tuesday, February 11, 2025

Identity Management Atoms: Steganography

Steganography is the art of hiding things in plain sight.  While this isn't a cryptographic thing -- indeed, it can be practiced without cryptography at all -- it is nonetheless something interesting enough that I thought it should be included as an "atom" in its own right.

Perhaps the funniest example (to me, anyway) that I have come across is found in the docs describing how to use SSH (ie, Secure Shell, an app used to securely connect with, and transfer data between, remote computers) -- the docs explain that, while SSH can ensure that data transferred between computers will be safe, they cannot prevent data from being "leaked out" by other means -- such as by encoding data in the sizes of data packets sent by SSH.

A more visual example can be provided by considering a lowly picture format, say JPEG, and observe that each pixel consists of four 8-bit parts -- Red, Green, Blue, and an "Alpha" to indicate how transparent that pixel is (because, hey, if you want to fit 24 bits into the standard 32-bit word that most modern computers use for memory, you might as well do something with that extra eight bits!).  If we consider the Red byte, and observe that "0000 0000" gives us absolutely no red, "1111 1111" gives us the darkest red, and overall we have 256 individual shades of red to choose from ... sure, if we consider two shades adjacent to each other, say, one colored "0000 0000" and one colored "0000 0001", or, for that matter, one colored "1011 1110" and one colored "1011 1111", our eyes can tell the difference between the two ... if they were large squares!

But if we make that subtle change for a single pixel, and only do those subtle changes for all the four values that make up that pixel, and then surround that dot with eight other dots, it becomes much harder to spot!  And by using this particular technique, each 32-bit pixel gives us 4 bits we can play around with.  That doesn't sound like much, but when you consider that a single photo has millions of pixels, we can suddenly hide lots of data!

Naturally, we can wonder:  "What does this have to do with Identity Management, besides the obvious role of transferring data underneath people's noses?"  The most common use of this technique is to "watermark" visual data, so that someone who publishes an original photo or video can demonstrate later if someone else just copied it.

Steganography has a couple of weaknesses, to be sure.  For one thing, if someone knows what to look for, they can find the data using statistical analysis -- but this starts off an "arms race" of sorts, where the person hiding data uses more sophisticated techniques to hide it, while those who are looking for hidden data use more sophisticated statistical analysis to uncover the information.  One good example of this is to consider how JPEG uses sophisticated trigonometry as part of its format -- and then consider that data can be hidden in the coefficients of each cosine function used.  Another, perhaps more simple method, is to simply encrypt the data you wish to hide -- because every camera has subtle variations in every pixel, and heck, even subtle variations from second to second when each pixel sensor reads data! -- encrypted data becomes indistinguishable from the natural "variance" and "noise" that surrounds us.

Another weakness of steganography is -- for watermarks, at least -- if someone has reason to believe that a photo or video has been invisibly watermarked, and wants to remove that mark, it doesn't matter if the mark is encrypted or not -- all the person has to do to remove the watermark is to hide their own steganographic information into the picture, which would clobber the watermark.  This can even happen accidentally, if the image is merely edited and manipulated before it is re-published.


Monday, February 10, 2025

Identity Management Atoms: Asymmetric Public/Private Keys

Asymmetric keys are the final element we need for Identity Management.  So far, everything we've covered makes it possible to send data secretly, and to make sure that we can confirm that data we send or receive hasn't been tampered with -- but we cannot share Symmetric keys easily, out in the open, where everyone can see it -- we have to share these things privately -- and that's kindof difficult to do on a forum open to the public, such as the internet.

Heck, even if we limit our communications to pencil an paper, it might be nice to share a way for people to reach out and contact us!  If only Alice could pin a key of some sort on that bulletin board, so that Bob can encrypt something and share it with Alice.  That way, Alice wouldn't even have to meet Bob to exchange information privately!

The first algorithm that provided for just this is called the Diffie-Hellman Key Exchange (that some suggest should be called the Diffie-Hellman-Merkle key exchange, to recognize Merkle's role in laying the foundations -- which nonetheless puts aside that a British Intelligence team came up with the same algorithm several years before, but had to keep it classified until much later -- and who knows, maybe it will be found one day in one of the numerous works that Leonard Euler wrote, leading us to sigh and say "It's a good thing we didn't know about it, because otherwise half of mathematics would be named after him!"? -- there's a reason I simultaneously appreciate and don't worry about making sure everyone gets credit!).

The idea is relatively simple:  Alice and Bob agree on a key $P_\infty$ (recall that the $\infty$ subscript is a reminder that the key is shared by everyone) to use as a basis for communication.  Alice chooses a private key $A_0$ (recall that the $0$ subscript is a reminder to share the key with zero people), and combines this to create a key $A_0 P_\infty$ she publishes publicly; likewise, Bob can share $B_0 P_\infty$ with the world after creating his own private key $B_0$.  To communicate, Alice and Bob combine these publicly shared keys with their private keys, $(A_0 (B_0 P)) = (B_0 (A_0 P)) = S_0$, and by the magic of modular arithmetic (ie, mathematics I don't want to delve into right now), things mix together to produce an $S_0$ that can then be used to share messages between Alice and Bob.

For what it's worth, Wikipedia has a more colorful explanation -- by literally using colors and color mixing to explain what's going on.

Ok, maybe it's not exactly simple -- and it relies on advanced mathematics to allow for things to cancel out nicely, so that the symmetric key is the same for Bob and Alice.  But it gets the job done, and it's used internally in a lot of internet protocols where sharing messages, rather than confirming identity, is the primary concern.  It's not quite a public-private key system -- but it's a bridge between symmetric keys and asymmetric ones!

Shortly after Diffie-Hellman was made public, Rivest, Shamir, and Adleman created a simpler algorithm:  rather than having a public key that everyone uses as a basis for creating private shared secrets, each individual produces their own public and private keys.  Hence, Alice creates $A_0$ for herself, and shares $A_\infty$ to the world, while Bob creates $B_0$ for himself and $B_\infty$ for the world.  If Bob wishes to share a message $M$ with Alice, he encrypts it with Alice's public key $A_0(M)$ -- and if Alice wishes to read it, she applies her private key $\A_0 (A_\infty(M))$, which cancels out the encryption, leaving Alice (who, if she's careful, is the only one who has her private key!) the only person in the world besides Bob to be able to read the message.

Now, here's the fun thing about asymmetrical encryption:  both keys can be used for encryption -- and the other key decrypts!  If Alice wanted to, she could take a message $M$ and encrypt it with her private key, $A_\infty(M)$, and then share the result with the world.  If Bob, or the President, or my sister and her darling dachshund, or anyone, really, wanted to read the message, they can -- they just have to apply the public key (also available to the public) to the message:  $A_0(A_\infty(M)) = M$.  But why would Alice want to do this, though, if the purpose of encryption is to keep unwanted people from reading messages?  Well, when Alice does this, she isn't just sharing the message:  she's reminding the world that, as the world's only holder of the private key $A_0$, she's the only person who could encrypt something that can be decrypted by $A_\infty$.  Thus, you can be fairly certain the message came from her!  This is the basis of cryptographic document signing.

Of course, if Alice wanted to, she could send Bob a signed message $A_0(M)$ -- and if it's only intended for Bob, she can further encrypt it with Bob's public key, via $B_\infty(A_0(M))$ -- thus, to read this message, Bob would use his private key to "unwrap" the message, $B_0(B_\infty($A_0(M)) = $A_0(M)$, which can then be further decrypted by $A_\infty$ to confirm that, not only is the message intended for Bob, but that it can only have been sent from Alice.

Besides RSA algorithms of various strengths, there are now algorithms based on elliptical curves, which (if I understand correctly) may be computationally as fast as symmetric keys, and can also be smaller while offering the same level of security -- because as fantastic as public/private key encryption may be, it's still computationally slow, so it still makes sense to use symmetric keys when you can, and transfer them via public/private key authentication, rather than using public/private keys directly.

As of right now, asymmetric keys have only three weaknesses, two real, and one theoretical.

The first weakness is that you have to make sure you never let other people know your key -- and that's a challenge, considering how many vulnerabilities have been found in our software! -- but there are schemes for rotating through keys that make this more manageable.

The second weakness is called "Man in the Middle" -- if Eve wanted to listen in to Bob's and Alice's conversation, and she can intercept their traffic, she can create her own public/private key pair $E_0$ and $E_\infty$, and when Bob tries to send a message to Alice, if he convinces Bob that $E_\infty$ is Alice's public key, then Bob would try to send a message to Alice via $E_\infty(M)$, which Eve would then decrypt with her private key and encrypt with Alice's public key -- $A_\infty(E_0(E_\infty(M))) = A_\infty(M))$ -- which Alice can now decrypt with her private key.  And if Alice tries to respond, and Eve managed to convince Alice that $E_\infty$ is also Bob's public key, Eve can read all the traffic going back and forth.  To be sure, this requires that Eve captures this stream at the beginning of the conversation, and that she is constantly there to be an intermediary between Alice and Bob -- but it is a risk nonetheless, and a real one where something public like the internet is concerned.  There are also strategies to prevent this from happening; indeed, this is why "certificates" are so important for web browsers.

And the third weakness rests on the notion that the prime numbers used in these schemes are very difficult -- indeed, beyond-the-lifetime-of-the-universe difficult -- to factor, even with the fastest of computers.  Mathematicians have been unable to prove, one way or another, that factoring like this is, indeed, hard -- so we may very well be a surprising, fantastic, and beautiful proof away from the entire security of the internet crumbling -- but mathematicians generally believe that there are no shortcuts to factoring numbers, and we may very well prove that, instead.  Physicists have been hard at work creating quantum computers that can, in theory at least, go through lots of factors all at once -- but it's unclear if engineers will ever overcome the hurdle of noise that plagues quantum mechanics so much, and if so, whether engineers would be able to gather enough "qubits" to be able to carry out the large number of computations necessary to factor large numbers.  Nonetheless, this threat is serious enough that researchers are working to develop "quantum-proof" algorithms for encryption -- and governments , for that matter, are sucking up as much current communication as they can, with the hopes that someday they'll be able to read everything!


Fun fact!  This is the first blogpost where I formally use $\LaTeX$ to format things!  I originally intended to keep it simple, but I discovered that I really wanted easy-to-format subscripts for the keys.  Plain A_0 just looked ugly! I found a forum that directed me to https://koutuholi.blogspot.com/2021/04/mathjax.html, which provides a non-supported way to provide the magic of $\LaTeX$ to blogs.

For those not familiar with $\LaTeX$, it is a fantastic document layout system used by mathematically-oriented people to write papers; I personally find the creation of documents using the system to be fantastic, but when I get frustrated with the ASCII mathematical representation, I remind myself ... that $\LaTeX$ is the worst math system out there, except for all the others!  (I particularly despise "equation editors"; they are surprisingly painful to use!)

Monday, January 20, 2025

Identity Management Atoms: Symmetric Keys

So far, nothing I have discussed actually encrypts data.  At best, we have hashes, which takes a block of text and produces a short, seemingly random collection characters -- that is specifically designed to prevent discovering the data that produced it!

While all of this is called "cryptography", there is a major reason I like to call this "Identity Management":  these are the tools that allow us to confirm each other's identities, which is a task that transcends the mere sharing of information.

At some point, however, we're going to want to share data with someone we trust, and we don't want anyone else to read what we send!  To do this, we need some sort of way that scrambles data so that, once sent, it can be unscrambled.  Perhaps the oldest of these is the "symmetric key", something shared between the two communicators beforehand, so that they can recover communication.

Perhaps the simplest example is called "Caesar's Cipher", which simply "rotates" letters by 13 -- A becomes "M", B becomes "N", and so forth -- which isn't a particularly difficult algorithm to crack.  It's easy to imagine a more complicated version, where each letter is assigned to another random letter, but even then, the algorithm is simple enough to crack, it's offered in puzzle books as "cryptograms", to be broken for entertainment.

On the other side of this, there's the "one time pad", which is a pad of randomly generated numbers used for cryptography.  For each "block" of a message, the sender uses a page, and the receiver needs to know what page is used.  This method is mathematically proven to be impossible to crack -- if you can trust that your random number generator doesn't produce identifiable patterns, if you don't use a page more than once (because two pages of data that use the same encryption page can be used to decrypt each other), and if you can ensure that only you and your confidant have unique one-time pads that no one else can see.

And this brings us to the weakness of symmetric keys:  how the heck do you get a symmetric key to the people you wish to communicate with, without anyone else getting their dirty little mittens on them, too?  Well, besides meeting up face-to-face with each person you wish to communicate with, and make sure that each person has their own unique pad, and keep track of where you are in each pad in your communications .... well, this isn't exactly the best way to distribute keys when you're trying to reach out to a computer on the other side of the world.

Naturally, there are a number of schemes for generating these random keys, all essentially designed to create things akin to "one time pads" on the fly, AES being a particularly popular one.  To the best of my knowledge, there aren't any concerns about these keys being weak against quantum computers -- they use algorithms that aren't susceptible to the type of parallel processing that quantum computers will theoretically offer.

Nope!  To the degree that these keys are weak against quantum computers, it's because they have to be shared!  And they are typically shared by asymmetrical public/private key cryptographic systems -- which are susceptible to quantum computer algorithms -- and which are also the cornerstone of both computer cryptography and identity management in general.

It seems like public/private key pairs would be better than symmetric keys for sharing data -- so why are symmetric keys still used?  It so happens that symmetric keys are far less computationally intensive than asymmetric ones, so they are used to optimize our information sharing.

Monday, January 6, 2025

My Theme for 2025 and the State of the Blogger

Several years ago, I encountered a fantastic recommendation via Youtuber CGP Grey: Themes as an alternative to Resolutions.  The idea is simple:  resolutions are too specific and almost always fail, so why don't you choose a "theme" as a guide for your actions for the year?  (Or better yet, the season, since seasons are shorter and more manageable).

For example, I made 2024 the year of "Taking Flight" -- both because I have a strong interest in aviation, and because I have been unemployed for a while, and I wanted be ready to "fly" again with whatever came my way.  While I cannot say that I succeeded with employment (I'll get to that in "State of the Blogger"), I can nonetheless be happy that I actually flew a plane (it was very brief, and it was a little terrifying, but I also realize that I'd be less terrified if I had a few lessons under my belt), I got to ride on another small-ish airplane with three of my children (and their first flight), and I was able to attend several Experimental Aviation Association meetings.  I'd like to think I did pretty well with "Taking Flight"!

In addition to that, I also picked up a couple of projects and carried them to completion -- because I like to make things, but I don't make that as much of a priority as I'd like.  I've been meaning to create videos describing these projects, but nonetheless, these projects also represent attempts to "take flight" ... and they also inspired my theme for this year:

The Year of Creation

If there's anything I've come to realize about myself, it is that I enjoy creating things, whether it be designing things on paper, or actually making things with my hands.  Indeed, the two projects I worked on -- a prototype for a "computer easel" and a model for an "armadillo trailer" -- are things I have designed and redesigned over and over again, usually doodling in Church or in other meetings.  Since I have neglected this tendency somewhat over the years, I figure that 2025 would be a good year to lean into it!

Naturally, I hope that this expands into something interesting career-wise, but if not, I at least hope I can enjoy myself, even when things seem difficult .... which brings me to ....

The State of the Blogger

At the end of September, I accepted an internship at a company that produces user interfaces for command-line tools for simulations.  Although it was part-time, had no benefits, and doesn't pay what I'm used to, I thought it would be prudent both to apply and to take the position, for a couple of reasons:

First, I wanted to see how well I could fit into such an environment.  For many years, I have worked as a software engineer, primarily in web development, but with some data analysis as well; I wanted to see if I can handle work where the focus was in physics simulations.  At the end of 2023, I had earned a certificate in Finite Element Analysis -- I took the class because, for years, I wondered if this would be an interesting direction -- but I came away thinking that, sure, I have fairly good computer programming instincts, and my mathematical foundations are sound, but I'm not entirely comfortable enough with physics or engineering to set up these models by myself.  I wanted to know if there was room on an engineering team for someone who can run simulations with "hand-holding" from people who understand the modelling aspect.

Second, I wanted to know if I could work part-time without burning out.  For many years, I have gone through cycles of looking for work, getting hired, starting out positions that seem exciting ... and then burning out.  I have always attributed this to being a "poor fit" for the positions I held, and I often wondered if I just needed to find the "right career" -- but now that I better understand autism and ADHD, and have some idea of how these conditions affect my work, I wanted to see if I can handle limited work.

Third, I had hoped I could see how well I can handle things outside of work -- in particular, I wanted to pursue my own projects! -- but I also wanted to see how well extended free time would help prevent burnout.

So, it's been three months.  What are the results?  I am not one who enjoys saying an experiment failed because the results didn't come out as expected (which is a colloquial habit I have!) -- a "failed" experiment is a data point, an opportunity for learning, and a time to reflect on and revise our understanding of the world.  It is nonetheless tempting to say that this particular experiment failed, however, because of confounding factors, that made it difficult to "read" whether I could handle such work.

Ever since I completed my last blog post on cryptography in October, I've been thinking about how I'm getting close to finishing the "atoms", and am almost ready to move on to "molecules" -- but I stalled out on this, procrastinating on taking the next steps, both because my energy was drawn in other directions, and because I got tired.  While I may have gone silent during this time, I had a burst of creativity for the first three or four weeks, exploring several weird topics, and even thinking things like "hey, maybe these would be good blog posts!"

And then, at the end of October, the confounding event happened:  we got notification that our income had increased enough that we no longer qualified for Medicaid, and thus needed to focus a lot of energy on the process of getting Marketplace insurance for November.  I tried applying immediately, but each time, I got the message "Sorry, you qualify for Medicaid, you can't apply for a plan right now!" reinforced by the State responding "Yep, these folks qualify for Medicaid!  Don't worry about plans!"  After about a week of back and forth with this, a Marketplace Representative finally recommended I just apply for a plan on November 1st.   I was desperate for insurance because I had an evaluation coming up!

And so I did apply on November 1st -- and was told "Yep, you qualify, and your plan starts December 1st!" -- which launched me into a month-long appeals process.  By the end of the month, I got a weird message of "yep, you qualify for Medicaid in November after all", but this seems to be independent of the appeals process -- I now have a meeting scheduled for tomorrow, January 7th, to discuss this appeal.

I went ahead with the evaluation, even with the specter of potentially having to pay for it, because (in my mind at least) it's an important puzzle for what I'm trying to figure out!  For the record, I have really high spatial reasoning, but my "active memory" is normal, and my "inhibition" is very low.  And yes, I have ADHD and I'm autistic.  I'm still waiting for the formal report, but I'm figuring that my next steps are to get an occupational therapy sensory evaluation, and to see if medicines for ADHD will help me focus more.  (For years, I've been wary about medicating ADHD, but now that I understand how medication might help, I'm a lot more open to trying something -- but I'm going in with my eyes as open as I can make them, keeping in mind that these medications don't help everyone!)

Which brings me to December, the end of which I had an initial evaluation of my internship.  The co-worker I've been working with said that the team is impressed with my logical skills, and can see I write good tests -- however, they are concerned about the time I took on one of the projects -- and thus decided to extend the internship by a month, to see how things go.  On my end?  I found myself already somewhat burned out, although I find that when I work for 5 hours a day, my ADHD tendencies are generally kept under control -- indeed, in the two days during the holiday weeks that I worked close to full-time (to make up for hours, somewhat, on the four days I didn't work), I found that it was much more difficult to focus on work -- but I also nonetheless concluded that my experience with 3D programming and Finite Element Analysis can be assets for a team trying to run physical simulations.

I had also hoped that finances would work out so that I could take a full two weeks off for Christmas and New Year's, but alas, it was not to be, so I cannot evaluate how an extended break may help with preventing burnout.  Additionally, the insurance fiasco took its toll -- this is a confounding factor that makes me want to say this experiment failed, but then again, isn't it the case that no matter what work I do, I have to worry about how life may intrude on things?  So, even to the degree this was a "confounding" factor, I should nonetheless consider it an important data point, too.

And thus, I am left with these conclusions:

  • I am still convinced I cannot work 8 hour days, and now fear I can barely handle 5 hour days; I nonetheless need to keep in mind that this may be a mental roadblock, and not an actual limitation;
  • I nonetheless need to remind myself of this:  We often hear messages that basically say "Buck up and just deal with it!" and "Our ancestors had to just deal with their problems!" -- and while it is valuable to keep these kinds of things in mind, it's also important to remember that (1) "Just deal with it" includes figuring out your limitations, and accommodating them, and (2) our ancestors often dealt with these issues by laying down and dying, sometimes even by their own hand -- or by "handling" them via begging and kindness of others (and here I am imagining how, before wheelchairs and Braille were invented, the paralyzed had to rely on being carried everywhere, and the blind relied on people reading to them) -- and that, while I have enough understanding about family history to know that my ancestors did, indeed, just deal with their pain ... let's just say that there's plenty of room for improvement for how they could have handled some of their issues!;
  • That I can probably handle 3D and simulation work, particularly if I can figure out how to do these things in "small doses" (eg, contractual positions that last only three or four or six months);
  • Nonetheless, I don't think I can handle the networking and job-hunting required to find such positions (and no, I don't know how to square this circle just yet!);
  • That I really enjoy creating things, and that perhaps there's room in that direction to help me thrive;
  • While I understand the appeal that some have for getting away from home and going to the office, I nonetheless appreciate the privilege of working from home (a privilege not yet granted by my internship) -- and I also appreciate getting out of both the home and the office!;
  • It's a pity that pilot lessons are so expensive, and I'm almost certainly too old to pursue a career in flight anyway;
  • I don't know if I could pull it off, but I think I need to push myself to post on my blog daily, or at least three or four times a week ....
I'm sure there may be other conclusions I'm missing out on, but although I feel my situation is bleak (and it's likely a lot less bleak than I feel like it is right now!), I have some optimism that things can get better!

Regardless, I need to take things a day at a time, and hope for the best.

And, who knows?  Maybe this will be the year I get my own computer easel and portable office, and have the opportunity to use both .... (I cannot help but reflect on how so much of my design has focused on portable things -- and how I have a strong desire to explore the world (likely driven by an ADHD-fueled need for novelty) but nonetheless bring with me a consistent environment I can easily retreat to (likely driven by an autistic need for order and routine).)