## Formal Verification - Add TLA+ specs for UTXO conservation (formal/tla/UTXOConservation.tla) - Add TLA+ specs for GHOSTDAG ordering (formal/tla/GHOSTDAGOrdering.tla) - Add mathematical proof of DAA convergence (formal/proofs/) - Document Kani verification approach (formal/kani/) ## Bug Bounty Program - Add SECURITY.md with vulnerability disclosure process - Add docs/BUG_BOUNTY.md with $500-$100,000 reward tiers - Define scope, rules, and response SLA ## Web Wallet Dilithium3 WASM Integration - Build WASM module via Docker (498KB optimized) - Add wasm-crypto.ts lazy loader for Dilithium3 - Add createHybridSignatureLocal() for full client-side signing - Add createHybridSignatureSmart() for auto-mode selection - Add Dockerfile.wasm and build scripts ## Security Review ($0 Approach) - Add .github/workflows/security.yml CI workflow - Add deny.toml for cargo-deny license/security checks - Add Dockerfile.security for audit container - Add scripts/security-audit.sh for local audits - Configure cargo-audit, cargo-deny, cargo-geiger, gitleaks
38 lines
1.2 KiB
Bash
Executable file
38 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Build synor-crypto-wasm WASM module using Docker
|
|
# This script builds the WASM module and copies it to the web wallet
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
|
|
cd "$PROJECT_ROOT"
|
|
|
|
echo "=========================================="
|
|
echo "Building synor-crypto-wasm WASM module"
|
|
echo "=========================================="
|
|
|
|
# Build the WASM Docker image
|
|
echo "Step 1: Building Docker image..."
|
|
docker build -f Dockerfile.wasm -t synor-wasm-builder .
|
|
|
|
# Copy WASM artifacts to web wallet
|
|
echo "Step 2: Copying WASM artifacts..."
|
|
docker run --rm \
|
|
-v "$PROJECT_ROOT/apps/web/src/wasm:/dest" \
|
|
synor-wasm-builder \
|
|
sh -c 'cp -r /wasm-output/pkg/* /dest/'
|
|
|
|
echo "=========================================="
|
|
echo "WASM build complete!"
|
|
echo "=========================================="
|
|
echo ""
|
|
echo "Files copied to: apps/web/src/wasm/"
|
|
ls -la "$PROJECT_ROOT/apps/web/src/wasm/"
|
|
echo ""
|
|
echo "The web wallet can now use client-side Dilithium3 signatures."
|
|
echo ""
|
|
echo "Usage in TypeScript:"
|
|
echo " import { createHybridSignatureLocal } from './lib/crypto';"
|
|
echo " const signature = await createHybridSignatureLocal(message, seed);"
|