io.github.san-techie21/astracipher

编码与调试

by san-techie21

Cryptographic identity for AI agents: W3C DIDs, Verifiable Credentials, post-quantum crypto

什么是 io.github.san-techie21/astracipher

Cryptographic identity for AI agents: W3C DIDs, Verifiable Credentials, post-quantum crypto

README

AstraCipher

Cryptographic Identity & Trust Protocol for AI Agents

The "SSL certificates" for the AI agent economy. Open-source protocol that gives every AI agent a verifiable, cryptographic identity.

License: BSL 1.1 TypeScript Post-Quantum FIPS 204


The Problem

AI agents are operating across enterprise systems with zero identity verification. No one can answer:

  • Which agent performed this action?
  • Was it authorized?
  • Can we prove compliance to regulators?

MCP servers expose powerful tools, but any agent can call any tool. There's no authentication, no authorization, no audit trail.

The Solution

AstraCipher is a W3C-standards-based protocol that provides:

  • Decentralized Identifiers (DIDs) --- Unique, cryptographic identity for every agent (did:astracipher:mainnet:abc123)
  • Verifiable Credentials --- Signed attestations of capabilities, permissions, and trust levels
  • Trust Chains --- Delegated authority with depth limits (Creator -> Authorizer -> Agent -> Sub-agent)
  • Post-Quantum Cryptography --- ML-DSA-65 + ECDSA P-256 hybrid signatures (FIPS 204 compliant)
  • Compliance Modules --- Generate regulatory-ready reports for 10+ frameworks worldwide

Why Now

  • 850M+ AI agents expected by 2030 (Gartner)
  • MCP adopted by Anthropic, OpenAI, Google, Microsoft --- but has no identity layer
  • AAIF (Linux Foundation + Anthropic) defines agent interoperability --- AstraCipher provides the missing identity primitive
  • EU AI Act enforcement begins 2025-2026, requiring traceability for high-risk AI systems
  • NIST AI RMF and ISO 42001 becoming enterprise prerequisites

Quick Start

CLI

bash
# Install the CLI
npm install -g @astracipher/cli

# Initialize AstraCipher in your project
astracipher init

# Generate post-quantum key pair
astracipher keygen --algo hybrid

# Create an agent identity (DID)
astracipher create --name "my-data-agent" --key .astracipher/keys/agent.pub.json

# Issue a credential
astracipher issue \
  --did did:astracipher:testnet:abc123 \
  --capabilities read,write \
  --trust-level 8 \
  --validity 365d

# Verify a credential
astracipher verify --credential ./credential.json

SDK (TypeScript)

typescript
import { AstraCipherClient } from '@astracipher/core';
import { HybridKeyManager } from '@astracipher/crypto';

const keyManager = new HybridKeyManager();
const keyPair = await keyManager.generateKeyPair('hybrid');

const client = new AstraCipherClient({ keyManager });
const did = await client.createDID('my-agent', keyPair);
const credential = await client.issueCredential(did, {
  capabilities: ['read', 'write'],
  trustLevel: 8,
});
const result = await client.verifyCredential(credential);

MCP Integration

Any MCP-compatible AI agent (Claude, GPT, etc.) can use AstraCipher tools:

json
{
  "mcpServers": {
    "astracipher": {
      "command": "npx",
      "args": ["@astracipher/mcp-server"]
    }
  }
}

Available MCP tools:

  • create_agent_identity --- Create a DID for an agent
  • verify_agent --- Verify an agent's credential
  • check_permissions --- Check agent permissions for a resource
  • inspect_credential --- View credential details

Architecture

code
+----------------------------------------------------------+
|                    AstraCipher Protocol                     |
+---------------+----------------+-------------------------+
|  @astracipher/  |  @astracipher/   |  @astracipher/            |
|    crypto     |     core       |   compliance-*          |
|  (PQC keys,   |  (DIDs, VCs,   |  (DPDP, EU AI Act,     |
|   signing)    |  trust chain)  |   GDPR, SEBI, ...)     |
+---------------+----------------+-------------------------+
|                   Integration Layer                       |
|  +--------------+  +-------------+  +------------------+ |
|  | MCP Server   |  | A2A Adapter |  |   REST API       | |
|  | (AI agents)  |  | (Google A2A)|  |   (server)       | |
|  +--------------+  +-------------+  +------------------+ |
+----------------------------------------------------------+

