01
There are mainly seven types of Base encoding

They are Base16, Base32, Base64, Base58, Base85, Base91, Base100, and other variants such as Base62, Base45, etc. For Base encoding, you only need to remember their characteristics, and when you see the ciphertext, you should know what type of encryption it is. 

Next, I will introduce some main Base encodings.
Base16 Encoding

Base16 encoding, also known as “hexadecimal encoding” or “Hex encoding”, is a method of representing binary data as hexadecimal digits and characters.
Encoding Process
1. Split the binary data into groups of 4 (since 4 bits can represent 16 different characters (2^4=16))
2. Map each group of four binary digits to the corresponding Base16 character.
3. If the binary data is not a multiple of 4, pad with 0 at the end.
The index table is as follows

Decoding Example Explanation

Next, try to decode this using a tool (or calculate it yourself)
68 65 6c 6c 6f 20 78 69 6e
Convert to Decimal
Convert to Corresponding Characters
Complete Process with Table
Using the formula:
Decimal Value = High Character Value × 16 + Low Character Value × 1
|
Hexadecimal Calculation Process Decimal |
||
|
68 |
6 × 16 + 8 = 104 |
104 |
|
65 |
6 × 16 + 5 = 101 |
101 |
|
6c |
6 × 16 + 12 = 108 |
108 |
|
6c |
6 × 16 + 12 = 108 |
108 |
|
6f |
6 × 16 + 15 = 111 |
111 |
|
20 |
2 × 16 + 0 = 32 |
32 |
|
78 |
7 × 16 + 8 = 120 |
120 |
|
69 |
6 × 16 + 9 = 105 |
105 |
|
6e |
6 × 16 + 14 = 110 |
110 |
According to the ASCII table, convert the decimal values to corresponding characters:
|
Decimal ASCII Character Description |
||
|
104 |
h |
Lowercase h |
|
101 |
e |
Lowercase e |
|
108 |
l |
Lowercase l |
|
108 |
l |
Lowercase l |
|
111 |
o |
Lowercase o |
|
32 |
Space |
|
|
120 |
x |
Lowercase x |
|
105 |
i |
Lowercase i |
|
110 |
n |
Lowercase n |
Complete decoding process summary
Hexadecimal Decimal ASCII Character
68 104 h
65 101 e
6c 108 l
6c 108 l
6f 111 o
20 32 (space)
78 120 x
69 105 i
6e 110 n
Answer: hello xin
Swipe left and right to see more
Example Attempt
Next, try to decode this using a tool
71696e6762616e7a68616e6768656e6169636861
Please send the answer privately to the class leader
Base32 Encoding
Base32 is a method of encoding binary data into an ASCII string, using 32 printable characters (uppercase letters A-Z and digits 2-7) to represent 5-bit binary numbers
Encoding Process
1. Split the binary data into groups of 5 (like Base16, since 5 bits can represent 32 different characters (2^5=32))
2. Map each group of four binary digits to the corresponding Base32 character.
3. If the binary data is not a multiple of 5, pad with “=”
The index table is as follows

Decoding Example Explanation

Next, try to decode this using a tool (or calculate it yourself)
NBSWY3DPEBQW4===
Convert to5-bit Binary
Binary
Rearrange
Binary
Convert to Decimal
First, remove the padding character “=” from the Base32 characters, then convert to the corresponding decimal numbers in the index table
|
Base32 Corresponding Decimal Binary |
||
|
N |
13 |
01101 |
|
B |
1 |
00001 |
|
S |
18 |
10010 |
|
W |
22 |
10110 |
|
Y |
24 |
11000 |
|
3 |
27 |
11011 |
|
D |
3 |
00011 |
|
P |
15 |
01111 |
|
E |
4 |
00100 |
|
B |
1 |
00001 |
|
Q |
16 |
10000 |
|
W |
22 |
10110 |
|
4 |
28 |
11100 |
Concatenate all binary numbers in order
01101 00001 10010 10110 11000 11011 00011 10000 01100 00001 10100 10110 11100
(There are a total of 65 bits, but we padded three positions with “=”, so the effective binary is only 62 bits)
Discard the last three invalid digits and replace them with 0
01101 00001 10010 10110 11000 11011 00011 10000 01100 00001 10100 10110 11000
Rearrange in groups of eight
01101000 01100101 01101100 01101100 01101111 00100000 01100001 01101110
(Discard those that are less than eight bits)
Complete decoding process
Attached summary table
|
Eight-bit Binary Decimal ASCII |
||
|
01101000 |
104 |
h |
|
01100101 |
101 |
e |
|
01101100 |
108 |
l |
|
01101100 |
108 |
l |
|
01101111 |
111 |
o |
|
00100000 |
32 |
Space |
|
01100001 |
97 |
a |
|
01101110 |
110 |
n |
Answer: hello an
Swipe left and right to see more
Example Attempt
Next, try to decode this using a tool
PJQWS3DBNF4WSYTFNE======
Please send the answer privately to the class leader
Base64 Encoding
Base64 is a method of encoding binary data using 64 printable characters, commonly used for transmitting or storing binary data in text protocols
Encoding Process
1. Split the binary data into groups of 6 (like Base16, since 6 bits can represent 64 different characters (2^6=64))
2. Map each group of four binary digits to the corresponding Base32 character.
3. If the length of the binary data is not a multiple of 3, one or two padding characters “=” can be used to complete it
The index table is as follows

[Note: Some variant questions may change the index table]
Example Explanation

Next, try to decode this using a tool (or calculate it yourself)
aGVsbG8geWk=
Convert to6-bit Binary
Binary
Rearrange
Binary
Convert to Decimal
Like Base32
|
Base64 Corresponding Decimal Binary |
||
|
a |
26 |
011010 |
|
G |
6 |
000110 |
|
V |
21 |
010101 |
|
s |
44 |
101100 |
|
b |
27 |
011011 |
|
G |
6 |
000110 |
|
8 |
60 |
111100 |
|
g |
32 |
100000 |
|
e |
30 |
011110 |
|
W |
22 |
010110 |
|
k |
36 |
100100 |
Concatenate all binary numbers in order
011010 000110 010101 101100 011011 000110 111100 100000 011110 010110 100100
Rearrange in groups of eight
01101000 01100101 01101100 01101100 01101111 00100000 01111001 01101001
(Discard those that are less than eight bits)
Complete decoding process
Attached summary table
|
Binary Decimal ASCII |
||
|
01101000 |
104 |
h |
|
01100101 |
101 |
e |
|
01101100 |
108 |
l |
|
01101100 |
108 |
l |
|
01101111 |
111 |
o |
|
00100000 |
32 |
Space |
|
01111001 |
97 |
y |
|
01101001 |
110 |
i |
Answer: hello yi
Swipe left and right to see more
Example Attempt
Next, try to decode this using a tool
eXVhbnNlbnFpZG9uZw==
Please send the answer privately to the class leader
02
Tool Introduction

Finally, here are some practical tools that can make encryption and decryption easier and faster

1. CyberChef Online Tool
(Some base encodings are not included)
Website: https://cyberchef.org/

2. Flowing with the Current
Needs to be downloaded, can be found by searching online, it also has many encryption and decryption tools

3. Others
You can also directly search for online decryption websites for a specific encoding, such as the bugku online tool.