Skip to main content
Challenges Base 10 and 16
Cryptography Easy Solves: 73

Base 10 and 16

Points
15

Cryptography — Converting Text to a Number

Cryptosystems like RSA work with numbers, but our messages consist of characters (letters). To apply mathematical operations, messages need to be converted into numeric form.

The most common method is to take the ASCII bytes of the message, convert them to hexadecimal form, and then simply concatenate them in sequence. This resulting long hexadecimal value can also be treated as a base-16 number or a base-10 decimal number.

As an example:

xabar: HELLO ascii bayt: [72, 69, 76, 76, 79] hex bayt: [0x48, 0x45, 0x4c, 0x4c, 0x4f] base-16: 0x48454c4c4f base-10: 310400273487

Below is a large integer encoded using the same method. Convert it back to the original text message.

Given integer:

198974677777495821476335712892712909145306049542039928416716373344682544941090403019133

To do this in Python, you can use the PyCryptodome library. First, the module is imported via from Crypto.Util.number import *, and then using the long_to_bytes() function, the number is converted into a sequence of bytes (and from there into text).

To submit a flag, log in.

First solvers

1. Javohir 23.10.2025
2. _radjabov_ 23.10.2025
3. Islombek Shavkatboyev 26.10.2025
4. Ilyos Karimov 29.10.2025
5. Ulugʻbek 03.11.2025
6. Salim 11.11.2025
7. ZverX 18.11.2025
8. Mirjaxon Qaxxarov 19.11.2025
9. Baxriddinovich 29.11.2025
10. Rashidov Og'abek 03.12.2025