Internet Identity
Crypto Valley Conference 2021 · October 2021 · 22:01
Bjorn Tackmann of Dfinity speaks at Crypto Valley Conference 2021 on Internet Identity. The title and the uploader's text name the topic and the speaker's affiliation but give no further detail on what the talk covers.
Speakers
Topics
From Crypto Valley Conference 2021, hosted by Crypto Valley Association.
Transcript
[Applause] [Music] yeah so i named the presentation how to authenticate toward smart contracts and i want to start with giving a little context of what i mean by that so the internet computer is a blockchain that is they're special in some ways and one of them is that's very that is scalable um so i just took a screenshot from our dashboard here 23 blocks per second every single block can easily contain a thousand or more transactions depending a bit on the transaction size and we're still scaling so it's horizontal scaling the inner computer is growing in capacity
now every week um and with this with this scalability also comes a lower transaction price so a single transaction only costs a fraction of a cent which is very difficult very different from from other large scale blockchains another uh interesting property is that you know computers can serve content directly into web browsers no plugins no extensions just a plain web browser and these two things together support a new set of use cases you can think about for example social media served directly from a smart contract running on chain into users browsers and the advantage of that is there is no
no single party controlling this social media anymore there's no single party that has an incentive to exploit users data the the entire social media platform could be controlled by the users it could be fully decentralized and there's also no intermediary needed to serve that content to users because users browsers can directly fetch it from the internet computer blockchain [Music] but with these new use cases also can new requirements in terms of authenticating users and identifying users and so that has to be solved quite differently from from existing traditional web so these are types of logins that you're very likely to know from the traditional
web the most most widely used one is just username password authentication now that does have fundamental problems just like phishing or password databases getting leaked all this kind of thing but it's even worse in a sense for a decentralized system because the main methods of password authentication or checking passwords that are used in practice require the password to be in clear for the check so either it has to be sent and clear or it has to be stored in clear there are some advanced cryptographic solutions that ease that requirement a bit but also they are not deployed they are not that easy to implement and start so in practice we have this requirement of having the password in clear for for the moment of the track
and that's of course a problem in a decentralized system where we need to assume that any particular node could be malicious could be trying to subvert the system if that node gets the user's password pretty much everything is lost so passwords don't really work for us then another thing that is used in practice quite often is sign in i call it sign in with big tech like you register with any one of those big tech providers you get a username from them and you can use those as an authentication service towards other websites and i think many users actually refrain from using that because of privacy implications like every single sign-in on you're going to do is going to be
visible to whatever major provider you're using but i think in terms of decentralized systems there's even a more fundamental problem which is you're essentially delegating verification of your identity to one single entity and whatever services you use your identity on um they so the provider you're using could you could subvert your identity they could impersonate you uh toward those websites you're using um that service for and that's not necessarily a problem if you trust that provider but it also isn't very compatible with a decentralized system if we build a
single point in trust in authenticating users so that's also not really an option so instead what we build on is not a surprise for anyone working in blockchain proper cryptographic authentication using digital signatures but also there like user experience hasn't been exactly great right so we know lots of cases where people got got their computers hacked keys were stolen they lost huge amount of amounts of money or cases where people protected their keys a bit too well and then they lost access to the keys and now they lost some 200 million dollar worth of bitcoin
so managing cryptographic keys is actually hard so there's a good question of why do we think that using this type of authentication which is a bit tricky on the user side would be a good idea to use in a scalable blockchain that is supposed to be used by users that don't have any clue about cryptography less than probably all those people here that lost their cryptographic keys [Music] and the answer is is what i'm going to describe in the next 10 or 15 minutes it's what we call internet identity and internet identity is based on three main technology technologies the first one is web
authentication which i'm going to explain but we use that to actually keep the user's keys secure the second one is we're going to manage access through a canister smart contract so that's a decentralized way of managing the user's access to to the to the system and the third one is specific cryptography that i'm going to explain on a high level which is based on threshold signatures now before i dive into into the technical contents just wanted to ask you for a show of hands like who of you uses a mobile phone or computer that has some way of biometric authentication like fingerprint touch id face id or windows hello or something
okay so that's vast majority who if you use um a usb security key such as nitro key or yubikey or so okay so if you showed hands that means that you can use web authentication who of you has been using that who of you has been using biometrics or or ub keys also to log into to applications by a browser okay so that's a bit less so you already use web with very high probability you already use web authentication today if you answered yes to the first question you could use it it's actually very simple it just comes with your browser so web authentication is a standard from the w3c it's by now supported by all
major browsers all major operating systems and the core idea of the w3c or the core application of web authentication in the traditional web is as two-factor authentication so as a means to thwart threats like phishing or or leaked password databases and the way that web authentication is used is roughly as follows so the user will still usually use their username and password as a first means of authentication to the platform and then the web server will send a challenge which is just some random bits the user's end device will then give that to to the user's security token
which could be as shown here an explicit usb device it could also be a tpm some secure chip built into your phone or computer so that doesn't really matter i've just turned it here to to simplify the diagram and that security token creates a response that the user's device sends to the web server so that means in order for this flow to work we need user interactions so usually if you have a ub key like this you need to tickle it so that it would send the response if you use your computer or phone you need to show your face or touch the fingerprint sensor and what happens inside this device is really just a digital signature so this device has a
digital signature key inside a private key that you use for the signature and it really just gets the challenge signs the challenge and sends it back and so in the inner computer we use a slightly different flow because in decentralized systems the challenge doesn't really make sense but for authenticating the the messages that we send to the internet computer all we need is that this thing does a digital signature right so that's all we need it does some weird formatting around it but at its very core it's just that very basic cryptographic building block and what is really great about these types of tokens the these are usual also uh you called fido tokens or phytotutor tokens um
that that are used in web authentication what's great is that they usually never let go of the user's key so whether you have malware on your machine whether you have a malicious operating system that always doesn't matter there's no way that the hardware as long as it behaves according to specification there's no way the hardware will let go of that private key that of course is great for security at least the worst of all attacks which is leaking the private key is properly prevented in that case but this great property also makes things a bit difficult suppose we use the the digital signature key to control a huge amount of tokens
and then it's on your phone and you drop your phone into one of the beautiful swiss mountain lakes you may just have dropped a ton of tokens with it so we can build on web authentication but we cannot completely build on work authentication what we do in addition is as i said we build on smart contracts so internet identity is based on a smart contract that users can use to register multiple devices under the same identity so this smart contract runs on the internet computer it's controlled by the decentralized governance system so it can be updated it can be upgraded we can release new features but all these features
need to be supported by the decentralized governance system so when we want to add more functionality to the to the smart contract which is developed in open source everyone could contribute there then we need to make a proposal to the governance system of the internet computer in order to upgrade this this kansas smart contract so there is no central control it's fully decentralized and as i said here on the user side the user can now register the public keys of various devices under their identity record in the internet identity canister which means if you control your phone you can authorize your laptop to also be usable for authentication and then you can authorize your
ubi key to also be used for authentication and if you drop your phone into a lake that doesn't really matter because you can just any one of your other use any one of your other devices to remove your phone buy a new one and register the key of the new phone and what is important here is that the only thing that is stored in the canister is a list of public keys there is no additional information stored about the user it's just randomly looking public keys so in particular even if you use biometric authentication that's an operation that is that happens purely on the device that information about your your like biometrics never ever leaves your device only a cryptographic key is used in the
decentralized system so in order to to explain the the final ingredient for internet identity i need to explain a bit more about the internet computer so the way we scale is by building parts that are usually called charts and other blockchains we call them subnets that each build their own blockchain so we can scale by adding more and more subnets and each of the subnets and this is very specific each of the subnet has a threshold signature key which means the subnet itself can create little signatures but the the private cryptographic key that is needed
for creating the signature is never ever stored in any one place it only exists in a distributed way across all those nodes in the subnet and it needs two thirds of the nodes of the subnet to create a digital signature the key is also generated in a decentralized way so there are we run the protocol between nodes in order to generate this random cryptographic key it never ever exists in one central place it only ever exists decentralized in that subnet and the advantage here is that a user can now for example send a request to any canister smart contract running on that subnet
and that cancer smart contract can can respond with a signed response so in contrast to say bitcoin or ethereum if you want to really for sure know the state of any particular for example smart contract and ethereum you need to validate the blockchain you need to have a copy of the blockchain you need to validate that the computation is correct only then can you be sure that whatever the smart contract responded was was indeed what it should have responded here it's different here all you need to validate the the correctness of the response is you need that threshold key you need one cryptographic key and then just a digital signature and that's it
that makes it makes it a lot easier to actually validate information that comes from the internet computer and that may seem subtle at first but it has profound implications so just think about possible applications one one detour mentioned yesterday there can be a contract a smart contract that runs on the internet computer that actually holds bitcoin and that's not red bitcoin with an intermediary sitting somewhere that's the smart contract effectively holding a cryptographic key distributed across the subnet it's running on and that cryptographic key can be used to sign transactions on the actual bitcoin blockchain so there's no wrapping it's really direct cryptographic integration or think about a x509 certificate authority
running in a smart contract providing certificates that can be validated by browsers like without any additional software again just a smart contract doing digital signatures support these types of operations or think about documents signed by a smart contract after some specified condition is met maybe a certain number or a certain group of people has agreed to sign maybe it's about time to sign maybe the bitcoin value reached a certain limit and now the contract signs the document like multiple things are possible and before i uh let you go off in your imagination of
what you could build on these functionalities i want to show how we use them in internet identity so the idea here is that the internet identity canister also has access to such a threshold signature key and now a user using their devices using their web authentication keys that they have on their devices they authenticate toward the internet identity canister smart contract and the canister smart contract will then sign a message and send it back to the user and this message will be usable for the user to authenticate toward other smart contracts running on other subnets on the internet computer and this flow may look familiar to you if you know saml pretty old protocol but still useful for
for single sign-on services for example this is a very similar flow in some of this this signature from the identity provider is called an assertion if you know open id connect it's a slightly different particle flow but kind of the same idea and they they call this thing a token if you know kerberos the very very old authentication solution um that's called a ticket so the flow itself is pretty well known um it's a bit specific for us because we bind to a cryptographic key on the client side instead of just having the token alone as being valid that's just due to how we then authenticate the messages that the user sends to the subnet because we don't have a state for connection we only process signed transactions
um good so that's pretty much all i wanted to to say today maybe to add to add two more things here on on internet identity on the development side i already mentioned that is open source but also there's no need to actually use internet identity if you don't want to within our computer it's just one solution that you can use for authenticating towards smart contracts we think it's a good solution we think it's a great solution but if you don't want to use it there's no harm you don't have to there's other solutions fleek provided the plug wallet for example you can use those solutions as well to authenticate to smart contract if that's what you prefer and the third one is
the internet identity canis that we build is purely based on functionality that is available to any smart contract on the internet computer so if you want to build your own with improved functionality and and give that to the world great just do so it's all built as a set on on functionality that is publicly available it's not a central component or any or anything like that we of course want to go further with internet identity so one thing is web authentication works great for users that have devices that support it but it seems that especially in some parts of the world that's not always a given and right now those users cannot use internet identities so what we want to improve is ways to preserve security
but also support devices without web authentication we want to improve privacy protection so right now we have privacy protection under kind of strong assumptions and what we want to do is we want to be able to weaken the assumptions we have to make in order to have a good privacy protection for the users but that requires better cryptography on on the authentication side and we want to support better means of account recovery because right now it's all bound to your devices if you only have two devices and you lose both you lose your account so we want to build mechanisms that are based on on identity verification so that if you are able to very validate your identity you would be able to recover your account
and finally interoperability with standards outside of the ic so what we've built in web sorry in internet identity so far works great within the internet computer it does not really work that great right now with the with the ecosystem outside of the internet computer so that's also one one aspect which we want to improve [Music] yeah that's all i have for today i think i may have a minute for christians if there's specific questions otherwise i'd be happy to take them in the end i was asking
[Music] through dfinity will be finally be able to retrace where our data goes and allow companies that want to use our data or even sell our data to them this will be the big security we can have and we can check where our data goes because we know nowadays we are the products and we will get nothing in return so first of all we try is here to minimize the data that we have in the system right so we try to not ever collect data that we don't absolutely need like cryptographic keys which we need so i don't see this as a solution right now for managing personal data at least that's not where we think we want to
take internet identity in the short term but it's imaginable that one could build a similar service that takes these aspects into account right although i mean it's kind of interesting also if you like if you want to sell it it needs to be secret before you sell right right but for this i think you always need need confidentiality for the data in the first place and um so right now
the data we have sits on the blockchain so the nodes that process these transactions they see that data so the data that we have is currently not private that's why we absolutely try to minimize whatever we can in that sense i think there's it's the kind of an endeavor to build such a system where you where you actually have that data private because like where you collect data in a way that is private but still sellable um it's not in scope of internet identity right now thank you