惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
B
Blog
GbyAI
GbyAI
P
Proofpoint News Feed
量子位
The Register - Security
The Register - Security
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
B
Blog RSS Feed
WordPress大学
WordPress大学
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
O
OpenAI News
月光博客
月光博客
H
Hacker News: Front Page
S
Security Affairs
W
WeLiveSecurity
The Hacker News
The Hacker News
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
What Is Inside a Keylight Lease: The Ed25519 Format Explained
Nico · 2026-06-27 · via DEV Community

Originally published on the Keylight blog.

Most license systems answer "is this key valid?" by asking a server. Keylight answers it with math, locally, in milliseconds — because the license itself is a signed document your app can verify without a network call. Understanding what is inside that document, and why the signature protects it, is the fastest way to understand how Keylight's security model holds together.

Why signed leases beat opaque license strings + database lookups

The classic licensing approach is a lookup: the customer enters a key, your server checks it against a database, and the server says yes or no. An opaque license string — just a token or a checksum-passing sequence — means nothing by itself. The string carries no self-describing information; the app has to phone home to learn what it is allowed to do.

A signed lease flips the model. The lease is a self-describing document: it encodes who the customer is, which product they purchased, which features they have, and when the license expires. The Ed25519 signature over the document is proof that Keylight's server minted it for exactly those values. Your app ships with the public key baked into the binary and verifies the signature locally — no server call, no round-trip, no database to query or spoof.

The customer holds the document, but they cannot change what it says. The validity no longer lives in whether a server recognizes a token; it lives in a signature only Keylight's private key can produce. This is why the lease works offline, survives network outages, and still enforces your commercial limits correctly. For a broader introduction to why this model replaced opaque license strings, see how license keys work for desktop apps.

The lease payload, field by field

The canonical lease the SDK exposes after verification looks like this:

{
  "id": "lk_01hx9z4bqncktjvx6a2r3p8wy",
  "customerId": "cus_Qk3mN9vTpLx2Zr",
  "productId": "prod_macos_pro",
  "activationLimit": 3,
  "activationCount": 1,
  "features": ["pro", "export"],
  "issuedAt": "2026-05-15T09:12:00Z",
  "expiresAt": null,
  "revoked": false,
  "sig": "MEUCIQDkP3...base64url...=="
}

Every field carries specific meaning that the SDK reads and enforces:

id — a unique, immutable lease identifier. This is what Keylight uses to look up the lease server-side during revalidation. It never changes after issuance.

customerId — the Keylight customer record this lease was issued to, set at mint time from the Stripe payment. Ties the lease to a specific purchase.

productId — which product and tier this lease covers. If you have multiple products or multiple plans, the SDK reads this to know which entitlement bucket applies.

activationLimit — the maximum number of concurrent device activations. A standard license might allow 3; an enterprise tier might allow unlimited (represented as a very high number). This value is set at issuance based on the product tier purchased.

activationCount — the current number of active devices as of the last server sync. Keylight tracks this server-side and updates it on each activation and deactivation. This is a read-only tracking field exposed to your app via the lease object; it is not checked by LeaseVerifier.verify. The activation cap is enforced server-side when a device calls /activate — the verifier only checks signature, key ID, and expiry.

features — an array of entitlement strings the app reads to decide which capabilities to unlock. Your app checks whether "pro" or "export" appears here before enabling those features. This is the mechanism that lets you sell different tiers from a single binary. The strings are stored sorted so that the client and server always reconstruct an identical payload regardless of insertion order.

issuedAt — the ISO timestamp when the lease was minted. Used internally for clock-drift calculations and audit logging.

expiresAtnull for a lifetime license; an ISO timestamp for subscription or time-limited leases. The SDK rejects a lease that has expired beyond its skew tolerance window, even if the signature is valid.

revoked — a boolean flag set to true when a refund or chargeback is processed. On the next revalidation, the SDK picks this up and transitions the app to an invalid state. Because verification is offline-first, revocation is not instantaneous — a customer with no network access keeps using their cached lease until the app revalidates. This is the honest tradeoff: instant revocation would require a server call on every launch, which breaks offline usage.

sig — the Ed25519 signature over a compact wire payload, not over the JSON above. The JSON is the lease object as the SDK exposes it to your app. Internally, signing operates on a more compact wire payload — a pipe-delimited string with eight positional fields: v3|kid|licenseKeyHash|instanceId|issuedAt|expiresAt|status|entitlements. This is what the Ed25519 signature actually covers; the SDK reconstructs and verifies that string before exposing the structured lease to your code.

The fields covered by the signature are kid, licenseKeyHash, instanceId, issuedAt (integer seconds), expiresAt (integer seconds), status, and entitlements (sorted, comma-joined). Modifying any of them produces a signature mismatch and the lease is rejected immediately. Fields like customerId, productId, activationLimit, and activationCount are part of the API/customer-facing model but are not positional fields in the signed wire payload.

For a full treatment of how offline validation uses this structure, see how offline license validation works.

How Ed25519 signing protects every field

Ed25519 is a public-key signature algorithm. The important property for licensing is this: given only the public key (which your app ships with), it is computationally infeasible to produce a valid signature. The public key can verify signatures but cannot generate them.

