Kassaforte


v1.0.0
Kassaforte enables secure storage of sensitive data in Compose Multiplatform applications and on the backend by
leveraging
each platform’s native security APIs. It further supports the generation and usage of symmetric and asymmetric keys
to
ensure data protection
Architecture
Secure storage
Services
Symmetric
AES
Algorithm used to encrypt and decrypt data the following block modes:
CBC - Cipher Block Chaining where each block of plaintext is XORed with the previous ciphertext block before
being encrypted. Requires an initialization vector (IV) of the block size
HMAC
Algorithm used to sign and verify messages with the following digests:
SHA1
SHA256
SHA384
SHA512
Android
The keys are generated with the KeyGenerator
API
and securely stored inside the Keystore provided by
Android.
The keys are used by the Cipher to encrypt or decrypt the
data
Apple
The keys are generated with
the SecRandomCopyBytes
API and securely stored inside the Keychain
provided
by iOS and macOS operating systems.
The keys are used by korlibs-crypto library to encrypt or decrypt the data
JVM
Like on Android the keys are generated with
the KeyGenerator API, but
the keys are securely stored using the java-keyring library.
The keys are used by the Cipher to encrypt or
decrypt the data
Web
The keys are generated with the SubtleCrypto API and
securely stored into application's IndexedDB.
The keys are used by the SubtleCrypto to encrypt or decrypt the data
Asymmetric
The supported asymmetric algorithms to generate and then use the keys are the following:
RSA asymmetric encryption algorithm based on the hardness of factoring large integers. Are supported two padding
modes:
PKCS#1 RSA signature scheme with PKCS#1 v1.5 padding (on the web just signing and verifying only)
RSA_OAEP RSA encryption using OAEP padding
- symmetric algorithm based on elliptic curve cryptography (ECC),
commonly used for digital signatures (ECDSA) and key exchange (ECDH, unsupported at the moment)
Android
The keys are generated with
the KeyPairGenerator API
and securely stored inside the Keystore provided by
Android.
The keys are used by the Cipher to encrypt or decrypt the
data
Apple
The keys are generated with
the SecKeyCreateRandomKey
API and securely stored inside the Keychain
provided
by iOS and macOS operating systems.
The keys are used by security methods provided by Apple to encrypt or decrypt the data
JVM
Like on Android the keys are generated with
the KeyPairGenerator API, but
the keys are securely stored using the java-keyring library.
The keys are used by the Cipher to encrypt or
decrypt the data
Web
The keys are generated with the SubtleCrypto API and
securely stored into application's IndexedDB.
The keys are used by the SubtleCrypto to encrypt or decrypt the data
Implementation
Gradle short
dependencies {
implementation 'io.github.n7ghtm4r3:kassaforte:1.0.0'
}
Gradle (Kotlin)
dependencies {
implementation("io.github.n7ghtm4r3:kassaforte:1.0.0")
}
Gradle (version catalog)
libs.versions.toml
[versions]
kassaforte = "1.0.0"
[libraries]
kassaforte = { module = "io.github.n7ghtm4r3:kassaforte", version.ref = "kassaforte" }
build.gradle.kts
dependencies {
implementation(libs.kassaforte)
}
Usage
Kassaforte
Sync methods
@Composable
fun App() {
val kassaforte = Kassaforte(
name = "YourApplicationName"
)
kassaforte.safeguard(
key = ,
=
)
kassaforte.refresh(
key = ,
=
)
kassaforte.remove(
key =
)
}
Async methods
The following methods required to be executed inside a Coroutine
@Composable
fun App() {
val scope = MainScope()
scope.launch {
val safeguardedData: String = kassaforte.withdraw(
key = "keyToRepresentData"
)
println(safeguardedData)
}
}
Services
Using the services you can generate and then use symmetric and asymmetric keys
Symmetric
Asymmetric
Documentation
Check out the library documentation for more information on how to generate
and
use keys, as well as how to correctly use the Kassaforte API.
Credits
A big thanks to the repositories and their maintainers for developing the libraries that Kassaforte relies on to
work correctly:
- java-keyring - handles the secure storage on the
JVM target
- windpapi4j - handles (DPAPI) data protection on
Windows to
securely store the generated keys on the JVM target
Support
If you need help using the library or encounter any problems or bugs, please contact us via the
following links:
- Support via email
- Support via GitHub
Thank you for your help!
Donations
If you want support project and developer
If you want support project and developer
with PayPal
Copyright © 2026 Tecknobit