For the complete documentation index, see llms.txt. This page is also available as Markdown.

Call Verification Example Utilities

Intro

This project provides utility scripts to generate and verify JWTs (JSON Web Tokens) for blockchain-enabled call verification, similar to the STIR/SHAKEN model. It supports creating key pairs, signing JWTs with private keys, and verifying them with public keys using ES256 (ECDSA P-256 + SHA-256).


How It Works

The caller verification flow includes:

  • Key pair generation (ES256)

  • JWT signing for originating phone numbers

  • JWT verification using public keys

  • Integration with KNS and the Sui blockchain

Requires:

  • Node.js 22+

  • ts-node installed globally (npm install -g ts-node)

  • Project dependencies (npm install)


πŸ› οΈ Scripts Overview

Script
Description

generate-key.ts

Generates ES256 private/public key pair

authorize.ts

Signs a JWT using private key

verify.ts

Verifies a JWT using public key


πŸ” 1. Generate Key Pair

Output:

  • es256-private-key-{timestamp}.pem

  • es256-public-key-{timestamp}.pem


✍️ 2. Sign a JWT

Example:

Output: es256-signed.jwt (JWT file)


βœ… 3. Verify a JWT

Example:

Output:

  • Decoded JWT (header, payload, signature)

  • Verification status


πŸ” Workflow Example


🐍 Python JWT Verification

Setup:

Verify:


πŸ’» .NET JWT Verification

Setup:

Verify:


πŸ”— SUI Blockchain Integration

πŸ“₯ Keystore Registration

Example:


πŸ” Lookup KNS Object ID

Development:

Production:


πŸ”— Map KNS ID to Certificate Registry

Add Entry:

Update Entry:

Remove Entry:

Dump Table:


πŸ”‘ Lookup Public Key for Phone Number

Also supports:

Response:


πŸ” Full JWT Verification Flow

Originating Server:

Terminating Server:

API Call:

Response:


Conclusion

This utility toolkit bridges identity, telecom, and blockchain technologies using JWT-based verification. It's ideal for telcos and platforms implementing secure call validation with the Karrier Number System.

For support or questions, contact support@karrier.one.

πŸ”— Reference

https://github.com/Karrier-One/caller-verification

Last updated