Packages

Core Protocol (BSL 1.1 --- Open Source)

PackageDescriptionStatus
@astracipher/cryptoPost-quantum cryptographic primitives (ML-DSA-65, ML-KEM-768, ECDSA P-256, hybrid)Core
@astracipher/coreDID management, credential issuance/verification, trust chainsCore
@astracipher/cliCommand-line interface for all AstraCipher operationsCore
@astracipher/compliance-corePluggable compliance engine for regulatory frameworksCore
@astracipher/sdk-pythonPython SDK for AstraCipher protocolCore

Integrations (BSL 1.1)

PackageDescription
@astracipher/mcp-serverMCP integration --- expose AstraCipher as AI agent tools
@astracipher/a2a-adapterGoogle A2A protocol adapter for agent-to-agent auth

Platform & Premium Modules (Proprietary --- astracipher-platform)

ComponentDescription
@astracipher/serverProduction verification server (PostgreSQL, org management, API keys)
@astracipher/dashboardReact dashboard for agent identity management
10 compliance modulesDPDP, SEBI, RBI, EU AI Act, GDPR, HIPAA, NIST, SOC 2, ISO 42001, UK AI Safety

Cryptography

AstraCipher uses hybrid post-quantum + classical cryptography by default:

AlgorithmStandardPurpose
ML-DSA-65FIPS 204Post-quantum digital signatures
ECDSA P-256FIPS 186-5Classical digital signatures
ML-KEM-768FIPS 203Post-quantum key encapsulation
Hybrid Mode---Both PQC + classical must validate

Built on audited libraries: @noble/post-quantum and @noble/curves.

Why hybrid? Classical ECDSA provides battle-tested security today. ML-DSA protects against quantum attacks. Both must validate --- so you get defense-in-depth against both classical and quantum adversaries.

Competitive Positioning

AstraCipherKeycard (a16z)AembitMicrosoft Entra Agent ID
Open sourceBSL 1.1ClosedClosedClosed
Post-quantum cryptoML-DSA + ECDSA hybridNoNoNo
W3C DID standardYesNoNoPartial
MCP nativeYesYesNoNo
Compliance modules10+ frameworksNoNoNo
Self-hosted optionYesNoNoNo
Vendor lock-inNonePlatformPlatformAzure

Development

bash
# Clone the repo
git clone https://github.com/AstraFintechLabs/astracipher.git
cd astracipher

# Install dependencies
npm install

# Build all packages
npx turbo build

# Run tests
npx turbo test

# Run the CLI locally
npx ts-node packages/cli/src/index.ts --help

Project Structure

code
astracipher/                         # Public repo (BSL 1.1)
+-- packages/
|   +-- crypto/                    # PQC crypto primitives (ML-DSA, ML-KEM, ECDSA)
|   +-- core/                      # Protocol implementation (DIDs, VCs, trust chains)
|   +-- cli/                       # CLI tool
|   +-- sdk-python/                # Python SDK
|   +-- compliance-core/           # Compliance engine framework
+-- integrations/
|   +-- mcp-server/                # MCP integration
|   +-- a2a-adapter/               # Google A2A adapter
+-- e2e-test.mjs                   # E2E test suite (67 tests)
+-- .github/workflows/             # CI/CD pipeline

The production server, dashboard, and premium compliance modules (DPDP, SEBI, RBI, EU AI Act, GDPR, HIPAA, NIST, SOC 2, ISO 42001, UK AI Safety) are in the private astracipher-platform repository.

License

Business Source License 1.1 (BSL 1.1)

  • Use: Free to use, modify, and self-host for any purpose
  • Restriction: Cannot create a competing hosted agent identity/compliance service
  • Change Date: February 18, 2030 (converts to Apache License 2.0)
  • Full text: LICENSE

This means: startups, enterprises, and developers can freely use AstraCipher in their products. The only restriction is you can't take this code and launch a competing AstraCipher-as-a-Service offering.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Built by

Astra Fintech Labs --- Building trust infrastructure for the AI agent economy.


AstraCipher: Because in a world of autonomous AI agents, identity isn't optional.

常见问题

io.github.san-techie21/astracipher 是什么?

Cryptographic identity for AI agents: W3C DIDs, Verifiable Credentials, post-quantum crypto

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描123.0k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描123.0k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描123.0k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
84.2k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
53.3k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.4k

评论