#key #security #verify #interact #rekor #cosign #fulcio

sigstore

An experimental crate to interact with sigstore

15 unstable releases (7 breaking)

0.10.0 Sep 11, 2024
0.9.0 Mar 27, 2024
0.8.0 Dec 15, 2023
0.7.2 Jul 7, 2023
0.1.0 Aug 19, 2021

#106 in Cryptography

Download history 239/week @ 2024-08-16 779/week @ 2024-08-23 449/week @ 2024-08-30 1231/week @ 2024-09-06 665/week @ 2024-09-13 1044/week @ 2024-09-20 1066/week @ 2024-09-27 1622/week @ 2024-10-04 1041/week @ 2024-10-11 1278/week @ 2024-10-18 716/week @ 2024-10-25 812/week @ 2024-11-01 562/week @ 2024-11-08 598/week @ 2024-11-15 1228/week @ 2024-11-22 1221/week @ 2024-11-29

3,669 downloads per month
Used in 7 crates (5 directly)

Apache-2.0

560KB
10K SLoC

Continuous integration Docs License Crate version Crate downloads
Continuous integration Docs License: Apache 2.0 Crate version Crate downloads

A crate to interact with sigstore.

This crate is under active development and will not be considered stable until the 1.0 release.

Features

Cosign Sign and Verify

The crate implements the following verification mechanisms:

  • Sign using a cosign key and store the signature in a registry
  • Verify using a given key
  • Verify bundle produced by transparency log (Rekor)
  • Verify signature produced in keyless mode, using Fulcio Web-PKI

Signature annotations and certificate email can be provided at verification time.

Fulcio Integration

For use with Fulcio ephemeral key signing, an OpenID connect API is available, along with a fulcio client implementation.

Rekor Client

All rekor client APIs can be leveraged to interact with the transparency log.

Key Interface

Cryptographic key management with the following key interfaces:

  • Generate a key pair
  • Sign data
  • Verify signature
  • Export public / (encrypted) private key in PEM / DER format
  • Import public / (encrypted) private key in PEM / DER format

Known limitations

  • The crate does not handle verification of attestations yet.

Examples

The examples directory contains demo programs using the library.

Each example can be executed with the cargo run --example <name> command.

For example, openidconnect can be run with the following command:

cargo run --example openidconnect

WebAssembly/WASM support

To embedded this crate in WASM modules, build it using the wasm cargo feature:

cargo build --no-default-features --features wasm --target wasm32-unknown-unknown

NOTE: The wasm32-wasi target architecture is not yet supported.

Contributing

Contributions are welcome! Please see the contributing guidelines for more information.

Security

Should you discover any security issues, please refer to sigstores security process

Dependencies

~24–42MB
~794K SLoC