Demonstrates a full SDAP handshake between two agents hosted at different
provider domains — acme-health.com and city-hospital.org — followed by
encrypted message exchange.
- DID setup — each agent generates Ed25519 (auth) and X25519 (key-agreement)
keypairs, then constructs a
did:sdapDID document advertising its endpoints. - Provider attestations — each provider signs a JWT attestation for its agent, declaring capabilities, compliance tags (HIPAA), and security level.
- 3-message handshake — INIT → ACCEPT → CONFIRM with X25519 ephemeral key exchange and HKDF session-key derivation.
- Encrypted messaging — a medical records query and response exchanged over the session using AES-256-GCM with replay protection.
cd sdap-python
PYTHONPATH=src python ../examples/cross-provider-handoff/example.pyfrom sdap.identity import generate_ed25519_keypair, generate_x25519_keypair, create_did, create_attestation, verify_attestation
from sdap.handshake import create_handshake_init, process_handshake_init, create_handshake_confirm, process_handshake_confirm
from sdap.a2a import wrap_a2a_message, unwrap_a2a_message