Provides encryption utilities for secure agent-to-agent communication.
javascript
const e2ee = require('./skills/a2a-e2ee-encryption');
// Generate key pair
const keyPair = e2ee.generateKeyPair();
// Encrypt message
const encrypted = e2ee.encrypt('secret message', recipientPublicKey);
// Decrypt message
const decrypted = e2ee.decrypt(encrypted, privateKey);
// Export/Import keys
const exported = e2ee.exportKey(keyPair.publicKey);
const imported = e2ee.importKey(exported);
text
┌─────────────┐ ┌─────────────┐
│ Agent A │ │ Agent B │
│ │ │ │
│ Private Key │ │ Private Key │
│ Public Key │◄──── Exchange ────►│ Public Key │
│ │ │ │
│ Encrypt │──── Encrypted ────►│ Decrypt │
│ with B's │ Message │ with A's │
│ Public Key │ │ Public Key │
└─────────────┘ └─────────────┘