QCA3 โ Qt Cryptographic Architecture 3
Open-source, provider-based cryptography for Qt 5 and Qt 6 applications.
What is QCA3?
QCA3 (QCA 3.x) is a general-purpose C++ cryptography library based on KDE Qt Cryptographic Architecture (QCA). It is an independently maintained fork with ABI major 3, not an official KDE QCA 3 release. QCA abstracts cryptographic implementations behind a Qt-oriented public API, allowing applications to select and use providers without binding their code to a particular cryptographic library.
Why QCA3?
QCA3 retains QCA2's provider-based Qt/C++ API for cryptographic primitives, keys, certificates, secure memory, TLS, SASL and other security services. The following are extensions and improvements over the upstream QCA 2.x line:
- Secure peer-to-peer transport. Working DTLS in the OpenSSL and Windows Schannel providers, including datagram boundaries and MTU handling, plus DTLS-SRTP (RFC 5764) profile negotiation and key export. These extensions provide the cryptographic transport foundation for WebRTC-style audio/video calls and SCTP data channels, including P2P file transfer.
- Modern authentication. TLS channel binding (including TLS 1.3 exporter binding where supported) and SCRAM-SHA-1/256/384/512 with their channel-binding (+PLUS) variants through Cyrus SASL.
- Native Windows cryptography without OpenSSL. The legacy CryptoAPI-based WinCrypto provider has been rewritten around CNG, Crypt32 and Schannel. It now supports a much wider range of operations, including AES-GCM, RSA, DSA, certificate validation, stream TLS and DTLS. Native-only builds can use Cyrus SASL without linking OpenSSL.
- Expanded cryptographic API. SHA-3 and BLAKE2b hashing, Ed25519 key generation, signing, verification and PEM/DER key I/O in the OpenSSL provider. Qt 6 also gains a QByteArrayView hash-input overload.
- Android system trust. Use Android's system certificate store through the platform TrustManagerFactory rather than relying on a certificate bundle copied from the build host.
- Independent ABI and deployment. Distinct library, header, tool and provider paths and incompatible-plugin rejection before loading allow QCA3 to coexist with QCA2. Ready-to-use SDK archives and selected Linux DEB packages simplify deployment.
- Reliability and security maintenance. Fixes for key-store initialization deadlocks, TLS/DTLS state handling, protected-memory allocation and provider resource lifetime. Continued OpenSSL compatibility work, including OpenSSL 4.x, cross-platform CI and interoperability regression tests.
Current development (not yet in the v3.3.0 release): provider-independent Argon2id password-based key derivation, including a portable fallback; native finite-field DH in the Windows provider; and full Linux ASan/LSan/UBSan and TSan test suites with fixes for detected defects.
DTLS-SRTP exports keying material; SRTP/SRTCP packet protection, ICE and SCTP are outside QCA's scope. Not every provider implements every operation. Query capabilities at runtime and consult the Windows provider audit and native DH limitations.
QCA3 versus QCA2: ABI and migration
QCA 3 uses ABI-major-qualified installation names and can coexist with QCA 2. Applications and providers must be built against the same QCA ABI and Qt major version. QCA 3 is not a drop-in binary replacement for QCA 2. Existing source using QCA's API should be checked and rebuilt.
| Qt 6 integration | QCA 3 name (default suffix) |
|---|---|
| Library / pkg-config | qca3-qt6 |
| CMake package | Qca3-qt6 |
| CMake target | Qca3::Qca |
| Tool | qcatool3-qt6 |
Use QCA3 with CMake
find_package(Qca3-qt6 CONFIG REQUIRED)
target_link_libraries(my_target PRIVATE Qca3::Qca)
Include <QtCrypto> and keep a QCA::Initializer alive while using QCA objects. Install the provider required for your application. For Qt 5 with the default suffix use the Qca3-qt5 package.
Download and install
QCA3 releases provide source code, selected Linux DEB packages and SDK archives for Windows, macOS and Android. Check the release assets for the desired architecture and Qt version. See the installation guide for source builds and provider options.
License and development
QCA is licensed under the GNU Lesser General Public License (license text). QCA was originally developed by Justin Karneges. Contributions and reproducible bug reports are welcome at the QCA3 repository.