SECURE BY CONSTRUCTION
Most TLS incidents in the field are not broken cryptography - they are configuration mistakes: verification left off, the wrong trust anchor, a certificate accepted for the wrong host. StreamSec Tools is designed so the common mistakes are hard, or impossible, to make by accident. Verification and trust are not options you switch on; they are built into the one code path a certificate can travel.
YOU CANNOT CONNECT WITHOUT VERIFYING
A peer certificate reaches the engine through a single path, and it is accepted only if it validates to a trusted anchor. There is no "verify off" property to forget. A client with no configured trust anchor does not connect insecurely - it fails the handshake with an unknown_ca alert. And a verification failure aborts the handshake there and then; you never receive a finished-but-unverified connection whose result you have to remember to inspect.
The verification hooks work the safe way round, too: with no handler installed the outcome is deny. The events exist only to relax a decision that already failed - so forgetting to handle one refuses the certificate rather than silently accepting it. (In a C library whose verify callback returns "1" for success, a single stray line can turn every error into acceptance.)
THE OS TRUST STORE IS NOT SILENTLY INHERITED
Your trust anchors are an explicit, application-controlled set. StreamSec does not automatically trust whatever roots happen to live in the Windows certificate store, so a root that a corporate MITM proxy or a machine administrator injected there is not trusted by default. Using the Windows store is a deliberate choice, not the fallback. The reverse is just as easy: pin a single certificate, run a private PKI, or refuse a public root you do not want - the trust model is yours.
A NON-CA CERTIFICATE CANNOT SIGN ONE
Path validation enforces the chain rules by default: to act as an issuer, a certificate must be marked as a CA (basicConstraints) and carry the key usage that permits signing, within the path-length and name constraints its issuers set. The old "any valid leaf certificate can be used as an intermediate" confusion does not arise.
SECURE RENEGOTIATION ONLY
Renegotiation is cryptographically bound to the original handshake (RFC 5746), with no switch to allow the legacy, insecure form - so the renegotiation prefix-injection attack (CVE-2009-3555) is refused by design rather than left to configuration.
WHOLE CLASSES OF C VULNERABILITIES DO NOT APPLY
StreamSec Tools is native Object Pascal with no OpenSSL underneath, which removes several bug families by construction rather than by patching:
- No heartbeat extension exists - the code path behind Heartbleed (CVE-2014-0160) is simply not present.
- Length-bounded DER parsing - the ASN.1 decoder checks every offset and length against the buffer before reading, and rejects malformed encodings, avoiding the pointer-arithmetic parser bugs behind a long line of ASN.1 CVEs.
- Public and private keys are different types - signing needs a private key and verifying needs a public key, so mixing them up does not compile; keys are managed objects, not raw exportable blobs.
- No global initialisation or thread-locking callbacks to register - the pre-1.1.0 OpenSSL requirement that crashed applications which got it wrong has no equivalent here.
SECRETS DO NOT LEAK THROUGH TIMING
Cryptography that computes the right answer can still hand over the key, if how long it took - or which memory it touched - depends on the secret. Side-channel resistance is therefore built into the arithmetic itself rather than left to the caller to arrange.
- Elliptic-curve scalar multiplication is blinded and fixed-width. The ladder runs for a number of iterations fixed by the group order rather than by the scalar, so the work done reveals nothing about the secret's length. The scalar is then blinded - a random multiple of the group order is added, which changes the bit pattern on every single operation without changing the result - and the base point is re-randomised in projective coordinates. Converting the result back to affine coordinates uses a fixed-time Fermat inversion rather than a variable-time extended Euclid.
- DSA and ECDSA sign in fixed time, with a deterministic nonce. The fixed-time scheme derives the per-signature nonce from the private key and the message digest as in RFC 6979, so a weak or repeated random draw cannot expose the key the way it has in deployed systems elsewhere. In TLS this is not left to configuration: a key still set to the classic scheme is switched to the fixed-time one before it signs.
- RSA and finite-field exponentiation are fixed-time. Modular exponentiation is a Montgomery routine whose work does not vary with the exponent, and on the CRT path the operands are reduced in fixed time as well. This is the behaviour you get by default.
- AES never indexes a table with a secret. Where the processor provides AES-NI, the hardware instructions do the work. Everywhere else the fallback is a bitsliced constant-time implementation - its key schedule included - instead of the classic lookup tables, which leak key material through the data cache on any processor that shares one.
- GHASH follows the same rule. The authenticator behind AES-GCM uses the carry-less multiply instruction where the CPU has it, and a constant-time software multiply otherwise, with no branch and no memory index depending on key or data. The historical table-driven implementation is cache-timing variable and is no longer selected; it remains only for cross-checking.
- The post-quantum KEM avoids the division leak. ML-KEM's compression step is implemented division-free and constant-time. That is precisely the flaw class published as KyberSlash, where the time taken to divide by a secret-dependent value was enough to recover the shared secret.
- Curve25519, X448 and Ed25519 are implemented with constant-time field arithmetic throughout.
- Authentication tags are compared in constant time. MAC and handshake Finished comparisons do not stop at the first differing byte, so a forgery attempt learns nothing from how quickly it was refused.
Two of these implementations are derived from BearSSL's constant-time primitives; the SBOM names them, and the compile-time switches that would replace them are documented with the reason not to.
SAFE DEFAULTS OUT OF THE BOX
Where behaviour is a default rather than a structural guarantee, the default is the safe one: server-identity (hostname) checking is on, the shipped profile prefers AEAD cipher suites with forward secrecy and disables RC4, anonymous suites and SSL 3.0 / TLS 1.0 / 1.1, TLS compression is off (CRIME) and 0-RTT is off. You get a modern, safe configuration without composing a cipher string.
See also StreamSec vs OpenSSL, or return to the Why StreamSec overview.