A Java library that implements a ByteChannel interface over SSLEngine, providing a socket-like API for TLS.
TLS Channel is a Java library that implements a ByteChannel interface over SSLEngine, providing a simple, socket-like API for TLS connections. It solves the problem of Java's complex and low-level SSLEngine API by offering a streaming interface that makes encryption an implementation detail, similar to how OpenSSL works for C.
Java developers who need direct socket-like access to TLS connections without relying on larger I/O frameworks like Netty or dealing with the complexity of SSLEngine directly.
Developers choose TLS Channel because it provides a minimal, dependency-free library that offers a familiar streaming API for TLS, supports both blocking and non-blocking modes, and includes security features like automatic zeroing and opportunistic buffer release, all while leveraging the standard Java cryptographic implementation.
A Java library that implements a ByteChannel interface over SSLEngine, enabling easy-to-use (socket-like) TLS for Java applications.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements ByteChannel, GatheringByteChannel, and ScatteringByteChannel interfaces, making TLS usage identical to standard socket programming and hiding SSLEngine complexity, as emphasized in the README.
Includes automatic zeroing of plaintext buffers after use and opportunistic buffer release, reducing memory footprint and mitigating vulnerabilities like heartbleed, inspired by Google's boringssl.
Supports blocking, non-blocking, and asynchronous operations with full-duplex communication, allowing developers to choose the model that fits their application without switching libraries.
Has zero dependencies and a jar size under 65 KiB, making it lightweight and easy to integrate into projects without bloating the codebase or introducing framework lock-in.
Delegates all cryptographic operations to Java's SSLEngine, inheriting its potential performance issues, convoluted configuration, and lack of certain TLS extensions, which the library cannot bypass.
Uses exceptions (NeedsReadException, NeedsWriteException) to signal blocking conditions in non-blocking mode, which deviates from standard ByteChannel semantics and can make error handling more verbose and error-prone.
Requires developers to set up SSLContext and SSLEngine instances manually, including certificate management and protocol tuning, which adds complexity despite the simplified API layer.