QUICK START
- Generate a keypair
- Canonicalize your content
- Hash the content
- Sign the hash
- Submit to registry
- Verify attestation
HOW TO SIGN A FILE
Step 1: Canonicalize Content
Normalize your file to a consistent format:
- Remove trailing whitespace
- Normalize line endings (LF)
- Sort if structured data (JSON keys sorted)
Step 2: Hash the Content
$ openssl dgst -sha256 file.txt
> SHA256(file.txt)= 0x...
Step 3: Sign the Hash
$ echo "0x..." | openssl dgst -sha256 -sign private.pem > signature.bin
Step 4: Submit to Registry
POST /pohw/attest
{
"hash": "0x...",
"signature": "<base64>",
"did": "did:pohw:your-did"
}
HOW TO VERIFY A FILE
Step 1: Re-hash the Content
$ openssl dgst -sha256 file.txt
> SHA256(file.txt)= 0x...
Step 2: Fetch Signature
GET /pohw/verify/{hash}
Step 3: Verify Signature
$ openssl dgst -sha256 -verify public.pem -signature signature.bin hash.txt
Step 4: Check Merkle Proof
Verify inclusion in Merkle tree and chain anchors.
API ENDPOINTS
POST /pohw/attest
Submit a new attestation
Body: {hash, signature, did, timestamp}
Response: {receipt_hash, merkle_root}
GET /pohw/verify/{hash}
Verify an attestation
Response: {valid, signer, timestamp, merkle_proof}
GET /pohw/status
Registry node status
Response: {status, latest_root, anchored_at}
GET /pohw/proof/{hash}
Get Merkle proof for hash
Response: {proof, root, anchors}
SDKs FOR JAVASCRIPT/PYTHON/CLI
JavaScript SDK:
npm install @pohw/sdk
import { PoHW } from '@pohw/sdk';
const pohw = new PoHW({registry: 'https://proofofhumanwork.org'});
const receipt = await pohw.attest(content, privateKey);
const verification = await pohw.verify(content);
Python SDK:
pip install pohw-sdk
from pohw import PoHW
pohw = PoHW(registry='https://proofofhumanwork.org')
receipt = pohw.attest(content, private_key)
verification = pohw.verify(content)
CLI Tool:
pohw attest file.txt --key private.pem
pohw verify file.txt
pohw status
VERIFICATION CLIENT INTEGRATION
Integration Pattern:
- User uploads file to your service
- Canonicalize and hash file
- Query registry: GET /pohw/verify/{hash}
- If found, verify signature
- Check Merkle proof and chain anchors
- Display verification status
Example (JavaScript):
async function verifyFile(file) {
const hash = await sha256(file);
const response = await fetch(`https://gdn.sh/pohw/verify/${hash}`);
const data = await response.json();
if (data.valid) {
// Verify signature cryptographically
// Check Merkle proof
// Display verified status
}
}
ZERO-KNOWLEDGE FOOTPRINT
PoHW reveals:
- Content hash (not content itself)
- Signature validity
- Signer DID (not identity)
- Timestamp
- Merkle proof
PoHW does NOT reveal:
- Original content
- Private keys
- Identity information
- Location data
- Metadata beyond protocol needs
HOW TO GENERATE PROCESS DIGESTS
For code/content that changes:
- Capture snapshot at commit/publish time
- Canonicalize entire snapshot
- Hash snapshot
- Sign hash
- Attest snapshot hash
For continuous content:
- Define canonicalization rules
- Hash at intervals
- Chain hashes (hash[i] includes hash[i-1])
- Attest chain root
ATTESTATION FORMAT
Canonical JSON Format (for signing):
{
"hash": "0x361132bb73b257cb8fcb0001d2328005f6b33b6ac5359f2394bc01c7571cc646",
"did": "did:pohw:gdn.sh",
"timestamp": "2025-11-25T00:00:00Z",
"registry": "proofofhumanwork.org",
"protocol": "Proof of Human Work",
"version": "1.0.0"
}
Signature: Ed25519 signature of canonical JSON
Format: Binary or Base64-encoded
REGISTRY NODE OPERATION
Running a Registry Node:
- Setup server with API endpoints
- Initialize Merkle tree state
- Accept attestation submissions
- Batch into Merkle trees
- Anchor roots to chains periodically
- Sync with other registry nodes
- Provide verification endpoints
Requirements:
- Persistent storage for Merkle tree
- Chain integration (Bitcoin, Ethereum, etc.)
- Rate limiting
- CORS configuration
- Public key endpoint
BEST PRACTICES
- Always canonicalize before hashing
- Store private keys securely (HSM recommended)
- Verify signatures before trusting
- Check Merkle proofs and chain anchors
- Use rate limiting to prevent automation
- Preserve privacy—don't leak identity
- Monitor registry node status
- Keep SDKs updated
TROUBLESHOOTING
Signature Verification Fails:
- Check canonicalization matches
- Verify public key matches private key
- Ensure signature format is correct
Attestation Not Found:
- Check hash matches exactly
- Verify registry node is operational
- Check timestamp is within validity window
Merkle Proof Invalid:
- Verify proof path is correct
- Check Merkle root matches chain anchor
- Ensure registry node is synced