bearssl

BearSSL is Thomas Pornin’s full TLS 1.0-1.2 stack in portable C99: no malloc, no asm, no external deps. The vendored set under demos/bearssl/ is a curated subset (hash + MAC + KDF primitives plus the codec / int helpers they pull in); the full upstream tree carries ~300 .c files including AES hardware-accelerated variants (aes_x86ni, aes_pwr8), the TLS record-layer state machines, and an X.509 minimal validator.

Pinned at upstream’s 0.6 release. Pulled through the badc vendor-deps mirror – see setup.py.

Smoke scenarios

smoke.py builds the focused BearSSL set + a hand-written driver through badc in four flavours (amalgamation

Scenario What it asserts
SHA-256("abc") FIPS 180-2 / RFC 4634 vector: digest matches the published 32-byte answer.
SHA-224("abc") FIPS 180-2 vector: 28-byte digest matches the published answer.
HMAC-SHA-256 (RFC 4231) Test case 1: 20-byte key (0x0b * 20), message "Hi There", 32-byte MAC matches the published value.
HKDF-SHA-256 (RFC 5869) Test case 1: 42-byte OKM derived from the published IKM / salt / info matches the reference bit-for-bit.

Already-closed gaps that the BearSSL bringup surfaced:

Layout

^ To the top