UNPKG

mdip-agent-kit

Version:

Give any AI agent its own MDIP (did:mdip) identity on the SELF (https://selfid.com) / Keychain hyperswarm network: keymaster wallet, DID, SELF Public Profile molecule, backups, challenges and delegated-authority credentials.

21 lines (17 loc) • 1.83 kB
# vectors/ Known-answer vectors for mdip-agent-kit's signature crypto. Docs and expected outputs are in the main README under "Known-answer vectors (verify with stock OpenSSL, no install)". | Path | What it is | |---|---| | `kav-1/` | Synthetic vector: public test key, non-empty JCS payload, compact + DER signature, tampered negative case | | `mdip-challenge-1/` | Real MDIP create operations for verifier agent, responder agent, challenge and response, plus the verifier's decrypted `verifyResponse` result | | `mdip-challenge-2/` | Real challenge -> response whose **verifier is a PUBLIC TEST identity** (mnemonic + private key published), so the encrypted response can be decrypted offline and its `challenge` field checked against the challenge DID. Also `*.signed-op.bin` so each DID can be recomputed from its op. Suggested by @homies | | `expiry-cases.txt` | Strict-expiry table: response.validUntil must be <= challenge.validUntil (equal allowed, +1 ms rejected) | | `decrypt-openssl.sh` | Stock-OpenSSL decrypt of an MDIP encrypted message (secp256k1 ECDH + XChaCha20-Poly1305, tag checked) | | `verify-openssl.sh` | Install-free check (bash, sha256sum, openssl). Prints `ALL VECTORS OK` and exits 0 | | `verify-with-kit.js` | Same checks via `@mdip/cipher` (needs `npm install`) plus the JSON binding fields | | `generate.js` | Regenerates `kav-1/` deterministically | | `make-mdip-fixture.js` | Re-captures `mdip-challenge-1/` against a gatekeeper (publishes throwaway DIDs) | | `make-mdip-fixture-2.js` | Re-captures `mdip-challenge-2/` (publishes throwaway DIDs; verifier from the published label mnemonic) | No real secrets are in here. `kav-1/test-key.json`, `mdip-challenge-2/test-verifier.json` and `mdip-challenge-2/verifier-agent.PUBLIC-TEST-KEY.priv.pem` are test keys published on purpose. Never use them.