The Cardano Message Verification Tool is a web application that allows users to verify the authenticity of messages signed on Cardano. It supports multiple verification standards:
- CIP-0008: A standard for signing and verifying arbitrary message data
- CIP-0030: A standard for dApp-wallet web bridge that includes message signing capabilities
- CIP-0100: A standard for governance metadata with comprehensive author verification
- Example Data: Load pre-configured examples to understand expected formats
- Result Sharing: Ability to share verification results via URLs (planned for future release)
- Enhanced Rate Limiting: Consider distributed rate limiting for multi-instance deployments
- Frontend: React components for user interaction with gradient backgrounds and responsive design
- API Routes: Server-side verification logic endpoints
- Utility Functions: Shared helper functions for verification across different standards
- Data Examples: Sample verification data for testing and demonstration
┌─────────────────────────────────────────────────────────┐
│ Next.js App │
│ │
│ ┌─────────────────────────────────────────────┐ │
│ │ Frontend UI │ │
│ │ (Forms, Results Display) │ │
│ └────────────────────┬────────────────────────┘ │
│ │ │
│ ┌────────────────────▼────────────────────────┐ │
│ │ API Route Layer │ │
│ │ ┌──────────────────────────────┐ │ │
│ │ │ Security Middleware │ │ │
│ │ │ • Rate Limiting │ │ │
│ │ │ • SSRF Protection │ │ │
│ │ │ • Input Validation │ │ │
│ │ └──────────┬───────────────────┘ │ │
│ │ │ │ │
│ │ ┌──────────▼───────────────────┐ │ │
│ │ │ Verification Logic │ │ │
│ │ │ (CIP-8, CIP-30, CIP-100) │ │ │
│ │ └───────────────────────────────┘ │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
├── app/ # Next.js App Router structure
│ ├── api/ # Backend API routes with security
│ │ ├── verify/ # CIP-8/30 verification endpoint
│ │ │ └── route.ts # API handler for CIP-8/30 verification
│ │ └── verify-cip100/ # CIP-100 verification endpoint
│ │ └── route.js # Secured API handler with SSRF protection
│ ├── cip100/ # CIP-100 verification page
│ ├── method=cip100/ # Alternative CIP-100 route
│ │ └── page.js # CIP-100 verification UI
│ ├── disclaimer/ # Legal disclaimer page
│ │ └── page.js # Disclaimer content
│ ├── components/ # Reusable React components
│ │ ├── Navigation.js # Site navigation
│ │ └── ... # Other UI components
│ ├── not-found.js # Custom 404 page
│ └── page.js # Main CIP-8/30 verification page
├── data/ # Sample data for examples
│ ├── cip0008example.json # Example of CIP-0008 format
│ ├── cip0030example.json # Example of CIP-0030 format
│ └── cip0100example.js # Example of CIP-0100 format (JS export)
├── components/ # Shared components
├── lib/ # Utility functions and security
│ ├── cip100-verification.js # CIP-100 specific verification logic
│ ├── rate-limiter.js # In-memory rate limiting
│ └── security.js # IP validation and complexity checks
├── public/ # Static assets
└── styles/ # CSS and styling files
-
app/page.js: The main CIP-8/30 verification page with form and results display. Features gradient background and example loading. -
app/method=cip100/page.js: Dedicated CIP-100 governance metadata verification page with specialized form fields and validation. -
app/disclaimer/page.js: Legal disclaimer page with navigation and consistent styling. -
app/not-found.js: Custom 404 error page with navigation and branding. -
components/Navigation.js: Site navigation component used across all pages.
-
app/api/verify/route.ts: API endpoint for CIP-8/30 verification that processes requests and returns verification results. -
app/api/verify-cip100/route.js: Secured API endpoint for CIP-100 governance metadata verification with:- URL-based metadata fetching (GET
?url=<metadata-url>) - Direct JSON submission (POST with
{ metadata: {...} }) - Complete SSRF protection and rate limiting
- Author witness validation
- URL-based metadata fetching (GET
-
lib/rate-limiter.js: In-memory rate limiting (20 requests/minute per IP) with automatic cleanup. -
lib/security.js: Security utilities including:isPrivateIp(): IPv4/IPv6 validation against private/loopback/link-local rangescheckJsonComplexity(): Prevents compute bombs via depth and key count limits
-
lib/utils.js: Contains utility functions for CIP-8/30 verification standards, including core cryptographic operations. -
lib/cip100-verification.js: Specialized verification logic for CIP-100 governance metadata with JSON-LD context validation and witness verification.
-
data/cip0008example.json: Contains example data for CIP-0008 verification, showing the expected format for message, signature, and address. -
data/cip0030example.json: Contains example data for CIP-0030 verification, demonstrating the format used when verifying messages signed via wallet interfaces. -
data/cip0100example.js: Contains comprehensive example data for CIP-0100 governance metadata as a JavaScript export, including full treasury withdrawal proposal with multiple author witnesses.
The CIP-0008 verification process follows these steps:
-
The frontend collects:
- The message that was signed
- The signature
- The address that allegedly signed the message
-
This data is sent to the API endpoint (
/api/verify) -
The API route:
- Validates input
- Executes cryptographic verification using Cardano-specific algorithms
- Returns the verification result (valid/invalid)
-
The result is displayed to the user
The CIP-0008 standard is specifically designed for signing and verifying arbitrary message data on Cardano, with a standardized format for representing signatures.
CIP-0030 verification handles messages signed directly via wallet interfaces:
-
The frontend collects:
- The address
- The message payload
- The signature
- Optional metadata from the wallet
-
The API processes this data differently from CIP-0008:
- It handles additional wallet-specific formats
- Utilizes wallet-specific verification methods
- Accounts for different signature encodings
-
The verification result is returned to the user
CIP-0030 is part of the broader dApp-wallet web bridge specification, enabling web applications to interact with Cardano wallets.
CIP-0100 verification handles governance metadata with comprehensive validation and security:
1. URL-based (GET) - Recommended for public metadata:
GET /api/verify-cip100?url=<metadata-url>- Fetches metadata from GitHub, IPFS, or any public URL
- Validates URL and performs DNS lookup to prevent SSRF
- 10-second timeout for fetching
- 5MB size limit
- Content-type validation
2. Direct JSON (POST) - For local or private metadata:
POST /api/verify-cip100
Content-Type: application/json
{
"metadata": { ... }
}- Direct submission of governance metadata
- 5MB request body limit
- JSON complexity validation
- Rate Limiting: 20 requests/minute per IP
- URL Validation:
- HTTPS-only in production
- DNS rebinding protection
- Blocks private IPs (10.x, 192.168.x, 172.16-31.x)
- Blocks IPv6 private ranges (fe80::/10, fc00::/7)
- Blocks cloud metadata endpoints
- Content Protection:
- 5MB size limit
- 10-second timeout
- Redirect blocking
- JSON complexity validation (max depth: 20, max keys: 1000)
-
The API performs security validation:
- Rate limit check
- URL/IP validation (for GET requests)
- Size and complexity checks
-
Multi-layer verification:
- JSON-LD context validation
- Schema compliance checking
- Author witness cryptographic verification
- Hash algorithm validation (Blake2b-256, SHA-256)
-
Detailed results show:
- Overall verification status
- Individual author verification results
- Schema validation results
- Hash verification status
CIP-0100 is designed for Cardano governance proposals, treasury withdrawals, and other governance-related metadata with strong authentication requirements.
- Node.js (version 20.x or later recommended)
- npm or yarn
-
Clone the repository:
git clone https://github.com/cardano-foundation/verify-cardano-message-fe.git cd cardano-signer-verification -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Access the application at
http://localhost:3000
- Main Verification:
http://localhost:3000- CIP-8/30 verification - CIP-100 Verification:
http://localhost:3000/method=cip100- Governance metadata verification - Disclaimer:
http://localhost:3000/disclaimer- Legal information
GET /api/verify?publicKey=<hex>&message=<text>&signature=<hex>GET /api/verify-cip100?url=<metadata-url>
# Example
curl "http://localhost:3000/api/verify-cip100?url=https://ipfs.io/ipfs/bafkreihk5qt5tgbojnno7eymbm2urm6y6jkt4yqfxdzh3agnj47zuv7lpe"POST /api/verify-cip100
Content-Type: application/json
{
"metadata": {
"@context": { ... },
"hashAlgorithm": "blake2b-256",
"body": { ... },
"authors": [ ... ]
}
}Rate Limits: All endpoints are rate-limited to 20 requests per minute per IP address.
To build the application for production:
npm run build
npm start- Multi-Standard Support: CIP-8, CIP-30, and CIP-100 verification
- Real-time Validation: Instant feedback on form inputs
- Example Loading: Pre-configured examples for each standard
- Detailed Results: Comprehensive verification status and error reporting
- Responsive Design: Works on desktop and mobile devices
- Gradient Backgrounds: Modern, consistent visual design
- Navigation: Easy switching between verification types
- Error Handling: Clear error messages and guidance
- Clipboard Integration: Copy verification results for easy sharing
- URL-based Verification: Fetch and verify metadata from any public URL
- Multi-format Support: Handles various content types and encodings
We welcome contributions to improve the Cardano Message Verification Tool. Here's how you can contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests to ensure security features still work
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.