<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stephan+Leeds</id>
		<title>explain xkcd - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stephan+Leeds"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Stephan_Leeds"/>
		<updated>2026-04-21T07:29:07Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=1323:_Protocol&amp;diff=399909</id>
		<title>1323: Protocol</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1323:_Protocol&amp;diff=399909"/>
				<updated>2025-12-05T08:16:25Z</updated>
		
		<summary type="html">&lt;p&gt;Stephan Leeds: /* Explanation */ uninformative restrictive clause to informative nonrestrictive&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 1323&lt;br /&gt;
| date      = January 29, 2014&lt;br /&gt;
| title     = Protocol&lt;br /&gt;
| image     = protocol.png&lt;br /&gt;
| titletext = Changing the names would be easier, but if you're not comfortable lying, try only making friends with people named Alice, Bob, Carol, etc.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
{{w|Alice_and_Bob|Alice, Bob, and Eve}} are role names traditionally used in describing cryptographic protocols. Rather than talking about &amp;quot;Person A&amp;quot;, &amp;quot;Person B&amp;quot;, &amp;quot;Person C&amp;quot;, names beginning with each letter are used instead, and giving them different genders lets pronouns be used to shorten discussions. For example: &amp;quot;Person A sends Person B a message encoded with Person B's public key&amp;quot; is much easier to parse when written as &amp;quot;Alice sends Bob a message encoded with his public key.&amp;quot; Eve is short for &amp;quot;eavesdropper&amp;quot; - a person trying to find out what's being said in the conversations between the other people. The classic situation involves Alice wanting to send a secret message to Bob, while Eve (the eavesdropper), attempts to read the message, ideally without Alice or Bob ever finding out. Additional participants such as Carol (Person C) can be added if necessary. The list of names has become very standardized over time as described at {{w|Alice and Bob}}.&lt;br /&gt;
&lt;br /&gt;
The joke here is that any computer scientist, hearing the names used, will think that they are listening to a cryptography problem. By changing the names in a story to these role names, you can induce them to listen carefully to boring stories. The fewer the interesting details, the more it sounds like a general problem, so very boring stories are actually the easiest.&lt;br /&gt;
&lt;br /&gt;
The title text shows a more radical approach to the problem, for people &amp;quot;who do not feel comfortable about lying&amp;quot;. In this approach, you only make friends with people who have the appropriate names already, which means that technically you tell the story like it is. But this approach means investing a lot more effort into curating such a situation, possibly even to ensure that the Eve that you befriend is an actual habitual eavesdropper.&lt;br /&gt;
&lt;br /&gt;
The comic title also can be interpreted in two ways. First, the computer scientist thinks the conversation is about an encryption protocol. Second, the way the conversation is carried resembles a protocol used by many data communication systems, where one side sends data while the other sends back an {{w|Acknowledgement (data networks)|acknowledgement}} upon receiving the data. In this case, the data are the lines of the boring story.&lt;br /&gt;
&lt;br /&gt;
In comic [[177: Alice and Bob]] these names are used in the same context. Instead of Alice and Bob being perfectly innocent people who just want to communicate in private, Bob is actually having an affair with Alice. Eve —his former partner— cracked the encryption to see what the message contained. Thus, this comic seems to continue the Alice/Bob romance, jealous-Eve plot, with Eve apparently confronting Alice over her text message to Bob. The names are also mentioned in [[2691: Encryption]].&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
:[Cueball is telling a story to a Computer Scientist who is seated at his desk.]&lt;br /&gt;
:Cueball: Alice sends a message to Bob saying to meet her somewhere.&lt;br /&gt;
:Computer Scientist: Uh huh.&lt;br /&gt;
:Cueball: But Eve sees it, too, and goes to the place.&lt;br /&gt;
:Computer Scientist: With you so far.&lt;br /&gt;
:Cueball: Bob is delayed, and Alice and Eve meet.&lt;br /&gt;
:Computer Scientist: Yeah?&lt;br /&gt;
:CAPTION: I've discovered a way to get computer scientists to listen to any boring story.&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
[[Category:Comics featuring Cueball]]&lt;br /&gt;
[[Category:Computers]]&lt;br /&gt;
[[Category:Cryptography]]&lt;br /&gt;
[[Category:Multiple Cueballs]]&lt;/div&gt;</summary>
		<author><name>Stephan Leeds</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=1323:_Protocol&amp;diff=399908</id>
		<title>1323: Protocol</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=1323:_Protocol&amp;diff=399908"/>
				<updated>2025-12-05T08:13:15Z</updated>
		
		<summary type="html">&lt;p&gt;Stephan Leeds: /* Explanation */ grammatical number or tense&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 1323&lt;br /&gt;
