Skip to content

Commit

Permalink
add CI badge, clean up README
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Huseby <[email protected]>
  • Loading branch information
dhuseby committed Apr 7, 2024
1 parent a0ff8fa commit a4ff8cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Multicid
[![](https://img.shields.io/badge/made%20by-Cryptid%20Technologies-gold.svg?style=flat-square)][CRYPTID]
[![](https://img.shields.io/badge/project-provenance-purple.svg?style=flat-square)][PROVENANCE]
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)][MULTIFORMATS]
![](https://github.com/cryptidtech/multicid/actions/workflows/rust.yml/badge.svg)

[![](https://img.shields.io/badge/made%20by-Cryptid%20Technologies-gold.svg?style=flat-square)][0]
[![](https://img.shields.io/badge/project-provenance-purple.svg?style=flat-square)][1]
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)][2]
# Multicid

A Rust implementation of the [multiformats][2] [content identifier (CID)][3]
and [very long-lived addresses (VLADs)][4] specifications.
A Rust implementation of the [multiformats][MULTIFORMATS] [content identifier (CID)][CID]
and [very long-lived addresses (VLADs)][VLAD] specifications.

## Current Status

This crate supports the full CIDv0 and CIDv1 [specification][3] as used in
IPFS and the VLAD [specification][4] used in provenance log based applications.
This crate supports the full CIDv0 and CIDv1 [specification][CID] as used in
IPFS and the VLAD [specification][VLAD] used in provenance log based applications.
For technical details on either, please refer to their respective
specifications linked above.

Expand All @@ -20,7 +21,7 @@ A VLAD is intended to replace public keys as identifiers in distributed systems
by combinind a random nonce (i.e. number used once) and a CID for a WASM
verification script designed to run in an implementation of the web assembly
cryptographic constructs (WACC) VM. The nonce in the Vlad can be random but in
some use cases the bytes inside the nonce are a [multisig][5] digital signature
some use cases the bytes inside the nonce are a [Multisig][MULTISIG] digital signature
over the CID part of the VLAD. Digital signatures are random enough to serve
the purposes of making the VLAD unique while also cryptographically linking the
VLAD to the key pair used to create the VLAD. This is a critical security
Expand All @@ -38,9 +39,9 @@ both of these properties but are not derived from key material and are
therefore not subject to compromise or rotation. That makes them much more
resilient and stable distributed system links over long spans of time.

[0]: https://cryptid.tech/
[1]: https://github.com/cryptidtech/provenance-specifications/
[2]: https://github.com/multiformats/multiformats
[3]: https://docs.ipfs.tech/concepts/content-addressing/
[4]: https://github.com/cryptidtech/blob/main/specifications/vlad.md
[5]: https://github.com/cryptidtech/multisig
[CRYPTID]: https://cryptid.tech/
[PROVENANCE]: https://github.com/cryptidtech/provenance-specifications/
[MULTIFORMATS]: https://github.com/multiformats/multiformats
[CID]: https://docs.ipfs.tech/concepts/content-addressing/
[VLAD]: https://github.com/cryptidtech/blob/main/specifications/vlad.md
[MULTISIG]: https://github.com/cryptidtech/multisig
3 changes: 2 additions & 1 deletion src/vlad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,14 @@ mod tests {
let vlad = Builder::default()
.with_signing_key(&mk)
.with_cid(&cid)
.with_base_encoding(Base::Base16Lower)
.try_build_encoded()
.unwrap();

// make sure the signature checks out
assert_eq!((), vlad.verify(&mk).unwrap());
let s = vlad.to_string();
//println!("({}) {}", s.len(), s);
println!("({}) {}", s.len(), s);
assert_eq!(vlad, EncodedVlad::try_from(s.as_str()).unwrap());
let vlad = vlad.to_inner();
let v: Vec<u8> = vlad.clone().into();
Expand Down

0 comments on commit a4ff8cd

Please sign in to comment.