SlideShare a Scribd company logo
Crypto Wallets Security


for developers
Julia Potapenko
Security Software Engineer
Julia Potapenko


@julepka
We help companies to
protect their sensitive
and valuable data.
OWASP Zhytomyr Leader.
Contributor to OWASP security
standards and guides.
Women Who Code Kyiv Director
OWASP


Open Web Application
Security Project
A nonpro
f
it foundation that works to
improve the security of software
OWASP Top 10


OWASP ASVS


OWASP WSTG


OWASP MASVS/MSTG
https://owasp.org/www-project-mobile-security-testing-guide/
https://owasp.org/www-project-application-security-veri
f
ication-standard/
https://owasp.org/www-project-web-security-testing-guide/
https://owasp.org/www-project-top-ten/
Today we will talks about


#cryptocurrency_wallets #sensitive_assets


#authentication #local_storage #platform #cryptography


#dependencies_management
How does it work?
Your account = your seed / private key


Loosing seed / private key = loosing the account


Wallet gives access to several accounts


The main challenge is to secure seed / private keys
Cryptocurrency wallet types
Custodial


third-party storage
Non-custodial


user-controled
Cryptocurrency wallet types
Custodial


third-party storage
Non-custodial


user-controled
Hot


online
Cold


of
f
line
https://www.wired.com/story/hack-binance-cryptocurrency-exchange/
Why should devs care?
https://www.wired.com/story/hack-binance-cryptocurrency-exchange/
https://www.bbc.com/news/technology-59549606
Why should devs care?
https://www.theverge.com/2022/1/24/22898712/crypto-
hardware-wallet-hacking-lost-bitcoin-ethereum-nft
https://www.wired.com/story/hack-binance-cryptocurrency-exchange/
https://www.bbc.com/news/technology-59549606
Why should devs care?
https://www.theverge.com/2022/1/24/22898712/crypto-
hardware-wallet-hacking-lost-bitcoin-ethereum-nft
https://www.wired.com/story/hack-binance-cryptocurrency-exchange/
https://www.bbc.com/news/technology-59549606 https://www.theverge.com/2021/11/4/22763015/cryptocurrency-
fake-wallet-phishing-scam-google-ads-phantom-metamask
Why should devs care?
https://www.theverge.com/2022/1/24/22898712/crypto-
hardware-wallet-hacking-lost-bitcoin-ethereum-nft
https://www.wired.com/story/hack-binance-cryptocurrency-exchange/
https://www.bbc.com/news/technology-59549606 https://www.theverge.com/2021/11/4/22763015/cryptocurrency-
fake-wallet-phishing-scam-google-ads-phantom-metamask
Why should devs care?
It is not about blockchain security.


It is about application security and user education
Cryptocurrency wallet types
Custodial


third-party storage
Non-custodial


user-controled
Hot


online
Cold


of
f
line
Coinbase wallet example
Similar to banking apps,
cryptocurrency wallets
operate user funds,
meaning security baseline
should be nearly the same.
Similar to banking apps,
cryptocurrency wallets
operate user funds,
meaning security baseline
should be nearly the same.
Threat vectors considerations


• Authentication


• Local storage


• Platform trust


• Cryptography


• Communication


• User education


• Supply chain
User Authentication
LOCAL VS REMOTE
If the app provides users access to a remote service, some form of authentication,
such as username/password authentication, is performed at the remote endpoint.


No sensitive data should be stored locally on the mobile device. Instead, data should
be retrieved from a remote endpoint when needed and only be kept in memory.


If sensitive data is still required to be stored locally, it should be encrypted using a
key derived from hardware backed storage which requires authentication.


– OWASP MASVS 4.1, 2.11, 2.12
User Authentication
LOCAL VS REMOTE
If the app provides users access to a remote service, some form of authentication,
such as username/password authentication, is performed at the remote endpoint.


No sensitive data should be stored locally on the mobile device. Instead, data should
be retrieved from a remote endpoint when needed and only be kept in memory.


If sensitive data is still required to be stored locally, it should be encrypted using a
key derived from hardware backed storage which requires authentication.


– OWASP MASVS 4.1, 2.11, 2.12
But what about deanonymisation?
Non-custodial wallets are usually fat clients
Password policy


Password rotation when leaked


Defences against brute-force attacks


Step-up authentication


