Base32-Dnssec
Binary-to-text encodings: hex, Base32, Base58, Base64, Base85 and relatives
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Base32-Dnssec
Base32-Dnssec is one of 25 Base-N encodings variants in the NextSSL registry, a binary-to-text encoding. Its registry entry cites RFC 5155 section 3.3. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
Base-N encodings represent arbitrary binary data using a restricted alphabet of printable characters so it can travel through text-only channels such as email, URLs, JSON or DNS. They are reversible transformations, not encryption, and provide no security or confidentiality.
An encoding groups input bits and maps each group to a symbol. Base16 (hex) maps 4 bits to one of 16 characters. Base32 maps 5 bits, and Base64 maps 6 bits, with '=' padding to complete the last group. Base85 and Ascii85 map 4 bytes to 5 characters for denser output. Base58, used for Bitcoin addresses, treats the whole input as a big integer and removes visually ambiguous characters such as 0, O, I and l; Base58Check adds a SHA-256-based checksum.
NextSSL includes over twenty variants: hex/Base16; Base32 with the RFC 4648 standard, extended-hex, z-base-32, DNSCurve and DNSSEC (RFC 5155) alphabets; Base64 in standard, URL-safe, unpadded, MIME, IMAP modified-UTF-7, bcrypt, crypt(3) and BinHex alphabets; Base58 with Bitcoin, Flickr and Ripple alphabets and Base58Check; Base45 (RFC 9285); Ascii85, Base85 (RFC 1924) and Z85; and basE91.
Different alphabets exist because each target channel forbids different characters: URL-safe Base64 replaces '+' and '/', and Base45 is designed to fit QR-code alphanumeric mode. Variants also differ in padding, line wrapping and case rules, so decoders must be configured for the exact flavour expected. Base64 is the most widely used, while hex is simplest to read.
History
2006–2022Specified in RFC 4648 section 8
Specified in RFC 4648 section 6
Specified in RFC 4648 section 7
Specified in RFC 4648
Specified in RFC 5155 section 3.3
Specified in RFC 9285
Security notes
Encodings provide no security: anyone can decode them. Base58Check's checksum detects typing errors but not deliberate changes. Decoders must reject non-canonical input where uniqueness matters, such as in signatures.
Typical uses
Sizes
The registry declares no fixed sizes for this algorithm.
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
text = root.call("encode_with", "base32-dnssec", None, b"hello")[0]
data = root.call("decode_with", "base32-dnssec", None, text)[0]
nextssl_root_encode_with("base32-dnssec", NULL, data, out);
nextssl_root_decode_with("base32-dnssec", NULL, text, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_encoding_in(reg::all(), Policy::Any, "base32-dnssec", &Params::new())?;
let text = alg.encode(b"hello")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other Base-N encodings variants
24More encodings
All 28Frequently asked questions
What is Base32-Dnssec?
Base32-Dnssec is an encoding in the Base-N encodings family. Base-N encodings represent arbitrary binary data using a restricted alphabet of printable characters so it can travel through text-only channels such as email, URLs, JSON or DNS.
Who designed Base32-Dnssec and when?
Base32-Dnssec belongs to the Base-N encodings family, first published in 2006 by Simon Josefsson (editor). Its origin: RFC 4648 and related specifications.
Which standards define Base32-Dnssec?
Base32-Dnssec is referenced by RFC 5155 section 3.3.
Is Base32-Dnssec safe to use?
Base32-Dnssec is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
What other Base-N encodings variants are there?
NextSSL also registers ascii85, base16, base32, base32-dnscurve, base32hex, base45 and more in the Base-N encodings family.
Related families
Checksummed Base32 address encodings for Bitcoin SegWit and Taproot (BIP-173, BIP-350)
SHA-2The NIST Merkle–Damgård hash family behind most of today's TLS, signatures and software
bcryptThe Blowfish-based adaptive password hash, a long-standing default in web frameworks
Unix crypt formatsClassic modular-crypt password hashes: BSDi DES, md5crypt, sha256crypt and sha512crypt