fleschutz / Base256U

C++ sample implementation of Base256U (base256 encoding using Unicode characters).
Creative Commons Zero v1.0 Universal
8 stars 0 forks source link
base256 binary data encoding unicode

Base256 Encoding in Unicode (Base256U)

This repo contains a C++ sample implementation to represent binary data in base256 encoding by using Unicode characters. Typical use cases are safe passwords, digital keys, file checksums, identifiers, hashes and very big numbers.

What is Base256U?

Each byte is represented by exactly one Unicode character and vice versa each Unicode character represents exactly one byte. The mapping of Byte vs Unicode is quite simple:

Byte Unicode Description
0-9 '0'-'9' 10 digits
10-35 'A'-'Z' 26 uppercase letters
36-61 'a'-'z' 26 lowercase letters
62-255 'À', 'Á', 'Â', ... 194 umlaut characters

✔️ Advantages of Base256U

🔧 Installation

Requires cmake and a C++ compiler. Then execute in a terminal window:

> git clone https://github.com/fleschutz/Base256U  # or download und unzip the ZIP file (click the green button)
> cd Base256U
> cmake .
> make
> ./base256

Examples of Base256U

Other Encoding Standards

Base Name Alphabet Example
2 Bit 0 or 1 0101101
8 Octal 0-7 7734124
10 Decimal 0-9 3849834
16 Hexadecimal 0-9,a-f (case insensitive) 7a9ff34
36 Base36 0-9,A-Z 7RT99XQ
45 Base45 0-9,A-Z,space,$,%,*,+,-,.,/,: 8X%/9:A
64 Base64 A-Z,a-z,0-9,+,- zA8r+8q

How long does it take to break a random key or password?

Trying every possible key or password (called a 'brute force attack') at one billion attempts per second:

Key Size Key Example Maximum Time Needed
40-bit ŞŰÀ8Œ about 9 minutes
56-bit ŖÔńĪ7ėñ about a year
128-bit ĤŗwĹĦñŧīijēaqöĜĖŅ about 5,783,128,169,837,158,197,871 years
256-bit ÿőMêŽĖiĘśŃäŞŰÀ8ŒŽĎäPfSŖÔńiĪ7ėëŷò never, for all practical purposes

📧 Feedback

Send your email feedback to: markus.fleschutz [at] gmail.com

🤝 License & Copyright

This open source project is licensed under the CC0 license. All trademarks are the property of their respective owners.