Research lab Ink & Switch has released bijou64, a new variable-length integer (varint) encoding. This format is designed to ensure that every integer maps to exactly one byte representation, which helps to eliminate a class of security bugs known as signature-malleability.
Traditional varint encodings, such as LEB128, can represent the same number with multiple valid byte sequences. For example, zero can be encoded as 0x00 or 0x80 0x00. In systems relying on cryptographic signatures, content addressing, or distributed consensus, these redundant encodings create an attack surface. While specifications often require decoders to reject non-canonical inputs, developers frequently omit or optimize these validation checks, leading to vulnerabilities similar to those seen in PKCS#1 v1.5, GnuTLS, and Bitcoin transaction malleability.
Bijou64 prevents alternative encodings at a structural level, making it impossible for a value to have more than one valid byte sequence. This design removes the need for explicit canonicality validation checks, as the format inherently ensures canonicality. The encoding uses direct values for numbers 0-247 and tag bytes (248-255) to indicate the number of subsequent payload bytes, with fixed constant offsets to prevent padding into larger byte tiers.
The design of bijou64 also offers significant performance benefits. Compilers can optimize decoding into a single load and byte swap due to the contiguous big-endian integer payload. Benchmarks show that bijou64 decodes small numbers approximately twice as fast as LEB128 and larger numbers 8 to 10 times faster on x86 and ARM hardware, by avoiding LEB128's bit-masking and branch-heavy continuation bit scans.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Ink & Switch introduced bijou64, a new variable-length integer encoding designed to ensure each number has only one byte representation, eliminating a class of security vulnerabilities. This format also decodes significantly faster than LEB128, addressing issues in protocols like their Subduction sync protocol.