Krypton is a modular and extensible library suite for cryptography in Kotlin/Multiplatform with support for Linux, Windows, macOS, Android and iOS based on more-tested libraries in the backend like OpenSSL or the JCA. Below this text you can see a list of the modules of Krypton:
- krypton-core: Core components of the Krypton library (Algorithm interface etc.)
- krypton-asn1: Cross-platform ASN.1 binary format parser with support for
kotlinx.serialization
- krypton-keystore: Implementation of Native keystores with support for parsing Java Keystores on different platforms
- krypton-openssl: Windows, Linux, macOS and iOS bindings for OpenSSL (Apache License 2.0)
- krypton-x509: Implementation of APIs for working with X.509 certificates and other PKI data (Certificate Signing Requests, certificates etc.)
The default implementation of Krypton supports different algorithms. Below this text you can see a list of the by-default implemented algorithms:
- Cryptographic hash functions: SHA3 (224, 256, 384 and 512 bits), SHA (224, 256, 384 and 512 bits) and MD5
- Symmetric encryption algorithms: AES, DES and Triple-DES
- Asymmetric encryption algorithms: RSA
- Key Agreements: Diffie-Hellman (DH) and Elliptic Curve Diffie-Hellman (ECDH)
- Signature algorithms: RSA and ECDSA
Some parts of this project are based on the work of other great people. In this part of the README I want to thank them and show a list of my inspirations etc.
- trixnity-openssl-binaries - The OpenSSL binaries are acquired by the publications of this repository
- trixnity-crypto-core - The integration of OpenSSL over multiple targets is heavily inspired that builscript code
- A Layman's Guide to a Subset of ASN.1, BER, and DER - Used for the implementation of the ASN.1 parser
- IBM's Object identifiers documentation for the extraction of the OIDs (Object Identifiers) for certificates etc.
Also, a few dependencies are needed to make this project work. Below this text you can see a list of these project with author and license (by the time the dependency was added):
This project is licensed with the Apache-2.0 License.
Copyright 2025 Cedric Hammes
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.