Subject
ring 0.17.14 is the foundational cryptography library used by rustls and
much of the Rust TLS ecosystem. It exposes AEAD (AES-GCM,
ChaCha20-Poly1305), digests (SHA-1/2), HMAC, HKDF, PBKDF2, ECDH (P-256,
P-384, X25519), ECDSA, Ed25519, and RSA, plus a SystemRandom RNG. The
public Rust API (aead, agreement, digest, hkdf, hmac, pbkdf2,
rand, rsa, signature, error) is a thin, mostly no_std safe layer
over primitives that are implemented in vendored C and perlasm-generated
assembly derived from BoringSSL. The crate is ~25K lines of Rust over 153
files, with a 1044-line build.rs and a large crypto/, pregenerated/,
include/, and third_party/fiat/ tree of C, headers, and assembly.
Methodology
Tools: openvet 0.6.0, git, diff, ripgrep, python3, the file utility. This
is a scoped audit. I verified supply-chain integrity, read Cargo.toml,
build.rs, and lib.rs in full, read the FFI boundary modules
(aead/{aes,gcm,chacha}/ffi.rs, representative), and surveyed the rest of
src by grep for capability markers (network, filesystem, exec,
environment, concurrency, unsafe, crypto, RNG). The vendored C and assembly
were enumerated and their provenance noted, but not read line by line.
VCS state: vcs/.git is checked out at 2723abbca9e83347d82b056d5b239c6604f786df
(tag 0.17.14), matching .cargo_vcs_info.json (marked dirty, which is the
normal cargo-package marker). diff -rq contents vcs shows the only
content difference is Cargo.toml (cargo normalization); everything else is
either present only in vcs (dev files excluded by the manifest include
list: .github, bench, cavp, doc, mk, test-vector .txt files,
some unused perlasm) or only in contents (pregenerated/, Cargo.lock,
Cargo.toml.orig, .cargo_vcs_info.json). No published source file
diverges from the tracked source.
Scope. The cryptographic correctness and constant-time behaviour of the
BoringSSL-derived C and assembly require dedicated cryptographic review and
were not evaluated. The following claims are therefore left unasserted and
must not be read as either satisfied or violated: !crypto-impl-safe,
!crypto-impl-correct, !unsafe-safe, !unsafe-documented,
!unsafe-minimal, !parser-impl-safe, !algorithm-impl-correct. The 17
pre-assembled object files were identified and their build role traced, but
not disassembled and not regenerated from source, so !binaries-safe and
!binaries-reproducible are also unasserted. This audit covers
supply-chain integrity, the capability surface, build-time execution, the
shape of the Rust/asm FFI boundary, and dependency enumeration.
Results
The published tree is byte-identical to the tagged VCS source apart from
the normalized Cargo.toml and the expected packaging additions, and
contains no obfuscated payloads, embedded base64, telemetry, or suspicious
endpoints; the one long string in src is a test-vector file. The build
script reads only Cargo-provided environment, performs no network access,
and writes only inside OUT_DIR, supporting is-benign, build-exec-safe,
build-exec-no-write-out, build-exec-no-network,
build-exec-deterministic, and build-exec-minimal.
build.rs compiles the vendored C and assembly with cc into static
libraries, which is build-time code execution (has-build-exec); there is no
install-time execution (has-install-exec). The packaged-build path invokes
only the C compiler, while perl and nasm run only on the local
.git-present developer path. The crate ships 17 pre-assembled COFF object
files in pregenerated/ for the Windows x86/x86_64 targets, linked directly
by build.rs on those targets; this is the basis for has-binaries and is
detailed in the single finding (low, quality). The build does not access
the network but it does spawn the C compiler; no exec capability exists at
runtime (uses-exec).
The crate implements cryptographic primitives, so uses-crypto, impl-crypto,
and impl-algorithm hold; the untrusted-based DER/PKCS#8 decoding makes
it a parser implementer (impl-parser). It is not a protocol, interpreter,
JIT, or concurrency-primitive implementer (impl-protocol,
impl-interpreter, impl-jit, impl-concurrency, impl-datastructure). The
Rust surface contains 198 unsafe occurrences and 37 extern "C"
declarations concentrated at the FFI boundary, so uses-unsafe holds; the
annotated aes/ffi.rs boundary shows the consistent marshalling pattern
(length and block-alignment validated in Rust, nonzero block count derived,
Overlapping-bounded pointers passed with a documented SAFETY contract).
SystemRandom plus the default dev_urandom_fallback feature reads
/dev/urandom, so uses-filesystem holds; the once_cell polyfill uses
atomics for one-time initialization, supporting uses-concurrency. No
network or environment access exists in the runtime code
(uses-network, uses-environment), and there is no JIT or interpreter
(uses-jit, uses-interpreter).
Testing: the crate has in-crate #[test] unit tests (has-unit-tests) and
a tests/ directory of integration tests driven by checked-in test-vector
files (has-integration-tests). There is no fuzz/ directory and no
proptest/quickcheck usage in the published crate (has-fuzz-tests,
has-property-tests). Dependencies are few: cc (build), cfg-if,
getrandom, untrusted, and target-gated libc and windows-sys; each is
described in the dependency list.
Conclusion
ring 0.17.14 is a no_std-capable cryptography library whose Rust layer
wraps vendored BoringSSL-derived C and assembly. Supply-chain integrity
checks out: the published source matches the tagged commit, the build script
touches no network and writes only to OUT_DIR, and no malicious patterns
were found. The audit produced one low-severity quality finding noting the
17 pre-assembled Windows object files shipped in pregenerated/. The
cryptographic correctness and constant-time behaviour of the C and assembly,
the soundness of the 198 unsafe blocks beyond the reviewed FFI-boundary
pattern, and byte-equivalence of the prebuilt objects were out of scope and
are explicitly left unasserted.