Timelock is an implemention of timelock encryption using the Boneh Franklin -Idenity Based Encryption scheme. Designed for versatility, it provides support for both Rust and JavaScript. In addition, it is capable of supporting multiple types of randomness beacons, including the Ideal Network and drand.
Timelock is organized into core components and language-specific bindings:
- Core Library: The timelock crate implements the core encryption algorithms and provides support for native Rust applications.
- WASM bindings: The wasm lib provides wasm bindings for the timelock encryption implementation, enabling usage of timelock encryption in JavaScript-based applications in a web-enabled context.
- TypeScript Bindings: The ts library is a TypeScript wrapper to adapt the wasm for easy integration in JavaScript projects.
- Python Bindings: The py library provides Python bindings for timelock encryption.
- C FFI Bindings: The timelock-ffi crate provides C-compatible FFI bindings for integration with C/C++ projects, embedded systems, game engines, and other system software.
Navigate to the core timelock implementation readme for details on building and using it in Rust.
timelock = { git = "https://github.com/ideal-lab5/timelock.git", default-features = false }
Navigate to the typescript bindings readme for more information on integration of @ideallabs/timelock.js
in javascript apps.
npm i @ideallabs/timelock.js
The python bindings are enabled with PyO3 and allow timelock encryption and decryption to be computed in Python.
pip install timelock
The C FFI bindings provide a stable C API for integration with C/C++ projects, embedded systems, game engines, and other system software.
// Use in your C project
#include "timelock.h"
// Link against libtimelock_ffi.a (Unix) or timelock_ffi.lib (Windows)
See the FFI documentation for build instructions and examples.
Contributions are welcome! Feel free to open issues for problems or feature requests while we work on setting up our contributors guidelines.
Apache-2.0