| date      = January 29, 2014&lt;br /&gt;
| title     = Protocol&lt;br /&gt;
| image     = protocol.png&lt;br /&gt;
| titletext = Changing the names would be easier, but if you're not comfortable lying, try only making friends with people named Alice, Bob, Carol, etc.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
{{w|Alice_and_Bob|Alice, Bob, and Eve}} are role names traditionally used in describing cryptographic protocols. Rather than talking about &amp;quot;Person A&amp;quot;, &amp;quot;Person B&amp;quot;, &amp;quot;Person C&amp;quot;, names beginning with each letter are used instead, and giving them different genders lets pronouns be used to shorten discussions. For example: &amp;quot;Person A sends Person B a message encoded with Person B's public key&amp;quot; is much easier to parse when written as &amp;quot;Alice sends Bob a message encoded with his public key.&amp;quot; Eve is short for &amp;quot;eavesdropper&amp;quot; - a person trying to find out what's being said in the conversations between the other people. The classic situation involves Alice wanting to send a secret message to Bob, while Eve (the eavesdropper), attempts to read the message, ideally without Alice or Bob ever finding out. Additional participants such as Carol (Person C) can be added if necessary. The list of names has become very standardized over time as described at {{w|Alice and Bob}}.&lt;br /&gt;
&lt;br /&gt;
The joke here is that any computer scientist, hearing the names used, will think that they are listening to a cryptography problem. By changing the names in a story to these role names, you can induce them to listen carefully to boring stories. The fewer the interesting details, the more it sounds like a general problem, so very boring stories are actually the easiest.&lt;br /&gt;
&lt;br /&gt;
The title text shows a more radical approach to the problem, for people &amp;quot;who do not feel comfortable about lying&amp;quot;. In this approach, you only make friends with people who have the appropriate names already which means that technically you tell the story like it is. But this approach means investing a lot more effort into curating such a situation, possibly even to ensure that the Eve that you befriend is an actual habitual eavesdropper.&lt;br /&gt;
&lt;br /&gt;
The comic title also can be interpreted in two ways. First, the computer scientist thinks the conversation is about an encryption protocol. Second, the way the conversation is carried resembles a protocol used by many data communication systems, where one side sends data while the other sends back an {{w|Acknowledgement (data networks)|acknowledgement}} upon receiving the data. In this case, the data are the lines of the boring story.&lt;br /&gt;
&lt;br /&gt;
In comic [[177: Alice and Bob]] these names are used in the same context. Instead of Alice and Bob being perfectly innocent people who just want to communicate in private, Bob is actually having an affair with Alice. Eve —his former partner— cracked the encryption to see what the message contained. Thus, this comic seems to continue the Alice/Bob romance, jealous-Eve plot, with Eve apparently confronting Alice over her text message to Bob. The names are also mentioned in [[2691: Encryption]].&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
:[Cueball is telling a story to a Computer Scientist who is seated at his desk.]&lt;br /&gt;
:Cueball: Alice sends a message to Bob saying to meet her somewhere.&lt;br /&gt;
:Computer Scientist: Uh huh.&lt;br /&gt;
:Cueball: But Eve sees it, too, and goes to the place.&lt;br /&gt;
:Computer Scientist: With you so far.&lt;br /&gt;
:Cueball: Bob is delayed, and Alice and Eve meet.&lt;br /&gt;
:Computer Scientist: Yeah?&lt;br /&gt;
:CAPTION: I've discovered a way to get computer scientists to listen to any boring story.&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
[[Category:Comics featuring Cueball]]&lt;br /&gt;
[[Category:Computers]]&lt;br /&gt;
[[Category:Cryptography]]&lt;br /&gt;
[[Category:Multiple Cueballs]]&lt;/div&gt;</summary>
		<author><name>Stephan Leeds</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=327:_Exploits_of_a_Mom&amp;diff=83737</id>
		<title>327: Exploits of a Mom</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=327:_Exploits_of_a_Mom&amp;diff=83737"/>
				<updated>2015-01-29T18:49:09Z</updated>
		
		<summary type="html">&lt;p&gt;Stephan Leeds: /* Explanation */ use–mention distinction; floating hyphen instead of em dash&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 327&lt;br /&gt;