Keylight's servers hold the private key — it never leaves Keylight's infrastructure. Your app ships with the matching public key baked into the binary. An attacker who extracts the public key from your binary still cannot mint a valid lease: they would need the private key to produce a signature the public key accepts, and the math does not help them get there. Embedding the public key in the app is safe by design.

Why Ed25519 over RSA? Three practical reasons. Ed25519 signatures are about 88 bytes; RSA-2048 signatures are around 344 bytes. Ed25519 verification is faster — relevant when your app verifies the lease on every launch. And Ed25519 has no parameter choices that can be gotten subtly wrong the way RSA key generation can. For desktop licensing where verification happens repeatedly and binary size matters, these add up.

What tampering does in practice: the SDK reconstructs the v3 pipe-delimited string from the lease's kid, licenseKeyHash, instanceId, issuedAt, expiresAt, status, and sorted-joined entitlements fields, then calls isValidSignature against the decoded sig. If any of those eight fields was changed after signing — even one character — the reconstructed string differs from the one that was signed, the check fails, and the SDK rejects the lease. There is no partial match, no tolerance for minor edits. The lease is either intact or it is rejected.

On the wire, Keylight uses the v3 pipe-delimited format. The SDK parses that format, derives the canonical payload string, and verifies the signature before populating the structured lease object. Your code never sees the raw wire format; it only sees a verified, structured lease — or a verification failure.

What the SDK does on verification, and what it deliberately does not do

LeaseVerifier.verify is the function the SDK calls on every lease read. It is explicit about its scope. Here is what it checks:

  1. Signature validity — reconstructs the v3 pipe-delimited payload and verifies the Ed25519 signature against the trusted public key for this tenant. A lease with a missing or empty signature is rejected immediately, before any other check.

  2. Key ID (kid) membership — the lease carries a kid identifying which signing keypair was used. LeaseVerifier.verify looks up kid in the tenant's trusted keyset (a dictionary keyed by kid) and rejects the lease if it is absent — even if the signature itself is mathematically valid against some other key. This is how a compromised signing key gets invalidated: ship an app update that drops the compromised kid from the trusted keyset.

  3. Expiry — checks expiresAt against the current time with a skewTolerance window (default 300 s / 5 minutes) to absorb minor clock drift. A lease past its expiry window is rejected. Callers do not need to check expiry separately; the verifier handles it.

Here is how the SDK calls this at launch:

// Inside the SDK on app launch:
let isValid = LeaseVerifier.verify(
    lease: cachedLease,
    trustedKeys: configuration.trustedPublicKeys
)

The trustedKeys argument is your configuration's trustedPublicKeys — the dictionary of kid → Curve25519.Signing.PublicKey values from your KeylightConfiguration. The function returns a plain Bool — it does not throw.

What LeaseVerifier.verify explicitly does not do is equally important to understand:

It does not enforce activation count. The activationCount field is exposed in the lease object so your app can display it, but LeaseVerifier.verify does not compare it against activationLimit. Activation enforcement happens server-side when a device calls /activate; the verifier only checks signature, kid, and expiry.

It does not protect your binary against reverse engineering. A developer with a disassembler can find LicenseManager.isEntitled and patch the branch. The SDK source is public. The signed lease stops someone from forging entitlements by editing a file; it does not stop someone from patching the binary that reads it. Keylight is a commercial licensing system, not DRM.

It does not prevent use of a valid cached lease before revocation propagates. If a customer's lease was valid at last sync and the customer has no network access, the lease remains valid locally until the app revalidates online. This is the fail-open tradeoff of offline-first verification — and it is deliberate. The alternative (fail-closed, requiring a server call on every launch) locks out legitimate customers with no internet access.

It does not protect against a compromised private key. If Keylight's private key were compromised, an attacker could mint arbitrary valid leases. The trust anchor is the private key staying on Keylight's servers. Keylight's threat model is explicit: Keylight stops casual abuse and enforces commercial limits. It is not the last line of defense against a skilled attacker, and it does not claim to be.

The signed lease is a commercial licensing mechanism, not DRM. It raises the economic floor for abuse — editing the lease file does not work, sharing one key across more devices than the activation limit allows gets caught on the next revalidation — but it is not tamper-resistant in the DRM sense. For the full picture of the entitlement model and how the SDK integrates it, see the license keys feature page.

The field-by-field anatomy is the part most license-key guides skip, and it is where the security of the model actually lives. If there are aspects of the signing or verification flow you want to dig into further, send us your feedback and we'll extend this post.

FAQ

What is an Ed25519 lease?

It is a small JSON document — covering the customer, product, expiry, activation limit, and features — signed by an Ed25519 private key held on Keylight servers. The app verifies the signature locally using the matching public key.

Can the customer modify their own lease?

They can edit the file, but the signature will no longer match. The Keylight SDK rejects any lease whose signature does not verify against the embedded public key.

Why Ed25519 and not RSA?

Ed25519 produces smaller signatures (~88 bytes vs ~344 for RSA-2048), is faster to verify, and avoids the parameter-choice footguns RSA introduces. For desktop licensing where the app verifies the signature on every launch, the size and speed matter.