Biometry veri
f
ication
User Authentication
Know your platform
What kind of storage should be used to deliver the best security guarantees?
Know your platform
What kind of storage should be used to deliver the best security guarantees?
Is it a
f
ile? Can you steal it?


Can other apps access it?


What about integrity?


And Encryption?
Know your platform
What kind of storage should be used to deliver the best security guarantees?
Is it a
f
ile? Can you steal it?


Can other apps access it?


What about integrity?


And Encryption?
It is a developer’s responsibility to
know how the storage works on the
platform you use.
000003.log is a storage
f
ile of web-extension. You can copy it from
one browser and paste into another.
Know your platform
Objection tool that allows to access Keychain of the device, no jailbreak required
Know your platform
Cryptography
How to encrypt the data with a password?
Cryptography
How to encrypt the data with a password?


You decided to pick AES. You need a key length of 256 bits but the
password is shorter.


You use a hash function SHA256.
Cryptography
How to encrypt the data with a password?


You decided to pick AES. You need a key length of 256 bits but the
password is shorter.


You use a hash function SHA256. KDF (Key Derivation Function)
Cryptography
How to encrypt the data with a password?


You decided to pick AES. You need a key length of 256 bits but the
password is shorter.


You use a hash function SHA256. KDF (Key Derivation Function)


Your pick PBKDF2. You need to specify number of rounds for it.


Similar to some example in the Internet you pick 2 000.
Cryptography
How to encrypt the data with a password?


You decided to pick AES. You need a key length of 256 bits but the
password is shorter.


You use a hash function SHA256. KDF (Key Derivation Function)


Your pick PBKDF2. You need to specify number of rounds for it.


Similar to some example in the Internet you pick 2 000. 310 000
Cryptography
How to encrypt the data with a password?


You decided to pick AES. You need a key length of 256 bits but the
password is shorter.


You use a hash function SHA256. KDF (Key Derivation Function)


Your pick PBKDF2. You need to specify number of rounds for it.


Similar to some example in the Internet you pick 2 000. 310 000


CBC or GCM mode? Random IV? … ? ? ?
Cryptography
How to encrypt the data with a password?


You decided to pick AES. You need a key length of 256 bits but the
password is shorter.


You use a hash function SHA256. KDF (Key Derivation Function)


Your pick PBKDF2. You need to specify number of rounds for it.


Similar to some example in the Internet you pick 2 000. 310 000


CBC or GCM mode? Random IV? … ? ? ?
Don’t roll your own crypto
Use Themis https://github.com/cossacklabs/themis
Use libsodium
Cryptography
Comes from mvayngrib/react-native-crypto library…


that uses react-native-randombytes library…


that uses Stanford Javascript Crypto Library (SJCL) for synchronous random
values generation.


React Native mobile
app example
Cryptography
Comes from mvayngrib/react-native-crypto library…


that uses react-native-randombytes library…


that uses Stanford Javascript Crypto Library (SJCL) for synchronous random
values generation.


SJCL random values generator relies on mouse movements and keyboard listeners.
React Native mobile
app example
Supply chain
Supply chain
Supply chain
Supply chain
Supply chain
How to identify a good library
Looks alive


Built for required platform


Easy to use, hard to misuse


Covered with tests


Documentation


Secure


Performance


Licence
https://snyk.io/advisor/npm-package/
react-native-sensitive-info
How to identify a good library
Useful tools
Automate and add to PRs


SonarQube


Snyk


Dependabot
Useful tools
Automate and add to PRs


SonarQube


Snyk


Dependabot
SAST (Static Application Security Testing):


https://owasp.org/www-community/
Source_Code_Analysis_Tools


DAST (Dynamic Application Security Testing):


https://owasp.org/www-community/
Vulnerability_Scanning_Tools
User is a single point of
failure
Non-custodial wallets security is the
user responsibility.
Useful links
[Article] Crypto wallets security as seen by security engineers:


https://www.cossacklabs.com/blog/crypto-wallets-security/


[Article] Security of React Native libraries: the bad, the worse and the ugly:


https://www.cossacklabs.com/blog/react-native-libraries-security/


[Article] React Native security: things to keep in mind:


https://www.cossacklabs.com/blog/react-native-app-security/


[Slides] Why can’t developers make it secure:


https://speakerdeck.com/julep/why-cant-developers-make-it-secure
Thank you!
Follow me on Twitter


@julepka

More Related Content

