Next
Encryption and Data Formatting
Back
Restart
Next
This work is licensed with a
Creative Commons Attribution 4.0 International LicenseEndFragment
Encryption and Data Formatting
1/10
N - Z
click on each button
Special
n - z
2/10
a - m
0 - 9
American Standard Code for Information Interchange (ASCII) is the most common character encoding format for text data. ASCII assigns standard numeric values to letters, numerals, punctuation marks, and other characters. Encryption systems often convert ASCII to hexadecimal, decimal, or binary equivalents before the encryption operation.
A - M
UNPRINTABLE
4/10
ASCII codes fall into one of three sets: Standard ASCII printable character codes; ASCII control characters; Extended ASCII characters
Copy the ciphertext result and remeber your 4-character key.
Hex
Plaintext: Plaintext Binary:
Key:Key Binary: Encrypt
XOR Result (Binary):
Ciphertext:
To illustrate how encryption works, start by entering a 4-character plaintext message (each ASCII character converts to an 8-bit binary value). Then enter a 4-character key (which also converts to binary). Click on the Encrypt button to XOR the plaintext binary with the key binary. The ciphertext is generated in hexadecimal from the XOR result.
9/10
Boolean Expression:
X = A ⊕ B
0
0
1
XOR gate is a digital logic gate that gives a HIGH (1) true output when only one input is high or low. Exclusive means that one input is different than all of the rest. An XOR gate implements an exclusive OR; that is, a HIGH output results if one, and only one, of the inputs to the gate is HIGH (or LOW). A way to remember XOR is "one or the other but not both". The truth table illustrates the XOR gate operation. The expression uses the circled plus symbol.
XOR Gate
XOR
5/10
INPUTS
OUTPUT
Click switches on and off
1
A
B
X
3/10
Note: when entering a binary number, omit any leading zeros (0)
The quiz questions will be inserted here by the script Submit Output box to show the correct answers
Crypto analysts must be able to convert ASCII to binary, decimal, or hexadecimal.
Use the buttons to show the ASCII tables
The original message
Ciphertext: Ciphertext Binary:
Key:Key Binary: Decrypt
Plaintext (Binary):
Plaintext:
10/10
Paste or enter the ciphertext from the previous scene. Enter the same 4-character key used for encryption.
0 1 1 1 1 0 1 0
Plaintext
Key
Streaming cipher systems use the XOR operation and a key to encrypt messages one bit at a time. The message is stored as ciphertext. The ciphertext can be decrypted with the same XOR operation one bit at a time.
6/10
Ciphertext
Click to Encrypt
Click to Decrypt
Element
with Audio
HTML
Encryption
Decryption
Enter the result of the XOR operation for each message/key pair. Submit to check your results
All types of cryptographic systems use the XOR operation because of its reversibility. Reversibility means a plaintext message can be XORed with a key to create ciphertext. The ciphertext can then be XORed with the same key to get the original plaintext message.
7/10
Message
BinaryDecimalHexadecimalASCII
BinaryDecimalHexadecimalASCII
XOR Calculate Reset
BinaryDecimalHexadecimalASCII
8/10
XOR Calculator
The XOR Calculator lets you select an input type (either binary, decimal, hexadecimal, or ASCII) and a corresponding output type. NOTE: the calculator does not display leading zeroes; some ASCII characters are unprintable; ASCII assumes a 1-character input