Skip to main content

vgi_core/
lib.rs

1//! Shared primitives for Verifiable Git Infrastructure (VGI).
2//!
3//! Pure, dependency-light building blocks that both the signer
4//! (`did-git-sign`) and the CI verifier (`verify-trust`) rely on, kept in one
5//! crate so their wire formats cannot drift:
6//!
7//! - the PROTOCOL.sshsig encoder ([`create_ssh_signature`]) and the git
8//!   sshsig namespace ([`GIT_SSHSIG_NAMESPACE`]),
9//! - git commit-object handling ([`split_signed_commit`],
10//!   [`normalize_sshsig_armor`], [`committer_did`]),
11//! - DID-document Ed25519 key extraction ([`ed25519_keys_from_doc`]),
12//! - the forge-qualified resource grammar ([`normalize_resource`],
13//!   [`resource_contains`]) that the verifier, the VTC projection and the
14//!   forge adapters must all agree on byte for byte.
15//!
16//! Nothing here touches the network, a keyring, or a VTA — that is what lets
17//! the CI verifier stay a small, fast dependency.
18
19mod commit;
20mod did;
21pub mod resource;
22mod sshsig;
23
24pub use commit::{
25    committer_did, committer_identity, conflicting_signer_dids, normalize_sshsig_armor, signer_did,
26    split_signed_commit,
27};
28pub use did::{ED25519_MULTICODEC_PREFIX, ed25519_keys_from_doc};
29pub use resource::{
30    ResourceError, ResourceErrorKind, normalize_resource, normalize_resource_with_depth,
31    resource_contains,
32};
33pub use sshsig::{GIT_SSHSIG_NAMESPACE, create_ssh_signature};