Yoroi Wallet Security

EMURGO
EMURGO Annoucements
6 min readMar 29, 2019

Yoroi, the light weight Cardano wallet, derives its name from the incredibly ornate ancient armor worn by Japanese samurai. The armor was a combination of iron and leather exquisitely constructed over nearly a year. This article explores some of the security centered features, and core technologies, behind the modern armor designed for your web browser and ADA funds.

There are a number of browser based wallets for both Cardano and other cryptocurrencies. Some browser based wallets are websites that you have to access on the public Internet, while other wallets are actually extensions that you can install on your browser.

EMURGO, as the official, and commercial, venture arm of Cardano — the first peer-reviewed third generation blockchain — chose to develop a browser based extension due to a number of security issues with web based wallets. Often times, unofficial web based wallets will encourage you to run a local copy of their Javascript code to create your private key and password; there is no guarantee the code is clean and most people don’t want to have to look at every line of code themselves. In contrast, Yoroi has been developed by the official organizations behind Cardano, namely EMURGO and IOHK. Furthermore, there is no guarantee that a website based wallet won’t quietly get hacked, or snooped on, by a third party at some point, given the tremendous incentive to do so.

Another reason EMURGO chose to create a browser extension was due to the cases where DNS hijacking occurred and people were redirected from a wallet to a different website that stole their money. Typos of a website domain name can also lead to similar issues. An extension doesn’t have this problem.

Similarly, people have linked to fake versions of Daedalus where the application people downloaded was actually a virus. Yoroi doesn’t have this problem, however, since the Chrome store ensures you download the right application.

The fact Yoroi runs in Chrome allows us to develop faster as there are well-made APIs we can rely on and it also protects the user as the extension runs inside its own sandbox. Chrome, in general, makes it easier to inspect packets so you can check that Yoroi is not sending your private key to our servers. With the Chrome developer tools you are able to see exactly what data is passed to the EMURGO/IOHK servers.

Select the Network tab from the developer tools main menu and you can see the polling process, for example. The Yoroi wallet will periodically send your wallet address to our server ask for all transactions that have occurred since the wallet refreshed. Currently, Yoroi has to poll the our servers to get your transaction history and to execute transactions. You can see all of the HTTPS POST requests in the remoteFetcher.js file.

The Chrome permission system also lets you know exactly what we have access to. Yoroi currently asks for permission to access webpages to facilitate hardware function functionality.

Some wallets, inject javascript into every page you visit in order to interact with dapps hosted on websites. Wallet interactivity with websites is important for distributed app usage and helps drive adoption of the underlying cryptocurrency, but Yoroi does not currently do this. We do however integrate URI scheme so that Yoroi can have similar functionality without exposing wallet addresses, or transaction information, to every site you visit.

Understanding the risks of a hot wallet mean you have to understand your responsibilities as a user. Your encrypted private key is stored in Chrome’s local storage space. Storing your encrypted private key locally means you actually own your ADA. However, it is also important to secure the computer on which your wallet resides.

If you can dedicate an entire machine to your Yoroi wallet, trading activities, and other crypto funds, then that is ideal. If you can’t do that then you may want to use a virtual machine for web browsing, torrents, or streaming media in addition to using an effective antivirus program and an adblocker. Making sure your machine is on an isolated network from the rest of your family, or office, also reduces your risk.

Your encrypted private key is safe with Yoroi, but, as stated above, you have to be extra careful about creating a secure environment where no one can snoop on your wallet password when you enter it. Your wallet password is different from the 15 word recovery phrase. Your private key (generated from the recovery phrase) is encrypted using the your wallet spending password. Even if someone physically steals your computer, they will not be able to access your funds whereas you can simply install Yoroi on another computer and use your 15 word recovery phrase to access your funds as that phrase gives you direct access to your private key. If you are curious, you can learn more about the cryptography used to encrypt your private key here.

Currently, Yoroi supports the HD Wallet format with multiple wallets on one instance. You can generate as many arbitrary addresses as you like using the “Generate new address” button which helps helps maintain your privacy since it’s hard for outside observers to tell two separate addresses belong to the same user.

Yoroi supports importing Daedalus paper wallets along with Yoroi paper wallets. Yoroi supports both Trezor and Ledger hardware wallets. Storing your keys offline and using a light wallet when needed for smaller transactions can provide both extra safety and ease of use.

There has been a significant push in the cryptocurrency industry to adopt secure languages for development. Rust is generally considered to be one of these secure languages. In order to connect Yoroi to the Rust cryptography libraries, WASM is used. WASM, also known as WebAssembly, is a way to run code sandboxed in a virtual machine contained entirely within your browser. It is designed to work easily with languages such as Rust. It has some security features worth noting for those technically inclined:

WASM is strongly typed, and memory is limited/sandboxed to a javascript array buffer, so WASM cannot access memory out of bounds or access other Javascript memory. The Cardano-Rust code is compiled to WASM and then called through Javascript bindings. These WASM bindings are automatically generated to ensure the code runs as intended.

EMURGO’S lead developer, Sebastien Guillemot, says that, “a lot of blockchains are now using Rust since it allows for very fast execution, and good support, for avoiding memory problems at compile time, along with good interoperability with WASM.”

Hopefully, now you have a better understanding of the security features, and components, behind the Yoroi light wallet. The developers at EMURGO are thinking about security first when it comes to the Yoroi. Explore the Yoroi source code on github or visit Yoroi.com and install the extension yourself today.

About EMURGO
EMURGO drives the adoption of Cardano and adds value to ADA holders by building, investing in, and advising projects or organizations that adopt Cardano’s decentralized blockchain ecosystem. EMURGO leverages its expertise in blockchain R&D as well as its global network of related blockchain and industry partners to support ventures globally.

EMURGO is the official commercial and venture arm of the Cardano project, registered in Tokyo, Japan since June 2017 and in Singapore since May 2018. EMURGO is uniquely affiliated and works closely with IOHK to grow Cardano’s ecosystem globally and promote the adoption of the Cardano blockchain. To learn more about the project, visit the EMURGO website.

|| Click here to subscribe to the EMURGO Newsletter ||

Follow EMURGO on Social Media
・Official Homepage: emurgo.io
・Twitter (English): @emurgo_io
・Twitter (Japanese): @Emurgo_Japan
・Youtube: EMURGO
・Telegram: EMURGO Announcements
・Facebook: @emurgo.io
・Instagram: @emurgo_io
・LinkedIn: @emurgo_io

About Yoroi Wallet
・Yoroi Twitter: @YoroiWallet
・Yoroi Homepage: https://yoroi-wallet.com/

About Cardano
・Cardano Forum: https://forum.cardano.org/
・Cardano Telegram: https://t.me/CardanoGeneral
・Cardano Reddit: https://i.reddit.com/r/cardano

--

--

EMURGO
EMURGO Annoucements

EMURGO drives the adoption of Cardano and adds value to ADA holders by building, investing in, and advising projects that adopt Cardano’s blockchain ecosystem.