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 from the future | The node rejects a record whose time is ahead of its own by more than the margin. | 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 SHA-256 of the nonce followed by the data. | node, 2.6 |
| N-18 | Validation of records | The node rejects a record signed with a key that was not the entity’s record key when it was signed, a broken chain, a future time 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 wrong response to a storage challenge or two contradictory signed messages, the node generates signed evidence; facing a lack of response, it generates none and keeps its own copy of the data. | 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 between nodes | The relay cannot read or alter the traffic between nodes that it forwards. | node, 3.4 |
| N-31 | Late record | The node accepts a validly signed record older than the margin, also when the previous record of its chain is missing, marks it as late with its time of arrival in the acknowledgement and returns that acknowledgement with the record. It does not check the time again in re-replication. | node, 2.2 and 6.4 |
| N-32 | KEL: first version seen | The node keeps the first version of each KEL event in its custody and does not replace it, except with a KERI recovery rotation; it keeps and serves any other version signed by the entity as proof of duplicity. | node, 2.6 |
| N-33 | Archive: duplicity | The archive keeps and serves both versions when it finds two different versions signed by the entity of the same KEL event or of the same position in a record chain. | node, 3.2 |
| N-34 | DID document | The node builds an entity’s DID document from its KEL and its current configuration, as network 6.4.2 says, and returns both with it. | interface, 6 |
| N-35 | Relay: addresses under its domain | The relay has its own domain and TLS certificate and forwards each request to /n/<AID>/ to the node with that AID, through the connection that node keeps open. |
node, 3.4 |
| N-36 | Node behind relays | The node publishes in its entry one address and read URL per relay, and answers the read routes at each of them. | network, 6.3 and 8.1 |
| N-37 | libp2p and identifiers | The node takes part in the DHT with libp2p and Kademlia under /almena/kad/1.0.0, and exchanges the messages of node 6 under /almena/node/1.0/<message> with the fields of its table. |
node, 2.4 and 6 |
| N-38 | Validation by type | The custodian rejects a piece of data of each type that fails the checks of the table in node 2.6, and keeps only the highest version of data located by name. | node, 2.6 |
| N-39 | Same custodians | Given the same node directory, the node computes the same k custodians as another implementation, with the entry period counted from the custodians’ acknowledgements and diversity by address range. | network, 4 |
| N-40 | Expiry | The node does not store, replicate or serve a piece of data whose expiry (registries, 6) has passed, not even a late record. | network, 1.1.1 |
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, and their parties are those of the relationship over which it travels. |
protocols |
| E-10 | Erasure by salt | On a close with erase, the entity deletes the salts of that relationship, and its records stay 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 |
| E-12 | Entity configuration | Every change of bound nodes, daily-use keys or mediators is published as a new version of the configuration, with its seal in a KEL event approved with M of N. | network, 6.4.2 |
| E-13 | Where the keys are | The issuer writes in each copy, always disclosed, the holder_key_storage that the wallet declared, and does not issue a manager credential with software. |
client |
| E-14 | Recovery mode | In a console session without a manager credential, the node accepts only a recovery rotation that is valid in the entity’s KEL. | interface, 10 |
| E-15 | Revocation on closing | On a close with revoke, the entity revokes the credentials and token permissions it issued in that relationship, and its ack carries their receipts. |
protocols |
| E-16 | One node, one entity | A node already bound to an entity refuses to be bound to another one. | network, 6.4 |
| E-17 | Binding code | A node that is not bound opens a session to bind it only with a valid binding code, and the same code does not work twice. | interface, 10 |
| E-18 | Manager invitation | The entity only prepares the rotation that adds a manager when the request carries a valid, unused invitation code. |
client |
| E-19 | Approval to sign in | If the entity requires it, the node opens a console session only after the approval of another manager. | client |
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, and the one of the test vector is reproduced (example, test vectors). | cryptography, 5 |
| 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, and the wallet declares where they really are (holder_key_storage) in each issuance request and refill. |
client |
| W-07 | Recovery by contacting again | After recovering only the seed, the wallet derives the same did:peer:4 for an entity, and the entity recognizes the relationship. | 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 active device | When the wallet is activated on a new device, the previous one stops collecting messages and presenting credentials. | client, changing device |
| W-20 | Device code | When changing device by direct transfer, 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 |
| W-25 | Keys of an entity | The wallet only accepts a signature of an entity if its key was, with that use, in the configuration that applied when it was signed. | network, 6.4.2 |
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 |
| C-07 | Backup key | At sign-up the console generates the backup key and shows its sheet once, the inception event only carries its hash, and nothing of it is left on the computer; a recovery with the sheet leaves it without any signing power and gives a new one. | client, manager keys |
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 is a presentation-request without personal data, and the wallet answers with a request in the same thread. |
protocols, exchange |
| P-11 | Network data and hybrid encryption | Published data are JWS whose hash is the SHA-256 written with the CESR code I, and a message encrypted with ALM-MLKEM768-P256 by another implementation is decrypted. |
network, 1.1 and cryptography, 3 |
| P-12 | Form paths | A request that names a path the form does not have, or lacks something its path requires, is rejected with invalid_format; one that follows its path is processed. |
protocols, forms |
7. Open questions
Section titled “7. Open questions”None for now.