Editing 2700: Account Problems

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 20: Line 20:
  
 
The title text describes a password which is "just" every Unicode character concatenated into a single string. {{w|Unicode}} is a standard for representing characters from many writing systems, and it has {{w|Unicode#Versions|149,186 characters}} as at the time of this comic (with new characters being added over time). A password consisting of all of those characters would be extremely long; it would be impractical to type by hand, and would be too long for pretty much all account registration systems. (A "codepoint" is the number assigned to a character, and {{w|UTF-8}} is a common encoding system for representing each Unicode codepoint as a sequence of {{w|byte}}s.) Also, since Unicode includes the null character, the password would have the same issue as Cueball's password. Further, if the account registration system treats the null character as a string terminator (as in C), then the password would be equivalent to an empty password (assuming it contains the Unicode codepoints in order, starting with the null character).
 
The title text describes a password which is "just" every Unicode character concatenated into a single string. {{w|Unicode}} is a standard for representing characters from many writing systems, and it has {{w|Unicode#Versions|149,186 characters}} as at the time of this comic (with new characters being added over time). A password consisting of all of those characters would be extremely long; it would be impractical to type by hand, and would be too long for pretty much all account registration systems. (A "codepoint" is the number assigned to a character, and {{w|UTF-8}} is a common encoding system for representing each Unicode codepoint as a sequence of {{w|byte}}s.) Also, since Unicode includes the null character, the password would have the same issue as Cueball's password. Further, if the account registration system treats the null character as a string terminator (as in C), then the password would be equivalent to an empty password (assuming it contains the Unicode codepoints in order, starting with the null character).
 +
 +
In computers, every "character" is a sequence of bytes. Every byte is a sequence of eight bits. A bit is always either a zero (0) or a one (1).
 +
 +
Every character is a sequence of bytes, but not every sequence of bytes is a valid character. For example, a JPEG image is also a sequence of bytes (much longer than a character). An MP3 audio file is also a sequence of bytes.
 +
 +
A null string terminator is a type of characters called a control character. Unlike characters which are letters of the alphabet or numbers, control characters are not intended to be displayed on the screen, and are not intended to be typed on a keyboard; rather, they are used for internal purposes in the computer program. It is thus strange and hard to understand how Cueball was able to successfully insert such a character in his password, since there is no sequence of keys he could type that would result in a null terminator.
 +
 +
Null terminators are used in older, C-based languages to mark where a string ends. Every programming language has variables[citation needed], which are used to store data. In C, a primitive variable can store a small amount of data, such as an integer or boolean (true or false) value. Strings (which are a sequence of characters) often need to store much larger amounts of data; too much to fit in the memory space which is available for a primitive. To solve this, C uses a system called "pointers", in which the variable is an integer which refers to a memory location. When the string needs to be read or written, C looks up the memory location, and interprets the data as a series of characters. One problem is, because a string can be any length (big or small), C needs to know where to stop reading from memory. The null terminator is C's solution to this. When C encounters the null terminator, it knows it has reached the end of the string and stops reading. Therefore, it is important that the null terminator is not a normal character that can be typed on a keyboard.
 +
 +
This has implications for security. If users are able to add or remove null terminators at will, then they can exploit C's string reading mechanisms in order to read data in a way not intended by the software programmers. If a malicious user is successful in doing this, they may be able to intentionally cause security problems on the computer, such as infecting it with malware.
 +
 +
Based on Ponytail's reaction, this is not the first time Cueball has come to her with strange problems. Based on Cueball's reaction, it does not look like he was purposely trying to exploit a security vulnerability, but instead ended up in this situation through some mysterious, unexplained happenstance.
 +
 +
Cueball notes that his password contains a "special character", which is a typical requirement imposed on users. However, in most contexts, "special character" means an ordinary printable character that can be typed on a normal keyboard and seen on the screen. Cueball's use of "special" is technically true, as null terminals do have a specialized purpose; but his word usage is not in keeping with the way that phrase is normally understood.
  
 
==Transcript==
 
==Transcript==

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)