| date      = October 10, 2007&lt;br /&gt;
| title     = Exploits of a Mom&lt;br /&gt;
| image     = exploits_of_a_mom.png&lt;br /&gt;
| titletext = Her daughter is named Help I'm trapped in a driver's license factory.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
[[Mrs. Roberts]] receives a call from her son's school. The caller, likely one of the school's administrators, asks if the she really named her son &amp;lt;code&amp;gt;Robert'); DROP TABLE Students;--&amp;lt;/code&amp;gt;, a rather unusual name. Perhaps surprisingly, Mrs. Roberts responds in the affirmative, claiming that he uses the nickname &amp;quot;Little Bobby Tables&amp;quot;. As the full name is read into the school's system's databases without {{w|Data sanitization#SQL injection|data sanitization}}, it causes the student table in the database to be deleted.&lt;br /&gt;
&lt;br /&gt;
The title of this comic is a pun—''exploit'' can mean an accomplishment or heroic deed, but in computer science the term refers to a program or technique that takes advantage of a vulnerability in other software. In fact, one could say that her exploit is to exploit an exploit (her achievement is to make use of a vulnerability). The title can also refer to her choice of name for her son, which is rather extraordinary.&lt;br /&gt;
&lt;br /&gt;
In {{w|SQL}}, a database programming language, commands are separated by semicolons &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt; and strings of text are often delimited using single quotes &amp;lt;code&amp;gt;'&amp;lt;/code&amp;gt;. Parts of commands may also be enclosed in parentheses &amp;lt;code&amp;gt;(&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;)&amp;lt;/code&amp;gt;.  Data entries are stored as &amp;quot;rows&amp;quot; within named &amp;quot;tables&amp;quot; of similar items (e.g. &amp;lt;code&amp;gt;Students&amp;lt;/code&amp;gt;).  The command to delete an entire table (and every row of data in that table) is &amp;lt;code&amp;gt;DROP&amp;lt;/code&amp;gt;, as in &amp;lt;code&amp;gt;DROP TABLE Students;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The exploited vulnerability here is that the single quote in the name input was not correctly &amp;quot;escaped&amp;quot; by the software. That is, if a student's name did indeed contain a quote mark, it should have been parsed as one of the characters making up the text string and not as the marker to close the string, which it erroneously was. Lack of such escaping is a common SQL vulnerability; this type of exploit is referred to as {{w|SQL injection}}. Mrs. Roberts thus reminds the school to make sure they have added data filtering code to prevent code injection exploits in the future.&lt;br /&gt;
&lt;br /&gt;
For example, if the site was running PHP, the code might store the student's name in a variable called &amp;lt;code&amp;gt;$name&amp;lt;/code&amp;gt;, and generate an SQL statement to search the database and check that the name is valid, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$sql = &amp;quot;SELECT * FROM Students WHERE (first_name=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;'''$name'''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;);&amp;quot;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a student named &amp;quot;Annie&amp;quot;, this would give the following SQL command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SELECT * FROM Students WHERE (first_name=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;'''Annie'''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is a valid command where the 5-character string &amp;quot;Annie&amp;quot; has been substituted for &amp;quot;$name&amp;quot; in the PHP code above. However, with Mrs. Roberts' exploit, the SQL command becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SELECT * FROM Students WHERE (first_name=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;'''Robert'); DROP TABLE Students;--'''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As semicolons separate statements, this will be read by the interpreter as three commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SELECT * FROM Students WHERE (first_name='Robert');&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;DROP TABLE Students;&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--');&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first line runs as normal, caused by the '''&amp;lt;code&amp;gt;');&amp;lt;/code&amp;gt;''' punctuation in part of Little Bobby Tables' name properly closing the current command. The second injected command then does the damage, deleting the student records from the school's database. The third line begins with two hyphens &amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt; which are used to mark a comment in SQL, meaning that the interpreter ignores it as well as the partial fragment of code originally after &amp;lt;code&amp;gt;$name&amp;lt;/code&amp;gt; in the PHP statement.&lt;br /&gt;
&lt;br /&gt;
For this to work, it helps to know a little about the structure of the database.  But it's quite a good guess that a school's student management database might have a table called &amp;lt;code&amp;gt;Students&amp;lt;/code&amp;gt;. Mrs. Roberts' exploit also assumes that the person who wrote the code used exactly one set of parentheses around &amp;lt;code&amp;gt;(first_name='$name')&amp;lt;/code&amp;gt; in the PHP example, so that the single close parenthesis in the name could match it, which apparently was a successful guess. Of course, in real life most exploits of this kind would be performed not by engineering a person's name such that it would eventually be entered into a database query, but rather by accessing some kind of input system yourself (easy with websites that use any kind of search interface, for example) and guessing various combinations by trial and error until something works, perhaps by first trying to inject the &amp;lt;code&amp;gt;SHOW TABLES&amp;lt;/code&amp;gt; command to see how the database is structured.&lt;br /&gt;
&lt;br /&gt;
This xkcd comic has become rather famous, spawning at least one site about preventing SQL injection named http://bobby-tables.com.&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
:[Mrs. Roberts receives a call from her son's school.]&lt;br /&gt;
:Caller: Hi, This is your son's school. We're having some computer trouble.&lt;br /&gt;
&lt;br /&gt;
:Mrs. Roberts: Oh, dear - did he break something?&lt;br /&gt;
:Caller: In a way -&lt;br /&gt;
&lt;br /&gt;
:Caller: Did you really name your son &amp;lt;code&amp;gt;Robert'); DROP TABLE Students;--&amp;lt;/code&amp;gt; ?&lt;br /&gt;
:Mrs. Roberts: Oh, yes. Little Bobby Tables, we call him.&lt;br /&gt;
&lt;br /&gt;
:Caller: Well, we've lost this year's student records. I hope you're happy.&lt;br /&gt;
:Mrs. Roberts: And I hope you've learned to sanitize your database inputs.&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
[[Category:Comics featuring Mrs. Roberts]]&lt;br /&gt;
[[Category:Comics featuring Little Bobby Tables]]&lt;br /&gt;
[[Category:Comics featuring Elaine Roberts]]&lt;/div&gt;</summary>
		<author><name>Stephan Leeds</name></author>	</entry>

	</feed>