As described here RIF Identity proposes a standard model to enable users store one single secret and obtain multiple public and not associated identities.
Technically, a user is going to save a seed that the wallets will use to create different private keys in a deterministic way. If all the wallets follow the same algorithm to create accounts, any wallet could correctly recover which accounts have been used before.
Please make use of this section for core concept definitions
So, any user can hold a mnemonic phrase to access their RIF Identity account, and from that account obtain different public Personas.
This article specifies how a wallet should:
This specification assumes the RIA is used in one single wallet at the same time.
Each persona has a public identity identifier. The identifier is used in different protocols such us identity delegation and message authentication. This public identifier is derived from a private key as follows:
For a given private key (
pr
), the Ethereum address (A(pr)
) (a 160-bit value) to which it corresponds is defined as the rightmost 160-bits of the Keccak hash of the corresponding ECDSA public key:A(pr) = [96:255]KEC(ECDSAPUBKEY(pr))
8
did:ethr:rsk:A(pr)
, and for Rootstock (RSK) Testnet did:ethr:rsk:testnet:A(pr)
Checksum encoding in the address is not required but must be validated if received
For new users
Use calculated seed as entropy to create an HD Key following BIP-325
m/44'/137'/0'/0/n
with n
a nonce to obtain different accounts.n=0
private key as the first persona private key0
For users that already have a RIA
k
be the last memoized last noncen=k+1
in the HD Key derived in 5. of identity creationk+1
For users that already had a RIA when accessing first time to the wallet.
This protocol is based on BIP-449 account discovery, the difference is that the accounts are marked as used also querying information that is not transactions.
i
be 0n=i
i
be i+1
and go to step 3.The exact way to detect if an account was used or not is not yet designed. As a first approach we recommend to check if the account has made or received blockchain transactions or crypto-assets. Also check known private or public services that can be used to decide on this.
![wallet setup]../assets/img/06_wallet_setup.png)
@rsksmart/rif-id-mnemonic
@rsksmart/rif-id-ethr-did
@rsksmart/rif-id-daf
Go to top