The angelos-project-secrand package is written with the purpose to offer full freedom and insight in entropy and random data generation.
It is written without any external dependencies, except the Kotlin monotonic clock from stdlib, and is designed for any Kotlin/Multiplatform project or compatible use.
The package offers several out of the box random generators:
SecureRandom- a ready to use secure random generator.Uuid- a UUID generator only dependent on the underlyingSecureFeedgenerator, offering raw UUID and UUIDv4.GarbageGarbler- a secure random generator freely reseedable with any given entropy. Requires reseeding every 1 Gb of generated data.
Other utility classes or functions for internal or 3rd party use:
AbstractSponge*- six sponges of 256, 512 and 1024 bits visible state to be used for most cryptographic use, with absorb and squeeze capabilities.JitterEntropy- a jitter based random generator building on the monotonic clock.BenchmarkTester- a utility framework for benchmarking data samples, includes Monte Carlo and Avalanche Effect testers.BitStatistic- a runtime cryptographic health checker, for detecting bias in small samples between 1-32 Kb.
For use in a Kotlin/Multiplatform project, or compatible, publish the library to your own local maven repository.
- Run
./gradlew publishToMavenLocal - Add the dependency
org.angproj.sec:angelos-project-secrand:X.Y.Z - Replace
X.Y.Xwith version number inlibrary/build.gradle.kts
Run ./gradlew clean build allTests for unit tests.
If you have questions, concerns, bug reports, etc, please file an issue in this repository.
If you want to contribute to the project, please read the projects:
We welcome contributions of all kinds, including bug fixes, new features, and documentation improvements. please fork the repository and submit a pull request with your updates.
This project is licensed under the MIT License - see the LICENSE file for details.