Skip to main content

An SDK for enabling identity authentication and secure encrypted communication between AI agents.

Project description

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/*        

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_agent_protocol-0.1.5.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

ai_agent_protocol-0.1.5-py3-none-any.whl (69.5 kB view details)

Uploaded Python 3

File details

Details for the file ai_agent_protocol-0.1.5.tar.gz.

File metadata

  • Download URL: ai_agent_protocol-0.1.5.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ai_agent_protocol-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9362051f59642b619563af2da63838afb2d6752495e706ab05d9aca572f01d65
MD5 ac1de4987c37112d3d833c055458363b
BLAKE2b-256 c5687014e39131c35fb44bd309bf8f8ae94137448485a4969531840131f39587

See more details on using hashes here.

File details

Details for the file ai_agent_protocol-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_agent_protocol-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 116786c1f5dba4c3e0b25d1560bacf072e0d786f2b809e737fb980963a9c9ead
MD5 8b284da6e90b6556814c9453c871ddc3
BLAKE2b-256 72ab6cdd755b79534965257de056b0e5921794cc12829b587ebb4cc1197c45a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page