PDF
Cryptography
PDF
Kebocoran Data_ Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
PDF
Introduction to cryptography for software developers
PPTX
Crypt-Oh No!
PPTX
Crypto failures every developer should avoid
PPTX
Crypto failures every developer should avoid
PDF
When Crypto Attacks! (Yahoo 2009)
PDF
DEFCON 23 - Eijah - crypto for hackers
Cryptography
Kebocoran Data_ Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
Introduction to cryptography for software developers
Crypt-Oh No!
Crypto failures every developer should avoid
Crypto failures every developer should avoid
When Crypto Attacks! (Yahoo 2009)
DEFCON 23 - Eijah - crypto for hackers

Similar to "Crypto wallets security. For developers", Julia Potapenko (20)

PPTX
How to do Cryptography right in Android Part One
PDF
What Every Software Engineer Should Know About Security and Encryption
DOCX
Securing data at rest with encryption
PPT
Computer and Network Security
PDF
Reading Group Presentation: Web Attacks on Host-Proof Encrypted Storage
PPTX
Technology, Process, and Strategy
PDF
Security & Cryptography In Linux
PPTX
Basic Cryptography & Security
PDF
Eat Your Vegetables - Data Security for Data Scientists
PDF
Crypto Strikes Back! (Google 2009)
PDF
3. Cryptographic Security
KEY
Cryptography for developers
PPTX
big data and Iot , its security part ,hoe yoy help this
PDF
Java script and web cryptography (cf.objective)
PPTX
How to write secure code
PPTX
Protecting Sensitive Data (and be PCI Compliant too!)
PPT
Protecting Sensitive Data using Encryption and Key Management
PDF
Web Crypto
DOCX
cryptography in engineering related as software
PDF
Basic Security for Digital Companies - #MarketersUnbound (2014)
How to do Cryptography right in Android Part One
What Every Software Engineer Should Know About Security and Encryption
Securing data at rest with encryption
Computer and Network Security
Reading Group Presentation: Web Attacks on Host-Proof Encrypted Storage
Technology, Process, and Strategy
Security & Cryptography In Linux
Basic Cryptography & Security
Eat Your Vegetables - Data Security for Data Scientists
Crypto Strikes Back! (Google 2009)
3. Cryptographic Security
Cryptography for developers
big data and Iot , its security part ,hoe yoy help this
Java script and web cryptography (cf.objective)
How to write secure code
Protecting Sensitive Data (and be PCI Compliant too!)
Protecting Sensitive Data using Encryption and Key Management
Web Crypto
cryptography in engineering related as software
Basic Security for Digital Companies - #MarketersUnbound (2014)
Ad

More from Fwdays (20)

PDF
"Mastering UI Complexity: State Machines and Reactive Patterns at Grammarly",...
PDF
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
PPTX
"Computer Use Agents: From SFT to Classic RL", Maksym Shamrai
PPTX
"Як ми переписали Сільпо на Angular", Євген Русаков
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
PDF
"Validation and Observability of AI Agents", Oleksandr Denisyuk
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
PPTX
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
PPTX
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
PDF
"AI is already here. What will happen to your team (and your role) tomorrow?"...
PPTX
"Is it worth investing in AI in 2025?", Alexander Sharko
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
PDF
"Database isolation: how we deal with hundreds of direct connections to the d...
PDF
"Scaling in space and time with Temporal", Andriy Lupa .pdf
PPTX
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
PPTX
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
PPTX
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
PPTX
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
"Mastering UI Complexity: State Machines and Reactive Patterns at Grammarly",...
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
"Computer Use Agents: From SFT to Classic RL", Maksym Shamrai
"Як ми переписали Сільпо на Angular", Євген Русаков
"AI Transformation: Directions and Challenges", Pavlo Shaternik
"Validation and Observability of AI Agents", Oleksandr Denisyuk
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
"AI is already here. What will happen to your team (and your role) tomorrow?"...
"Is it worth investing in AI in 2025?", Alexander Sharko
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Database isolation: how we deal with hundreds of direct connections to the d...
"Scaling in space and time with Temporal", Andriy Lupa .pdf
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Ad

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
cuic standard and advanced reporting.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectroscopy.pptx food analysis technology
Digital-Transformation-Roadmap-for-Companies.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
cuic standard and advanced reporting.pdf
sap open course for s4hana steps from ECC to s4
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

"Crypto wallets security. For developers", Julia Potapenko