The challenge of digital assets custody
ETHCC 3 · March 2020 · 29:37
Charles Guillemet examines the challenges of custody for digital assets.
Speakers
Topics
From ETHCC 3, hosted by Ethereum France.
Transcript
you know everyone I'm I'm CTO at leader and my talk is about I'm going to talk about the challenge of digital asset custody a quick word about me I my background is about the security and cryptography I worked in this industry for more than ten years and I joined Ledger two years ago when I created the dungeon you probably heard about us we this is the internal security team at ledger and their mission is to improve the security of ledger products and as a security expert I can say that the best
way to have a secure product is to try to break them and this is what they do day to day they try to to break our product and when they find vulnerabilities they worked with the design team to improve the situation the product they also worked on raising the bar for security in the ecosystem and we worked on evaluating some other other audit and so on and we helped the other vendor to improve the security basically then my mission changed a bit and now I'm in charge of security engineering and infrastructure so let's start I'm going to talk about the digital asset
class DG and the associated threat model then I'm going to give an overview of existing technologies and finally I will talk about the ledger technology ledger security audit technology and how we use this technology to enable digital asset custody the primary role of digital estate custodian is to mitigate the operational risk in event transaction on blockchain blockchain is is a fantastic technology but in terms of security it push the security to the end-user and also you
cannot be ver transaction so the problem of security in blockchain is higher than on any other application and when you are Castilian you have two main challenges the first one is to secure assets at rest basically you just have to save to perform the safekeeping of private keys and also you have to take care of the challenge of securing asset in transit meaning that enforce strong governance workflows for securing transaction today custodian used this kind of scheme hot and cold wallet scheme when I say hot
and cold I'm not talking about online offline or perdón operative this is what about out to you out they used the wallet the cold wallet on the cold water they put the large majority of the asset and there is a very low transaction volume and they want to other way to ensure that the cold wallet can only transfer assets to the hot wallet and on the hot wallet they use a hot word for liquidity management so there are large volumes of transaction and they also use a programmatic indirection that they want everything to be kind of automated and they also implement automated automated controls
flow and on the cold wallet side they often rely on physical access and processes human processes and they often want to combine multiple approvals were at least all this kind of of governance so associated to this the custody the register G our operational threat they are the sweat can be divided in three main categories there is first with the wallet security the malicious insider threat and also phishing attacks when you design a wallet there are
plenty of things which which can't go wrong it's it's it's quite difficult you have to take care of the cryptography and software security implementation a tiny mistake can lead to to the loss of all the fans you probably know a nonce we use a Tarkin and this kind of this kind of vulnerability also when you generate keys having a high quality one the number generator is very important otherwise you might have some problem you also might want to use a CG Enclave when I say second clave you want to have something a very secure on which you put your keys and the keys never leave this
device also you probably want to have strong branches on the genuineness of your wallet and also the about the integrity of the code winning on this wallet I mentioned the case of Trinity they didn't check the integrity of the code winning on their wallet and they was using third-party code the third-party code has been malware and then the attacker had an access to all the wallets of a lotta users also you might want to take into account the sweat of an attacker using a physical access and all having everything and putting everything together
makes the the task of designing a wallet quite difficult also there are phishing attacks in this case it's more about the security on the client side of the credential of the clients are secured as the user when I make a transaction how can I be sure that I'm signing what I think I'm about to sign how can I be sure the the amount I'm signing is the right one I'm how can I be sure the recipient and the receiving address on have not been swept so what what kind of grants is do I have on what a young signing
and and the last class of threat is the most difficult to mitigate the concern inside a threat as a custodian how can I mitigate the risk of malicious insider inside my organization it's a very difficult task I'll do I mitigate the fat-finger all I wanted to send 180mm and I wrote 1,000 how do I mitigate the risk of malicious developer of the wallet the threat of more organizational I would say but very difficult to take into account now I'm going to give an
overview of Q and the Q study technologies and what are the pros and cons of each of them so as I said before we can divide the usage on cold storage and a hot stove on the cold storage there are several solution you probably have heard about the cooler shell protocol so groschopp protocol is is a famous way to to do cold storage for your asset on the pro side it's open source and it's always disconnected from the internet on the drawback side it's very complicated to set up and maintain
and as a security expert I can say that complexity is the enemy of security it's always a bad way to have a complex security solution also the security is only based on physical segregation processes you have to use USB stick hover over it and father cage and it's not very convenient and when security is not convenient users find a way to bypass the security to get better a better user usage and it's it's not good for security it's often it's slow to perform transactions you need to be to be close to the to your device for
for approving transaction and so on for cold wallet also we see a lot of financial institution which use Hardware wallet for you for the cold wallet on the poor side it can be very cold you can put all you are set in an NOS and put your own in OS in a physical vault in the Swiss Montaigne so it's in this case very cold you also have the trusted display which is what you see is what's your sign and it's it mitigates the phishing attacks so it's a good property and you also have intrinsic resistance in the sense that if you give yoni noise to another care it's going to be very
difficult to extract the keys which are inside but this isn't that true for whole hardware that I would say on the con side you don't have any covenants you will have human processes to manage your asset and it's very retail oriented it's not designed for a financial institution if we look at hot wallet solution in order to implement governance you can use unchained melody' signature it's it's great because it removes the single point of failure there is no it's not possible for a single user to manage the fans of the
organization so it's a good property but another drawback is there is very few governance you only have the ability approval but it's only a small part of the solution you still need some white listing and and this kind of feature and also it's a blockchain dependent you have a PS BG for Bitcoin you have the the smart contract for a theum and on any kind of blockchain you will have another solution and it's not very scalable to solve this issue some company developed and MPC based the wallet for autopilot again it removed a
single point of freedom a single user cannot access to all the fans and it brings some cryptographic branches and in this case it's a black shiny agnostic MPC Tresor signature only depends on the signature scheme if you have a set P 256 k1 or even if you have an ECG CGS a Tresor signature you can use it for any block chain using ECDSA basically so for this it doesn't its blockchain agnostic but the cons side again it's only a small part of this of the solution you
still don't have white listing and so on and you don't have a choice to display neither and it's not you don't you doesn't that you don't mitigate the risk of phishing attacks also the current solution are very synchronous they require much multiple wound of interactive communication and sometimes it's it's not very convenient so it's very hot in the sense that it's very online and also they are very strong when you read the paper there are very strong assumption on on the participant of the truthful signature you must have a public infrastructure and you must be
able to establish secure channel between participants between each party and I think reliable broadcast channel and in practice it's never met queuing time pc-based the solution does not as far as I know implement this kind of puja and in terms of security I would say that the solution didn't pass the test of the time the test of time and cryptography is hard implementing it is also very hard and when you want to have grantees and security especially for cryptography you need to pass the
the test of time today we can see several company building security solution based on NPC and they are implementing article which have been published one year ago and from my perspective it's a huge risk on the hot water side there is also some exchanges for Firefox for instance implement custom platforms and they have a very tailored solution very well fitted for the particular need drawback could be it's very costly implementing hot water to securities is a full-time
job and it's very very difficult on the security side it depends on the implementation of course it's often very software based sometimes they use some kind of Enclave but the Enclave on that or equal if you use s GS o or chosen it's it's difficult to to to a secure solution there are multiple attacks on them and also they often rely on human processes and it's it's not ideal now I'm going to to to give an overview of ledger secure hardware technology I
will use hardware to build our product ledger is a security company and to to be very synthetic I would say that we leverage hardware security to to build a security solution and in particular we use secure element and HSN and we have designed a secure channel to communicate between secure element and HSM a secure element is a chip dedicated for security it has a very small attraction face this is a the same chip that we can find in smart card if you if you so the
the talk before it's designed to provide an intrinsic resistance against an attacker meaning that you can give a secure element to an attacker and it's going to be very very difficult to extract the secret which Ironside and also it's well organized in the street they organize security certification process for secure element to get this kind of static certification they have to go through a third party security evaluation by an audited lab and this this is very costly and it it takes a several month and at the end of this process if everything is okay if there
is no more of an ability everything has been patched and so on the lab issue a report and an independent third party certification body will give a certificate this kind of secret is used in banking card and passport and when you have to manage secret on the field this is the this is the best way to do that on the other side we'll use HSN as I said HSM stands for hardware security module this is a physical computing device it often comes as a PCI card or a network network appliance it contains
crypto processor and OMG tampering countermeasure basically it's a secure Enclave that we can use to store and process sensitive data it can complete cryptographic operation it can generate keys and and assets in it's an enclave the kids never leave the device and you can use it to sign transaction or anything in most case HSM use pictures yes you have an interface but as it does not fit with our needs we completely disabled this interface and we use it we use it more as a city
Enclave and not as in the traditional way it's defined it's used in many application all the public infrastructure and banking telecom basically when you do an HTTP request there is some where and HSN which will sign your challenge when you do a transaction with your banking card there is a and there is an online call somewhere in the world there is an HSM which will verify the signature of check of your Cal so HSM are widely used in in the situation distri and they are used as root of trust on our secure element
and on our HSN we have designed our operating system we use the native open platform and we can load third-party code we can load application on the secure element and script on the on the HSM both target are very different but our operating system of similar offset of API most of this API is our critter graphic related and we can use the API to design a secure channel protocol and secure channel protocol is a way to communicate from the secure element to the HSN and it's a secure way to do that
I wanna say is secure I mean three different properties the first one is authentication the translation means that the secure element is able to prove to the HSM it's a genuine one to do that when we manufacture manufacture our device the situation and will generate a pair of keys and the public part of the cheese will be signed by a by our HSN and it's this is called an attestation and we put the attestation in the city remained and as the C tournament is a secure Enclave on which is very difficult to extract secret you are a cryptographic proof that the secure element is a is a
genuine one and we have the symmetric mechanism for the HSM to prove to the security man it's a genuine one when you have a net worth on situation mechanism you are able to perform an elliptic curve diffie-hellman this is a famous protocol for key exchange and when you have a shared secret you can have the second security property which is confidentiality so we have n2 an encryption from the secure element to the HSN using this confidentiality property and the last security properties integrity we use some cryptographic mechanism which is
called mark to be sure that the message sent from one side to the other have not been tampered by by an attacker we use this technology on our Hardware wallet you know the Nino s it's the security properties of a very convenient because when you buy your hardware let you have a way to be sure that the genuine one because the hardware which is able to create a secure chat channel to G HSM and so it's impossible to interfere in nos or in the Novack's we also use this secure channel for the
firmware upgrade so we have and we use again the secure channel to upgrade the firmware of the device and also we use the secure channel for the application management on the case in the case of nano as the secure element is inside the device and you and the OS as well and you can load your own application like easier more SSH and so on and I'm going to explain how we used the exact same technology to enable digital asset yesterday this is called ledger vault ledger vault is a digital asset management platform it enables custodian to build their own security solution and
to manage the fund and when I said said managing fan that there's two properties the first one is to safe keep safe keep the private keys so the keys are in in an enclave and they never leave the Enclave so we use HSM implementation for safekeeping the the private keys and to generate keys securely we also have an audited cryptographic stack and we also use this mechanism to mitigate the the threat of digital asset management providing a way to our customer to build a governance layer so our customer can segregate the
wall in their organization they have shared owners administrator and operators and the administrator can give some white to the operators maybe they will they will say that this specific group of operator I can access to this very wallet and if they want to make a transaction they can do a transaction of 100 Bitcoin a day with will she approve all to three out of three out of five and only to G's address and so on all this kind of governance is possible with with this security solution and this governance layer is implemented directly in the city Enclave so as I said we use HSM and secure element on the HSM side
we implemented all the application logic directly in the HSM the cryptographic stack is implemented in the HSM everything blockchain related when you want when the transaction is actually signed it's signed by the HSM but also the governance layer is implemented directly in this city Enclave we have a cryptographic either ation of scripts and also we have a way to prove that the device are genuine and the code has not been tampered it's insured by cryptography or HSN also embeds a decision so that we can be sure that the HSN to which we are
- is is a genuine one and also to mitigate the risk of the insiders in in the developer side we have missed a signature mechanism to upgrade or HSM we also have limited the attraction phase removing the ptsds 11 interface and the main interface to the skills with the HSM is the secure channel on the other side we have the secure element the secure element is used for different thing so we provide to the users operator and administrator personal security device in this security device
there is a secure element and it's used to generate high quality on random and also to provide a secure display so you have a way to be sure that what you see is what you sign and it can be used for approvals and administration again there is a very reduced detection faced Scituate Ament has very few interfaces and again we have cryptographic way to prove the device are genuine and the code has not been altered again the same technology as the newest the secure channel is mounted from the HSM to the PSD and will use the secure channel to
authenticate device and thus to authenticate users so we have sexual approvals using the secure Channel and also we use the secure channel for the complete confidentiality of the communication all the data in transit between secure element and HSM is a cryptographically secure to conclude we built the ledger of vaults using the same technology will build on the hardware wallet and it enable a custodian to have in the same platform the cold wallet and hot wallet management they can put the majority of
asset the cold wallet and implement whitelisting and all the governance to enable only transaction for cold water to the hot wallet and on the hot wallet side they can they can implement less governance and a low automatic transaction and so on using api's on the security property side we have the security secure display what you see is what you sign it's very important we also have the trusted execution which mitigates the risk of spoof spoofing and fishing and it allows to implement a flexible governance the inside the
security the security also gives grantees on the confidentiality of the keys again there is this cryptographic authentication which allows the user to authenticate using the the the PSD and not only credentials and finally we have the genuineness of devices and integrity of code winning on this Enclave which is again a very important properties it mitigates the threat of having a wall malware directly inside the wallet and finally our customers of full control because even ledger has no access to the fund of the customer because all the
data of the customers are encrypted inside our solution using the customers keys basically this is the end of my presentation if you have a question I will be happy to answer them thank you very much questions no one time for lunch now we've got two more after this well second round of applause then [Music] [Applause] can we get our next speaker up here
please