SharkSSL™ Embedded SSL/TLS Stack
SharkSSL Features

SharkSSL adds TLS to a C or C++ application while leaving the network interface under your control. Start with the introduction to choose an integration path, then use the API groups below for details.

Choose the parts your product needs

  • Client, server, or both: configure the roles with SHARKSSL_SSL_CLIENT_CODE and SHARKSSL_SSL_SERVER_CODE.
  • TLS 1.2 and TLS 1.3: control protocol inclusion with SHARKSSL_TLS_1_2 and SHARKSSL_TLS_1_3. The negotiated version also depends on the peer.
  • Certificates and trust: install local identity certificates and trusted Certificate Authority (CA) lists. See certificate management for the different purposes.
  • Network integration: use selib for supported socket interfaces or drive the core API from your own transport. The core does not require a real-time operating system.
  • Memory and code size: choose buffer sizes, optional APIs, and algorithm settings for your target. See build configuration.
  • Crypto acceleration: select a processor and toolchain-specific implementation from Ports. Follow its build requirements and validation limits.
  • Session resumption: reuse negotiated session information when the peer and configuration permit it. See session management.

Understanding cipher suites

A cipher suite identifies a combination of algorithms used by TLS. The enabled suites depend on your compile-time settings; the peer must support a compatible choice. Use the definitions in SharkSSL.h and configuration macros as the reference for this source version, rather than treating an old list as a compatibility promise.

In TLS 1.2, a name such as TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 describes key agreement (ECDHE), certificate-based signatures (ECDSA), data encryption (ChaCha20), message authentication (Poly1305), and a hash (SHA-256). These algorithms perform different jobs; the certificate does not encrypt your application messages.

TLS 1.3 names are shorter. For example, TLS_AES_128_GCM_SHA256 names the record-protection algorithm and hash. Key agreement and certificate signature algorithms are negotiated separately. The current header also defines TLS_AES_256_GCM_SHA384 and TLS_CHACHA20_POLY1305_SHA256.