Conformance tests
List of the tests of the conformance suite (conformance, layer 2). Each test checks one or more MUST requirements of the specification and points to where it is written. The suite says what is checked and when it passes; how the test tool is built is up to whoever builds it.
1. Rules of the suite
Section titled “1. Rules of the suite”- Components. There are four lists: node (section 2), entity node (section 3), wallet (section 4) and entity console (section 5). Section 6 is common to everyone who exchanges messages. A component passes the tests of its list and those of section 6 that apply to it.
- How it is tested. The test tool acts as the other party: a peer node, an entity, a wallet or a manager. It sends valid and deliberately invalid inputs and observes the response, what is published on the network and, for clients, what the screen shows.
- Passing. An implementation passes if it passes all the tests of its list. The suite reports SHOULD requirements as warnings, without failing.
- Provisional values. Tests that depend on numeric values (times, quotas, minimums) use the values of the specification version being tested. If those values change, the test does not change, only its parameter.
- Clients and the screen. Tests on what a client shows the person (consent, history, permissions) are checked with the implementation’s documentation and screenshots, or by a person following a script. The result says which method was used.
- Identifiers.
N-node,E-entity node,W-wallet,C-console,P-protocols. An identifier is never reused (registries, 1).
2. Node
Section titled “2. Node”| ID | Test | Passes if | Source |
|---|---|---|---|
| N-01 | First start | The node generates a transferable KERI AID and keeps it after a restart. | node, 2.1 |
| N-02 | PeerId bound to the AID | The node publishes the association between its PeerId and its AID, signed with the AID. | node, 2.1 |
| N-03 | Identity in use | Started with identity files whose heartbeats are recent, the node does not start. | node, 2.1 |
| N-04 | Duplicate identity | Seeing more recent heartbeats signed with its own identity, the node stops. | node, 2.1 |
| N-05 | A single complementary function | The node refuses a configuration with more than one complementary function. | node, 1 |
| N-06 | Heartbeats | The node emits a signed heartbeat every minute, with an increasing counter and its time. | node, 2.3 |
| N-07 | Directory entry | The node publishes its signed entry with all the required data and renews it before 24 h. | node, 2.3 |
| N-08 | Drifted clock | With its clock shifted more than 1 s from the median of its neighbours, the node stops writing records and keeping custody, and resumes after several heartbeats within the margin. | node, 2.2 |
| N-09 | Record out of time | The node rejects a record whose time differs by more than 1 s from its own. | node, 2.2 |
| N-10 | Queries from any node | Asked for data it does not have, the node locates it and serves it. | node, 2.4 |
| N-11 | Invalid data | The node rejects data with a wrong hash or signature, whether it comes from a node, a cache or a wallet. | node, 2.4 |
| N-12 | Read routes | The node answers all the read routes of the interface, directly or through a relay. | interface, 6 |
| N-13 | GET /1.0/info |
The response is public, is signed with the node’s key and contains versions, algorithms and function. | interface, 8 |
| N-14 | No private routes | There is no public route to mailboxes or internal audit logs. | node, 2.5 |
| N-15 | Custody | The node accepts and serves the data for which it is among the k closest, skipping the excluded nodes. | node, 2.6 |
| N-16 | Re-replication | When a custodian has had no heartbeats for 1 h and the node is the next closest, it copies the data. | node, 2.6 |
| N-17 | Storage challenges | The node answers storage challenges correctly with the Merkle proof. | node, 2.6 |
| N-18 | Validation of records | The node rejects a record with a signature outside the current KEL, a broken chain, a time out of margin or an exceeded quota. | node, 2.6 |
| N-19 | Append only | There is no operation to delete or modify records. | network, 7.3 |
| N-20 | Evidence | Facing a neighbour that fails (clock, availability, custody or function), the node generates signed evidence. | node, 2.7 |
| N-21 | Consequences | The node applies the common rule: it notes, and on repetition excludes for a growing time. | node, 2.7 |
| N-22 | Does not reject non-certified nodes | The node does not reject a node because it lacks a conformance credential. | node, 2.7 |
| N-23 | Quotas | Above the quota of an entity, the node responds quota_exceeded. |
node, 2.8 |
| N-24 | Bootstrap list | The node ships with gateways from several operators. | network, 8 |
| N-25 | Mediator: transport only | The mediator delivers the messages without changing them and keeps nothing outside the mailbox. | node, 3.1 |
| N-26 | Mediator: expiry | An uncollected message lasts at least 30 days, and is deleted when its receipt is confirmed. | node, 3.1 |
| N-27 | Mediator: HTTPS | The mediator offers sending and collection over HTTPS. | interface, 5 |
| N-28 | Mediator: empty notice | The push notice carries no content, sender or type, and the mediator does not know the system token. | interface, 7 |
| N-29 | Archive: nothing private | The archive does not store mailboxes or private data. | node, 3.2 |
| N-30 | Relay: end to end | The relay cannot read or alter the traffic it forwards. | node, 3.4 |
3. Entity node
Section titled “3. Entity node”| ID | Test | Passes if | Source |
|---|---|---|---|
| E-01 | Separation | The entity’s keys and data are separate from those the node uses on the network, and none of them goes to the network. | network, 6.4 |
| E-02 | Encrypted store | The entity store is encrypted at rest with keys that only the entity nodes hold. | network, 6.4 |
| E-03 | No rotation keys | The node does not hold the entity’s KERI rotation keys. | network, 6.4 |
| E-04 | Approval required | The node does not execute an operation that requires approval until it has the managers’ signatures. | interface, 10 |
| E-05 | Console session | The node checks the manager credential (signature, revocation, nonce, audience) and rejects console requests not signed with the session key. | interface, 10 |
| E-06 | Hybrid channels | The channel with the console and with other nodes of the same entity uses a hybrid key agreement. | cryptography, 3 |
| E-07 | Without duplicates | With several entity nodes, each message is processed once and is not deleted from the mailbox before it is in the store. | network, 6.4.1 |
| E-08 | Records | Each operation of the table of records writes its record, with the commitment calculated as in network, 7.1.2. | network, 7.1 |
| E-09 | Receipt in the response | The response to each recorded operation carries its receipts in receipts. |
protocols |
| E-10 | Erasure by salt | When asked to erase, the entity deletes the salt, and the record stays on the network without being linked to anyone. | network, 7.4 |
| E-11 | Anchoring | The node publishes the anchoring of the internal audit log every 24 h and after each change in the KEL. | network, 7.3 |
4. Wallet
Section titled “4. Wallet”| ID | Test | Passes if | Source |
|---|---|---|---|
| W-01 | Derivation | Given the seed and the entity of the test vector, the wallet obtains the same keys (example, test vectors). | cryptography, 5 |
| W-02 | Stable identifier | The did:peer:4 with an entity is the same after closing the relationship and after recovering the seed. | protocols, first contact |
| W-03 | One relationship per entity | A second request to the same entity reuses the relationship and does not send the long form again. | protocols, first contact |
| W-04 | Keys do not leave | Private keys do not leave the device in the clear, and the platform provider cannot read them. | client |
| W-05 | Local verification | Before signing, presenting, authorizing a token or approving as a manager, the wallet asks for biometrics or a PIN. | client |
| W-06 | Holder keys | Holder keys are in the secure chip and are composite if the chip supports ML-DSA; without a chip, the attestation says so. | client |
| W-07 | Encrypted backup | After recovering the seed on a new device, the relationships and the list of credentials are restored. | client |
| W-08 | Untrusted input | A link or QR code with a false signature or an entity without an Almena Trust credential is not shown as true. | client |
| W-09 | Link format | The wallet opens invite and signin links and ignores unknown parameters. |
registries, 7 |
| W-10 | Informed consent | Before sending, the wallet shows exactly which data is shared and why, and sends nothing without approval. | protocols, exchange |
| W-11 | Verification of what is read | The wallet rejects data from a gateway with a wrong hash or signature. | interface, 6 |
| W-12 | Bootstrap list | The wallet ships with gateways from several operators. | interface, 6 |
| W-13 | Receipts | The wallet stores receipts, checks after 24 h that they are on the network and, if not, publishes them. | network, 7.1 |
| W-14 | History | The wallet shows the history of each relationship in plain language. | protocols, records |
| W-15 | Permissions | The wallet shows the active token permissions and allows revoking them. | protocols, token |
| W-16 | Push | The wallet only declares push URLs of its own publisher. | interface, 7 |
| W-17 | Manager approval | The wallet shows the entity, the operation and its consequences in plain language before signing. | client, approvals |
| W-18 | Console sessions | The wallet shows the active sessions and allows ending them. | client, sign-in |
| W-19 | One vote per manager | When adding a device of a manager, the weights keep all their devices as a single vote. | client, manager keys |
| W-20 | Device code | When adding a device, both show a short code to compare. | client |
| W-21 | Incident | On an incident-notice, the wallet asks for new copies of the credentials listed without the person’s intervention. |
incidents, 2 |
| W-22 | Leaving | The person can close all their relationships at once; afterwards the wallet keeps no seed, credentials or salts. | person life cycle, 1 |
| W-23 | Accessibility of essential screens | Consent, approval, permissions and history work with the screen reader and the system font size, in plain language. | client, accessibility |
| W-24 | Alternatives | A PIN is offered when biometrics cannot be used, and no warning depends only on colour or sound. | client, accessibility |
5. Entity console
Section titled “5. Entity console”| ID | Test | Passes if | Source |
|---|---|---|---|
| C-01 | Stateless | After a session there are no keys, data or credentials of the entity left on the computer. | client |
| C-02 | Sign-in | The sign-in QR code carries a one-time code, the session key and a temporary mailbox, and expires. | client, sign-in |
| C-03 | Signed requests | Every request to the entity node is signed with the session key. | interface, 10 |
| C-04 | Hybrid channel | The channel with the entity node uses a hybrid key agreement, also through a relay. | interface, 10 |
| C-05 | Camera | The console scans with the camera the QR code that a person shows. | client |
| C-06 | Bootstrap list | The console ships with gateways from several operators. | network, 8 |
6. Protocols (everyone who exchanges messages)
Section titled “6. Protocols (everyone who exchanges messages)”| ID | Test | Passes if | Source |
|---|---|---|---|
| P-01 | Messages | Each message of the example is produced and accepted with the fields and type of the registries. |
protocols |
| P-02 | DIDComm and encryption | Messages are DIDComm v2, end to end, with the hybrid profile. | interface, 2 |
| P-03 | Signatures | ES256 and ML-DSA-65 + ES256 signatures are verified; a wrong one is rejected. | cryptography, 4 |
| P-04 | First message | The first message carries the long form of the did:peer:4 and the mailbox. | protocols, first contact |
| P-05 | Nonce | A presentation with an expired or reused nonce, or for another audience, is rejected with nonce_invalid. |
protocols, exchange |
| P-06 | Form version | A request that uses a form version that is not active is rejected. | protocols, forms |
| P-07 | Network fields | Every credential issued carries iss, iat, vct, cnf and status. |
protocols, forms |
| P-08 | Token | The merchant rejects a token whose cnf is not its own did:keri. The bank rejects a token-redeem with an id it already received. |
protocols, token |
| P-09 | Commitment | The commitment of the test vector is reproduced. | network, 7.1.2 |
| P-10 | Counter | The entity’s first message to a contact code carries no personal data. | protocols, exchange |
7. Open questions
Section titled “7. Open questions”None for now.