So how you could use DID and solve Auth problem without using the Magic SDK. So let's understand what is decentralized identity. A decentralized identity is a new type of identifier that is globally unique, resolvable, and has availability, and cryptographically verifiable. DID tokens are used as cryptographically generated proofs that are used to manage user access to your applications resource server.
For self-sovereign identity, which can be defined as a lifetime portable digital identity that does not depend on any centralized authority. So this is how the DID format looks, which has a scheme. It includes DID, also has a DID method, which depends on read, write, update, and delete based on what you want to perform. As well as includes, for example, UUID, that is the unique ID. And at last, it has a DID method specific string. It depends on the DID methods you use. Visit this link to understand more about the DID format.
Let's understand about DIDT, that is de-centralized identity tokens. By adapting W3C's DID protocol, the DID token created by magic client SDK leverages the Ethereum blockchain and elliptic cryptography to generate verifiable proof of identity and authorization. The proofs are encoded in lightweight digital signature. The lightweight digital signature that can be shared between client and server to manage permissions, protected routes, and resources or authenticate users.
This is how a typical DID code structure would look, which consists of proof and claim. Proof is a digital signature that proves the validity of a given claim. And claim is nothing but a data representing the user's access. And proof is signed data with Ethereum's personal sign method. Visit this link to understand how the personal sign Ethereum link, personal sign method on Ethereum works. And then there is binary to ASCII conversion encoding from proof and claim. DID token specification has its keys, for example, issue date, expiration timestamp, not valid before timestamp, issuer, subject, audience and it adds an encrypted signature of arbitrary serialized data and then a unique token identifier, which is something like this. This is how you generate a DID token, which is a pseudocode, which has IAT in this format, expiration time with the lifespan, issuer, who is your issuer, which uses the DID format, which uses the DID and the DID method and the specified string, then the subject would be, what would be the subject and then the audience and NF, NBF, which uses this format and then a token identifier. This signs the claim with the user's private key, this way the claim is verifiable and impossible to forge. And everything is encoded using binary to ASCII.
So this is how you generate a DID token. I hope you would have, you learned a lot about how to manage decentralized identity. So it's not about building your DID and how you build it. So Magic does a lot of things under the hood. It manages the key in very unique way. Everyone can generate a DID token, but it depends on how you're going to manage that. To learn more about how Magic handles its delegated key management, visit these links, as well as learn about Magic from Magic Docs and Magic Guides. These are the ways you can connect with me. Feel free to reach out if you have any questions around any topic, and I'll be sharing the slides link after this talk. I hope you had a wonderful day, and this talk has given you a vision to think about a decentralized identity space. So, bye, have a good day.
Comments