npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wasm-kes

v0.1.0

Published

Key Evolving Signature

Downloads

15

Readme

Key Evolving Signatures CI workflow crates.io License

kes-sumed-ed25519 is a pure rust implementation of Key Evolving Signatures, following the paper from "Composition and Efficiency Tradeoffs for Forward-Secure Digital Signatures" by Malkin, Micciancio and Miner. In particular, we implement the "sum" composition, from Section 3.1. As a depth zero signature algorithm we use Ed25519 using the strict verification criteria from ed25519_dalek, which is the same as currently used in libsodium.

This library defines macros to generate KES algorithms with different depths. We currently expose KES algorithms up to depth 7. However, if you require a higher depth key, feel free to open an issue/PR.

Library usage

This library exposes SumXKes for X in [2,7]. A KES algorithm with depth X can evolve the key 2^X. When a secret key is evolved, the old seed is overwritten with zeroes.

use kes_summed_ed25519::kes::Sum6Kes;
use kes_summed_ed25519::traits::{KesSig, KesSk};

fn main() {
    let (mut skey, pkey) = Sum6Kes::keygen(&mut [0u8; 32]);
    let dummy_message = b"tilin";
    let sigma = skey.sign(0, dummy_message);

    assert!(sigma.verify(0, &pkey, dummy_message).is_ok());

    // Key can be updated 63 times                         
    for i in 0..63 {
        assert!(skey.update(i).is_ok());
    }
}                                                          

Compatibility with Cardano

We provide two implementations of KES for compatibility with Cardano's blockchain. Cardano currently uses Sum6Kes. However, that implementation is not optimal in what concerns signature size. Instead, we provide implementation of SumCompact6Kes, which provides an asymptotic halving of the signature size. We provide test vectors generated using Cardano's code to ensure that future changes in the library will not lose compatibility with Cardano. These test vectors can be found in ./tests/data, and the tests can be found in ./tests/interoperability.rs.

Note: secret keys of this crate are not compatible with KES keys as they are used in the cardano node. In this crate we include the period of the KES secret key as part of its structure, while the cardano implementation does not. This decision is motivated by two reasons:

  • It considerably simplifies the API and makes it more intuitive to use. Moreover, the period is a required knowledge to sign/update a skey, and we concluded that a secret key should contain it's period.
  • Secret keys are not send through the wire, meaning that a node using this implementation will not need to be compatible with cardano node's serialisation. However, if for some reason one needs to serialise a cardano node serialised key for usage in this application (or vice-versa), one simply needs to add the period as a 32 bit number represented in 4 big endian bytes (or, vice-versa, remove the last 4 bytes from the serialised signature). An example of such a procedure can be found in the interoperability tests of this crate.

Previous versions of the code

This repo is a copy and modification of kes-mmm-sumed25519. The old repo remains unchanged for historical purposes.

Disclaimer

This crate has not been audited. Use at your own risk.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.