Skip to content

A modular and extensible Kotlin library suite for PKI, Cryptography and Keystores

License

Notifications You must be signed in to change notification settings

trusted-kotlin/Krypton

Repository files navigation

Krypton Cryptography Suite

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

Credits

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.

Dependencies

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):

Name Author License
Kotest Kotest Apache License 2.0
bouncycastle-java Legion of the Bouncycastle Inc. MIT License
dokka Kotlin Apache License 2.0
OpenSSL The OpenSSL Project Apache License 2.0
kotlinx.serialization Kotlin Apache License 2.0
gradle-download-task Michel Krämer Apache License 2.0
kotlinx-io Kotlin Apache License 2.0
kotlinx-datetime Kotlin Apache License 2.0
bignum Ugljesa Jovanovic Apache License 2.0

License

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.