Process: Create a Connection between Identity Owners - Quintor/StudyBits GitHub Wiki
This process explains how two Identity Owners (IO1 and IO2) are creating a connection.
IO1
creates a new wallet,W1
IO1
creates a newDID
(DID1) andVerification Key
(VerKey1) fromIO1
seedIO1
storesDID1
andVerKey1
inW1
- The
DID
creation and storing is done withdid.create_and_store_my_did
- The
IO1
creates creates aConnectionRequest
(ConReq), which is aHashMap
with keys:did
andnonce
.did
is the newly createdDID1
nonce
is a cryptographically ensured random number
IO1
sends theConReq
to the Indy Ledger together withVerKey1
- Request is built with
Legder.buildNymRequest
- Request is signed and submitted with
Legder.signAndSubmitRequest
- Request is built with
IO1
sends theConReq
toIO2
off-chain
IO2
receives theConnectionRequest
(ConReq-R) fromIO1
off-chainIO2
creates a new wallet,W2
IO2
creates a newDID
(DID2) andVerification Key
(VerKey2) fromIO2
seedIO2
storesDID2
andVerKey2
inW2
IO2
retrieves theConnectionRequest
(ConReq-L) with theDID
ofConReq-R
from the Indy LegderIO2
retrieves theVerKey1
forConReq-L
from the LedgerIO2
creates aConnectionResponse
, which is aHashMap
with keys:did
,verkey
, andnonce
did
is theDID1
fromConReq-R
.verkey
is theVerkey1
forConReq-L
nonce
is theNonce
retrieved from theConReq-L
IO2
sends theConnectionResponse
toIO1
usingCrypto.anonCrypt
IO2
receives aEncryptedResponse
as return value from the last step.IO2
decrypts theEncryptedResponse
usingCrypto.anonDecrypt
IO2
checks that theNonce
inEncryptedResponse
is equal toNonce
inConReq-R
- If yes,
IO2
sends aConnectionResponse
with to the Ledger with- The
VerKey1
received forConReq-L
- The
DID2
ofW2
- The
VerKey2
newly created forW2
- The
IO2
sends aConnectionResponse
toIO1
off-chain with the same data.
- If no,
IO2
doesn't send the connection response.
- If yes,
IO1
receives theConnectionResponse
fromIO2
off-chain