Skip to content

feat: add prepare-input CLI#2

Open
hyperfinitism wants to merge 1 commit intotiktok-privacy-innovation:mainfrom
hyperfinitism:feature/prepare-input
Open

feat: add prepare-input CLI#2
hyperfinitism wants to merge 1 commit intotiktok-privacy-innovation:mainfrom
hyperfinitism:feature/prepare-input

Conversation

@hyperfinitism
Copy link
Copy Markdown

This PR adds a small CLI utility prepare-input to create the input JSON from SNP report (raw bin) and VCEK cert (PEM) used by the attestation flow.

What's changed

  • Add /utils/prepare-input/*
  • Update /Cargo.toml and /Cargo.lock
  • Update /README.md

Usage

# short form
prepare-input -r report.bin -v vcek.pem -o input.json

# long form
prepare-input --report report.bin --vcek vcek.pem --out input.json

Test

Tested on Windows 11 (x86_64). This tool should also work on Linux/macOS with AArch64/x86_64.

# Build
git clone https://github.com/hyperfinitism/trustless-attestation-verification-risczero -b feature/prepare-input
cd trustless-attestation-verification-risczero
cargo build -r -p prepare-input

# Download sample input from main project repository
wget -O report.bin https://raw.githubusercontent.com/tiktok-privacy-innovation/trustless-attestation-verification/cb4f0eea5c4ec7fffaa2d0e1c1b557967a3a12cf/samples/report.bin
wget -O vcek.pem  https://raw.githubusercontent.com/tiktok-privacy-innovation/trustless-attestation-verification/cb4f0eea5c4ec7fffaa2d0e1c1b557967a3a12cf/samples/vcek.pem

# Run (Linux/macOS)
./target/release/prepare-input -r report.bin -v vcek.pem -o input.json

# Run (Windows)
./target/release/prepare-input.exe -r report.bin -v vcek.pem -o input.json

Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant