The Key Event Receipt Infrastructure (KERI) is a system designed to provide a secure identity basis using cryptographic key management, rotation and verification.
This repository contains a Rust implementation of KERI, designed to be used as a C-callable library. The implementation follows the KERI Protocol Specification.
KERI provides a secure foundation for decentralized identity management. Unlike traditional Public Key Infrastructure (PKI), which relies on centralized certificate authorities, KERI enables secure key rotation without the need for a central authority.
From a reliability engineering perspective, KERI solves key management problems in a portable, interoperable, and secure manner.
Features of this implementation:
- C-compatible library interface for cross-language integration
- Designed after the KERIpy class structure and naming convention (using Rust idioms where appropriate)
- Minimalist approach with few dependencies
- High performance and memory efficiency
- Cross-platform support
- Rust 1.85 or later
- Cargo
git clone https://github.com/healthKERI/libkeri.git
cd libkeri
cargo build --release[dependencies]
libkeri = { git = "https://github.com/healthKERI/libkeri.git" }This implementation is designed as a C-callable library, allowing integration with applications written in C, C++, and other languages that support the C ABI. The library exposes a set of functions that can be called from C code to interact with KERI functionality.
#include "libkeri.h"
int main() {
// Initialize KERI context
KERI_Context* ctx = keri_init();
// Generate a new identifier
const char* identifier = keri_generate_identifier(ctx);
// Clean up
keri_free_context(ctx);
return 0;
}More detailed examples and usage patterns are being developed. Please refer to the test files in the source code for current usage examples.
Generate and view the API documentation with:
cargo doc --openThis project is under active development. Not all features of the KERI protocol specification have been implemented yet.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.