Krypton is a library that implements the cryptographic primitives like ciphers or hash functions into Kotlin Multiplatform. This library uses the system dependency and other external library's for the implementations to reduce the risk of more bugs in the cryptological core. Below this text you can see a list of the implemented algorithms, hash functions and more:
- Hash Functions: SHA3 (224, 256, 384 and 512 bits), SHA (224, 256, 384 and 512 bits) and MD5
- Ciphers: AES (128, 192 and 256 bits) and RSA
- Signatures: RSA (ECSDA is implemented but unstable)
- Key Agreements: Diffie-Hellman (DH) and Elliptic Curve Diffie-Hellman (ECDH)
- Elliptic curves: All curves supported by all platforms together
Below this text you can see the list of backends used on different platforms:
- Native (Linux, Windows, macOS and iOS): OpenSSL (Apache License 2.0) by The OpenSSL Project
- JVM: Java Cryptography Architecture (Oracle Binary Code License) by Oracle and Sun Microsystems and BouncyCastle (MIT License) by Legion of the Bouncy Castle Inc
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
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):
- Keys, Key Generator and Keypair Generator
- Hashing algorithms and digest
- Default curves
- Cipher class for (a)symmetric encryption algorithms
- KeyAgreement class for key agreement algorithms
- Signature class for signature algorithms
- Rewrite supportedBitSize to bitSizePredicate and implement it into the key generators in Algorithm
- Post-quantum algorithms like CRYSTALS-Dilithium (#3)
- Key derivation functions (KDF) like HDKF
- Message Authentication Codes
- Support for dynamic-length hash functions like SHAKE-128
- Add support for key stores
- Custom elliptic curves (#2)
- Deprecated or unsecure ciphers like DES or Triple-DES
This project is licensed with the Apache-2.0 License.
Copyright 2024 Karma Krafts & associates
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.