Skip to content

Commit 15893de

Browse files
committed
remove duplicated types, add license and readme files
1 parent 03735b1 commit 15893de

File tree

23 files changed

+884
-399
lines changed

23 files changed

+884
-399
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ members = [
1818
[workspace.package]
1919
version = "0.1.1"
2020
edition = "2021"
21-
license = "Apache-2.0"
21+
license = "BSD-3-Clause"
2222
repository = "https://github.com/sigstore/sigultimate"
2323
rust-version = "1.70"
2424

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2025, prefix.dev GmbH.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

crates/sigstore-bundle/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# sigstore-bundle
2+
3+
Bundle format handling for [sigstore-rust](https://github.com/sigstore/sigstore-rust).
4+
5+
## Overview
6+
7+
This crate handles Sigstore bundle creation, parsing, and validation. A Sigstore bundle is a self-contained package that includes a signature, verification material (certificates or public keys), and transparency log entries.
8+
9+
## Features
10+
11+
- **Bundle parsing**: Load bundles from JSON (v0.1, v0.2, v0.3 formats)
12+
- **Bundle creation**: Build bundles programmatically with `BundleBuilder`
13+
- **Validation**: Structural validation of bundle contents
14+
- **Version handling**: Support for multiple bundle format versions
15+
- **Media type detection**: Automatic format detection from media type
16+
17+
## Bundle Versions
18+
19+
| Version | Media Type | Notes |
20+
|---------|------------|-------|
21+
| 0.1 | `application/vnd.dev.sigstore.bundle+json;version=0.1` | Legacy format |
22+
| 0.2 | `application/vnd.dev.sigstore.bundle+json;version=0.2` | Added DSSE support |
23+
| 0.3 | `application/vnd.dev.sigstore.bundle.v0.3+json` | Current format |
24+
25+
## Usage
26+
27+
```rust
28+
use sigstore_bundle::{BundleBuilder, ValidationOptions};
29+
use sigstore_types::Bundle;
30+
31+
// Parse a bundle
32+
let bundle: Bundle = serde_json::from_str(bundle_json)?;
33+
34+
// Validate structure
35+
let options = ValidationOptions::default();
36+
sigstore_bundle::validate(&bundle, &options)?;
37+
38+
// Build a bundle
39+
let bundle = BundleBuilder::new()
40+
.certificate_chain(certs)
41+
.signature(signature)
42+
.tlog_entry(entry)
43+
.build()?;
44+
```
45+
46+
## Related Crates
47+
48+
Used by:
49+
50+
- [`sigstore-verify`](../sigstore-verify) - Parses bundles for verification
51+
- [`sigstore-sign`](../sigstore-sign) - Creates bundles after signing
52+
53+
## License
54+
55+
BSD-3-Clause

crates/sigstore-crypto/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# sigstore-crypto
2+
3+
Cryptographic primitives for [sigstore-rust](https://github.com/sigstore/sigstore-rust).
4+
5+
## Overview
6+
7+
This crate provides key generation, signing, and verification functionality using `aws-lc-rs` as the cryptographic backend. It supports the key types and signature algorithms used in the Sigstore ecosystem.
8+
9+
## Features
10+
11+
- **Key generation**: Ed25519, ECDSA P-256, ECDSA P-384
12+
- **Signing and verification**: Multiple signature schemes with automatic algorithm detection
13+
- **Checkpoint verification**: Extension trait for verifying signed tree head signatures
14+
- **Certificate parsing**: X.509 certificate information extraction
15+
- **Keyring**: Key management for multi-key verification scenarios
16+
- **Hash functions**: SHA-256, SHA-384, SHA-512
17+
18+
## Supported Algorithms
19+
20+
| Algorithm | Key Generation | Signing | Verification |
21+
|-----------|---------------|---------|--------------|
22+
| Ed25519 | Yes | Yes | Yes |
23+
| ECDSA P-256 (SHA-256) | Yes | Yes | Yes |
24+
| ECDSA P-384 (SHA-384) | Yes | Yes | Yes |
25+
26+
## Usage
27+
28+
```rust
29+
use sigstore_crypto::{KeyPair, SigningScheme, verify_signature};
30+
31+
// Generate a new key pair
32+
let keypair = KeyPair::generate(SigningScheme::EcdsaP256Sha256)?;
33+
34+
// Sign data
35+
let signature = keypair.sign(b"message")?;
36+
37+
// Verify a signature
38+
verify_signature(
39+
&public_key_der,
40+
message,
41+
&signature,
42+
SigningScheme::EcdsaP256Sha256,
43+
)?;
44+
```
45+
46+
## Related Crates
47+
48+
This crate provides cryptographic operations for:
49+
50+
- [`sigstore-verify`](../sigstore-verify) - Signature verification
51+
- [`sigstore-sign`](../sigstore-sign) - Signature creation
52+
53+
## License
54+
55+
BSD-3-Clause

0 commit comments

Comments
 (0)