ERC-1388 Attestation issuer registry list (Attestation Issuers Management List)
Stagnant · Signatures & auth · created 2018-09-08
A standard that lets a smart contract verify attestations by designating a list contract of trusted issuers, instead of trusting each attestation issuer individually.
Why it is needed
There are cases where a single capacity, such as proof of residence, can be issued by multiple institutions. For example, in New Zealand real estate transactions, proof of residence can be obtained from various sources such as a justice of the peace, the land registry office, the police, or the passport authority. Having a smart contract hardcode trust in all of these issuers directly is not practical. The contract would need to be changed every time an issuer is added or changed, and the contract author would be burdened with deciding which issuers to trust. This standard delegates that judgment to a separate list management contract, so that a service only needs to trust a specific list.
What to implement
function addIssuer(address issuerContractAddress) public;: Finds a list managed by the sender and adds an issuer contract to that list.function removeIssuer(address issuerContractAddress, List listToRemoveIssuerFrom) public returns(bool);: Removes an issuer from the specified list. Returns false if that issuer is not on the list.function getIssuerCorrespondingToAttestationKey(bytes32 list_id, address signingKeyOfAttestation) public returns (address);: Iterates through the issuer contracts on a list attempting signature key verification, and returns the contract address of the first matching issuer.function createList(List list) public;: Creates a new issuer list.function replaceListIndex(List list, address manager) public returns(bool);: Replaces the list administrator's key with a new key.
In depth
Composition of the List struct
A List consists of name (the name), description (a short description of what the list covers), capacity (a filter for the purpose a signing key may be used for), issuerContracts (an array of issuer contract addresses, not the signing keys themselves), and expiry (the expiration time). If a contract designates this list, it accepts only attestations issued by issuers belonging to the list, and if capacity is not empty, it accepts only attestations signed for that purpose.
Using the sender address as the list identifier
For simplicity, the list ID is taken directly as the address of the sender who created it. Because of this, a single person who wants to run multiple lists for different purposes must use a different sender address for each one, and even if a key is leaked or lost and reset through some special method, the list is still identified by the original sender address.
Adding and removing issuers
addIssuer finds the list managed by the sender and adds an issuer contract address to it. removeIssuer removes an issuer from the specified list, and returns false if that issuer is not in the list.
Finding an issuer by signing key
getIssuerCorrespondingToAttestationKey takes a list ID and the signing key used in an attestation, attempts a validateKey() call against every issuer contract in the list, and returns the contract address of the first issuer that matches. The source text mentions the possibility of an attack where one issuer could claim another issuer's key as its own, and only states that this is mitigated in a later design.
Replacing the manager key
replaceListIndex replaces the list manager's key with a new key. However, since the list ID itself still uses the original sender address, this function does not change the ID itself.
Example use case
The source text cites a real-world case of the New Zealand real estate agency KiwiRealtors, which offers an 'expression of interest' feature that requires users to prove, as a legal requirement, that they are residents of New Zealand or Australia. Proof of residency can be issued by multiple bodies, such as justices of the peace, the land registry office, local police, and passport authorities, so a model was proposed to manage all these issuers under a single list.
Proposal status
This ERC is in Stagnant status, a proposal that is no longer progressing and has stalled. The body of the text itself only mentions that the attack mitigation approach comes 'in a later design,' and the details are not included in this document.