monero.loveA little love for the network.
← All news

Monero / Security / Cryptography

Monero Merges Cryptographic Point-Decoding Correction Ahead of Next Stable Release

Monero merged a correction to its optimized wallet point decoder. The v0.18 backport is open, and the latest stable release still uses the earlier code.

A marked point on a curve beside two paper decoder modules.

Monero merged a correction to its optimized wallet point decoder on December 2, 2026 UTC. A wallet compiled from the updated branch with either AMD64 cryptography backend now rejects two kinds of point encoding that its internal C decoder already rejected. The latest official release, v0.18.5.4, still contains the earlier code. The stable-branch backport remains open. Development merge · Stable backport · Official releases

Developer selsta submitted the change to Monero's fork of SUPERCOP, the library that supplies the optimized routines. After vtnerd approved it, luigi1111 merged it on December 1. The following day, tobtoht merged Monero's pointer update at 16:15 UTC. That second merge determines which copy of the library a fresh build of the development branch will compile. People running an existing Monero wallet still have the decoder their distributor compiled. SUPERCOP #12 · Monero merge commit

What developers changed

The patch changes unpack_vartime in SUPERCOP's shared src/amd64/amd64.c.inc. The decoder unpacks a compressed Edwards25519 point and recovers its coordinates. It now compares the input with a fresh encoding of the decoded field element. It preserves the input's sign bit for this comparison and rejects the input if the bytes differ. This catches a coordinate representation outside the canonical range even when processing those bytes as a field element would yield a usable value. SUPERCOP merge commit

The second check concerns the sign bit. After recovering an x-coordinate, the routine normally chooses between two possible roots using the parity in the input. When x is zero, negating it gives zero again. The revised decoder rejects a parity bit of one when x is zero. Monero's ge_frombytes_vartime in src/crypto/crypto-ops.c already rejects both forms. The AMD64 decoder retains its existing checks that the recovered coordinates lie on the curve. Optimized decoder diff · Monero reference decoder in v0.18.5.4

Paper strips with distinct markings above the same point on a curve.

Why point encodings need one spelling

The coordinates of an Edwards25519 point are x and y. In the 32-byte compressed format, the decoder recovers x from y and a bit that selects the parity of x. Field arithmetic works modulo a prime, so distinct integers can represent the same field element. The encoding rule uses the one integer in the range from zero up to, but excluding, the field prime. For x equal to zero, the only valid parity bit is zero. Edwards25519 encoding and decoding in RFC 8032

A decoder can recover a real curve point from bytes that violate either rule. An input for which no matching point exists fails a different check during decompression. Whether a decoded point meets a protocol's subgroup or other validation requirements is a further question. The SUPERCOP change concerns the bytes allowed to represent a point. It leaves the curve and the wallet's key derivation formula intact.

A wallet developer can compare both decoders on the same input and ask two questions. Do they agree on whether those bytes are acceptable? If both accept them, do they recover the same point? For the cases in this patch, the difference comes at the first question. Comparing only the results from inputs that both routines accept would miss it.

Where Monero uses the optimized decoder

The shared SUPERCOP source calls unpack_vartime from three routines that handle arbitrary-point scalar multiplication, shared-key derivation and subaddress public-key recovery. In tagged Monero source, the wallet wrappers in src/crypto/wallet/crypto.h dispatch the latter two operations to SUPERCOP when selected at build time. Monero's software device in src/device/device_default.cpp calls those wrappers. The dependency also exports the multiplication routine, but neither of these wallet wrappers uses that exported symbol. A search of the tagged Monero tree found no call to it. SUPERCOP AMD64 routines · Wallet wrappers · Software device

The wallet uses shared-key derivation with a transaction public key and view secret while scanning for incoming outputs. Subaddress public-key recovery helps the wallet identify which subaddress an output belongs to. Each wrapper passes the public key to its backend and reports success or failure. The subaddress wrapper first computes a scalar from the output index and derivation. That calculation uses neither the bytes of the public key nor the decoder. An earlier check in a caller could still restrict the inputs that the wrapper sees. The code locates the difference in wallet operations. Its observable effect on transaction scanning remains unverified. Monero wallet scanning source

