Talisman’s Security Model

Talisman
We are Talisman
Published in
6 min readOct 12, 2022

by Warp Lizard, Lead Engineer at Talisman

Overview of our security model

The main job of a cryptocurrency wallet is to securely store your private keys and allow you to sign transactions with them. Typically, the keys are stored in an encrypted form on disk and the wallet application requires a password to decrypt them for use. Different wallets have slightly different mechanisms for this. In Polkadot.js — which Talisman is originally based on, and still uses many components from — the password is required to decrypt (or ‘unlock’) the keys, and then the key is stored in the extension’s memory for a period of time until it is automatically locked. When a new account is created, the user is required to enter a password to encrypt it for the first time. This means that every keypair can potentially be encrypted with a different password.

Talisman has taken a slightly different approach. Although we still use the same keyring library as Polkadot.js — which requires that every keypair be individually password protected — we prefer to allow the user to have a single password to access all of their accounts and to reduce the number of times the password needs to be entered. In order to achieve that, the extension needs to store the password itself in memory so that new accounts can be created with that same password. When you log in to Talisman your password is checked by attempting to decrypt one of the encrypted accounts, and if valid is stored in a sandbox for the extension in the browser’s memory until you lock the wallet or your auto-lock timer expires. The password is never written to disk. When you approve a transaction your key is unlocked using the stored password, used to sign, and then immediately locked again. This removes the need to enter your password every time you sign a transaction, unlike in Polkadot.js.

How about the recovery phrase (mnemonic)?

When you onboard to Talisman and create a new wallet, a secret recovery phrase is created for you and stored in the extension’s local storage. If you onboard by importing a secret recovery phrase it is stored in the same location. Before storing, this data is encrypted using your password as the encryption key. When you want to export your seed phrase we require you to enter your password again as an additional security measure before we unlock the secret recovery phrase.

Is it safe?

Like all security design decisions, there are tradeoffs between security and convenience. Storing your password in the extension’s memory means that an advanced attacker with access to your computer while the extension is unlocked could potentially dump the memory of the extension and find the password. A similar vulnerability exists for Polkadot.js, although in that case, the attacker could only access the private keys of any unlocked accounts.

In order to mitigate this vulnerability Talisman has recently implemented an auto-lock feature, which clears the password from the extension’s memory. Because we like to give our users control over their security choices this is not enabled by default; however, we recommend users enable this setting. In the near future we will also be shipping another security improvement where we will hash the password before storing it in the extension’s memory. While it would still be possible for the hashed password to be retrieved via the same method, it would mitigate the risk by making the password harder to identify amongst the dumped memory data, and also reduce the impact of a password which was used on other services being leaked.

While we provide the best tools possible, we also expect and encourage users to take responsibility for their own safety with the knowledge that no system is perfect. For this reason, we encourage users to follow best practices such as:

  • Using a strong password
  • Enabling the auto-lock timer
  • Manually locking the extension in any situation when someone else might have access to your computer
  • Ensuring that your password and secret recovery phrase are not recorded anywhere else
  • Ensuring your computer is free from malware

External data logging

Talisman uses external services for the purposes of error logging and user analytics on an opt-in basis. Error logging is carried out using Sentry so that we are aware when there are bugs in our software and can track down what went wrong. For user analytics, we use Posthog. User analytics enables us to track which features are being used, and how, so that we can respond to user needs and ensure we are developing the best product. When you onboard to Talisman you are able to opt in or out of these services, and later, when using the extension, you can individually choose to opt in or out in the ‘Security and Privacy’ section of the settings. If you opt out of both forms of tracking, Talisman will not perform any tracking — opting out really does mean opting out.

Both of the services we use have been set up with the absolute minimum configuration required to get the information needed. We have been especially careful to ensure that no personal identifying information or sensitive security information can be leaked via these services by carefully implementing them in the application itself, and also enabling data scrubbers on the backend to ensure that if any sensitive data is accidentally sent, it will not be recorded. We appreciate that our users want to assist us to develop the best wallet and trust us to respect their privacy in doing so, and the majority of new users do choose to opt in to tracking.

Our response to the Slope hack

Earlier in 2022, a major Solana wallet called Slope was hacked and users’ funds were drained. The exploit involved Slope logging private keys to the Sentry error tracking service (@zellic_io provided a good analysis here), which is the same service we use for tracking application errors. While we had already configured Sentry with a very minimal and privacy-aware approach, we responded to this news by completing an internal audit of our implementation of Sentry. We found that no sensitive information had ever been logged to Sentry, and we ensured that Sentry error tracking was absent from any parts of our application where it may have been possible for sensitive data to be logged. We also set up additional data scrubbers on the Sentry backend and tested them by manually attempting to send sensitive data to the Sentry service. If you still feel uncomfortable with logging data to Sentry, you can always opt-out in the extension settings, but we hope that you’ll keep this setting turned on so that we can keep tracking bugs and make our wallet even better.

About Talisman

Talisman is a web3 wallet that unlocks a universe of applications in Polkadot and Ethereum. The Talisman browser extension allows you to safely store, send and receive assets. Use it to connect to applications across Polkadot and the Parachains.

Talisman is non-custodial, audited, supports Ledger devices and is also Ethereum compatible, letting users store, manage and transact with Polkadot and Ethereum dapps.

Download | Web App | Twitter | Discord | YouTube

--

--

Talisman
We are Talisman

Talisman is a community-owned wallet built for a multi-chain future