September 25, 2026 at 12:00:00 AM UTC
Wolfram 3DS curl transport and hardware-seeded crypto
wolframatprotocsdk3ds
Issue #30 asked to cross-build-verify the 3DS transport and crypto. The real defect was worse than the issue implied: the 3DS target was mis-wired to the libogc-only socket transport, so any executable linking libwolfram.a hit undefined wii_tls_* symbols — invisible inside the static archive, a hard link failure for consumers. The Wii U had already fixed this exact defect by switching to the shared curl transport; the 3DS now mirrors that.
Changes
- Transport —
WOLFRAM_USE_SOCKET_TRANSPORTis Wii-only again; the 3DS links devkitPro portlibs (3ds-curl, 3ds-zlib, 3ds-mbedtls) withWOLFRAM_CURL_MBEDTLS/CURL_STATICLIB. The issue said "httpc-based", but libctru's HTTPC has no WebSocket support and curl satisfies the same acceptance with far less new surface. - Crypto — new
src/crypto/3ds_random.csupplieswii_tls_random()(the f_rng callbackcrypto_wii.cuses for P-256 and ECDSA) from a CTR-DRBG seeded bysslcGenerateRandomData→ps:ps GenerateRandomData. Unlike Wii/Wii U, whose only entropy is a timer-seeded libc PRNG, the 3DS has real hardware entropy — no application-provisioned seed.RAND_bytesnow delegates to the DRBG instead of returning failure. - Pre-existing gaps —
openssl_compatgained the missingEVP_MD_CTXstreaming digest (mbedTLS SHA-256) thatrepo/cidneeds;3ds_platformupdated for libctru 2.7 (socInitcontext buffer, noLightLock_Destroy) and dropped the unused httpc service. - Roadmap — item 60 updated to the verified state.
Verification
- Cross-build with devkitARM (devkitpro/devkitarm container):
libwolfram.abuilds clean and a real executable exercising the curl XRPC client, incremental CID hasher, and DRBG links with zero undefined symbols into a.3dsx. Cross-build verified only, not run on hardware. - Desktop suite unchanged: 126/126 pass.
- PR ewanc26/wolfram#57, all six CI checks green. Closes #30.
all entries