The wallet build setting is MONERO_WALLET_CRYPTO_LIBRARY. In automatic mode, the dependency looks for an AT&T-syntax assembler and a Unix AMD64 target. If available, it prefers amd64-64-24k. The alternative amd64-51-30k uses the same decoder source. When autodetection fails, the build selects the internal cn backend. Builders can also select cn explicitly. ARM builds using cn already follow the reference checks, and x86-64 binaries can use either backend depending on the build. Wallet build selection · SUPERCOP build detection

The daemon's RingCT verification uses Monero's internal crypto routines. The source trace places those checks on a separate path from the changed AMD64 decoder. The review identified a difference between wallet backends. It supplies no evidence that a node has accepted an invalid transaction, that anyone has spent someone else's funds or that nodes have disagreed on a block. RingCT verification source · SUPERCOP #12 review

Which releases include the earlier decoder?

Monero Love checked the official Git tags for the dependency entry at external/supercop. All 38 tags that contain it, from v0.17.0.0 through v0.18.5.4, pin the same SUPERCOP revision, 633500a. Those source trees contain the earlier decoder. The version range describes a build that selects the optimized library. It cannot tell a wallet owner which backend a distributor selected. The build configuration or the distributor's build record answers that question. First tagged dependency tree · v0.18.5.4 dependency tree · Earlier dependency revision

The development and release branches took different routes to the same proposed library version. In Monero #11821, selsta replaced the development branch's pointer, e887b2f, with 7934c2e. GitHub records approvals from tobtoht, jpk68 and plowsof. In the separate v0.18 backport, commit 2e3c8de proposes moving directly from 633500a to 7934c2e. The backport also contains the certificate build fix described in our OpenSSL 4 release report. The certificate fix changes the network library. Development diff · Backport commit

The AArch64 build timeout and wallet tests

GitHub summarizes the development pull request as 27 of 28 checks passed. Its check-run API for the submitted commit, 80a86b8, records 26 successes, one skipped log-bundling job and one failure. The failed job targeted AArch64 Linux. Guix stopped building its glibc cross-compilation dependency after 3,600 seconds without output. That job ended during toolchain preparation. Pull request checks · AArch64 job

CI also ran on the merge commit itself. Its Ubuntu RPC functional test reported that it could not start a wallet or daemon. The macOS log records a killed unit-test subprocess. Those are separate runs from the pull request's cross-build. The logs leave the cause of those failures open. Ubuntu merge job · macOS merge job

For a local check, Monero Love compiled the corrected SUPERCOP revision on x86-64 Linux with GCC 16.2.1, CMake's Release configuration and the automatically selected amd64-64-24k backend. CTest listed zero tests for the standalone library. We ran all 256 positive shared-key derivation cases from Monero v0.18.5.4's published crypto test vectors through the compiled library. Each returned the expected 32 bytes. This tests a wallet operation on ordinary inputs. Neither the SUPERCOP patch nor Monero's pointer update adds a dedicated regression test for the newly rejected representations. Monero test vectors · SUPERCOP patch

What to watch for in a stable release

Stage Status on December 2, 2026 UTC
SUPERCOP #12 Merged December 1 as 7934c2e
Monero #11821 Merged December 2 as 4e838fb
Monero #11822 Open against release-v0.18, with the pointer update in 2e3c8de
Official stable release v0.18.5.4 still pins 633500a

For an operator following stable releases, the next thing to check is the Git tag behind the official download. Its dependency tree should point to the corrected library or a later revision that includes the change. A merged backport would put the code on the stable branch. A published release would identify what users can download and verify. The upstream reviews checked for this report document the decoder discrepancy and the proposed remedy. They contain no report of exploitation. Official Monero releases · Download verification instructions

Support Monero Love

Help keep the public nodes and packages running. Send any amount of XMR.

Scan with a Monero wallet to donate to Monero Love.89hGTKxRVA3AUeKAbCRBt5TMSzq3MQZooNNsezCpNFjp2oeJPRx8AJeGKA8ziHZNqab78f4Vr1ntxhPDxX5298nnGZjHkhm