Skip to main content

Cross-Platform Identity Authentication and End-to-End Encrypted Communication Technology Based on DID

Author: Chang Gaowei
Email: chgaowei@gmail.com
Website: pi-unlimited.com
中文版本: 中文版本readme

Abstract

We are dedicated to providing communication capabilities for AI Agents, connecting all Agents into a collaborative network. This project is an open-source SDK implementation based on Decentralized Identifier (DID) and end-to-end encrypted communication technology. For technical details, please refer to the Technical White Paper: A Cross-Platform Identity Authentication and End-to-End Encrypted Communication Technology Based on DID. With the didall open-source project, any intelligent agent can generate its own DID, locate others based on their DIDs, perform identity authentication, and engage in secure end-to-end encrypted communication.

Features

  • Cross-platform identity authentication: Achieve identity interoperability across different platforms through DID.
  • End-to-end encrypted communication: Use ECDHE for ephemeral key exchange to ensure the security of communication.
  • Efficient and secure: Simplifies the identity verification process while ensuring the confidentiality and integrity of data.

Installation

The latest version has been removed from PyPI, so you can install it directly:

pip install didall

Usage

After installing the didall library, you can run our demo to experience the powerful features of didall. We currently offer two modes: hosted mode and single node mode.

Hosted Mode

In hosted mode, we provide a DID server where all DID information is registered, and communication is conducted through the DID server.

You can run the sample code in the examples directory to first generate Alice and Bob's DID files, save Alice's DID file to the DID server, and then Bob can connect to Alice's DID to establish end-to-end encrypted communication.

  1. Generate two DID documents, alice.json and bob.json, save them to the specified files, and register them with the DID server:
python sample_did.py alice.json
python sample_did.py bob.json
  1. Start Alice's demo:
python sample_alice.py alice.json
  1. Start Bob's demo:
python sample_bob.py bob.json

By checking the logs, you can see that Alice and Bob have successfully connected and engaged in end-to-end encrypted communication.

Single Node Mode

In single node mode, you don't need any third-party services to complete DID-based identity verification and encrypted communication.

You can run the simple_node code in the examples directory, first start Alice's node, and then start Bob's node to complete identity verification and encrypted communication.

  1. Start Alice's node:
python simple_node_alice.py
  1. Start Bob's node:
python simple_node_bob.py

Contributing

Contributions to this project are welcome. Please read the contribution guidelines before submitting a pull request.

License

This project is open-sourced under the MIT License. For more details, please refer to the LICENSE file.

Packaging and Uploading (update the version number in setup.py first)

python setup.py sdist bdist_wheel 
twine upload dist/*        

Metadata

Release files for ai-agent-protocol 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-agent-protocol 0.1.5
File Size Uploaded
ai_agent_protocol-0.1.5.tar.gz 30.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-agent-protocol 0.1.5
File Interpreter ABI Platform
ai_agent_protocol-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 100.4 kB

Release files / ai_agent_protocol-0.1.5.tar.gz

Download URL ai_agent_protocol-0.1.5.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9362051f59642b619563af2da63838afb2d6752495e706ab05d9aca572f01d65
BLAKE2b-256 checksum
How to use checksums
c5687014e39131c35fb44bd309bf8f8ae94137448485a4969531840131f39587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / ai_agent_protocol-0.1.5-py3-none-any.whl

Download URL ai_agent_protocol-0.1.5-py3-none-any.whl
Size 69.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
116786c1f5dba4c3e0b25d1560bacf072e0d786f2b809e737fb980963a9c9ead
BLAKE2b-256 checksum
How to use checksums
72ab6cdd755b79534965257de056b0e5921794cc12829b587ebb4cc1197c45a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page