Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Don't F it up: How to simplify your security de...
Search
Matheus Cardoso
June 04, 2019
Technology
0
27
Don't F it up: How to simplify your security decisions and protect yourself when building a healthcare app
Matheus Cardoso
June 04, 2019
Tweet
Share
More Decks by Matheus Cardoso
See All by Matheus Cardoso
Server-Side Swift with Vapor
cardoso
0
87
Going Open Source: Advantages and Lessons Learned
cardoso
0
31
ChatOps with Rocket.Chat & Python
cardoso
0
250
Other Decks in Technology
See All in Technology
EncryptedSharedPreferences が deprecated になっちゃった!どうしよう! / Oh no! EncryptedSharedPreferences has been deprecated! What should I do?
yanzm
0
480
AIエージェント開発用SDKとローカルLLMをLINE Botと組み合わせてみた / LINEを使ったLT大会 #14
you
PRO
0
130
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
500
20250913_JAWS_sysad_kobe
takuyay0ne
2
250
2つのフロントエンドと状態管理
mixi_engineers
PRO
3
120
IoT x エッジAI - リアルタイ ムAI活用のPoCを今すぐ始め る方法 -
niizawat
0
110
2025/09/16 仕様駆動開発とAI-DLCが導くAI駆動開発の新フェーズ
masahiro_okamura
0
120
S3アクセス制御の設計ポイント
tommy0124
3
200
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
610
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
4
10k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.8k
roppongirb_20250911
igaiga
1
240
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Fireside Chat
paigeccino
39
3.6k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Designing for Performance
lara
610
69k
A Tale of Four Properties
chriscoyier
160
23k
We Have a Design System, Now What?
morganepeng
53
7.8k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
Transcript
Don’t F it up! @ AltConf 2019 How to simplify
your security decisions and protect yourself when building a healthcare App.
Matheus Cardoso Developer Relations @ Virgil Security " Open Sourcerer
@ GitHub.com/cardoso
None
Storage Transmission Passwords
None
Security? Cryptography? Regulations?
$4 trillion +5% year fortune.com/2019/02/21/us-health-care-costs-2
modernhealthcare.com
modernhealthcare.com 28% of all VC in the U.S
modernhealthcare.com
modernhealthcare.com
2018 Was a Record Year for HIPAA Penalties gdsconnect.com/2018-was-a-record-year-for-hipaa-penalties
$25 million in fines gdsconnect.com/2018-was-a-record-year-for-hipaa-penalties
None
(ePHI) Electronic Protected Health Information
Securing ePHI HIPAA Compliance
Securing ePHI Facility Access HIPAA Compliance
Securing ePHI Facility Access Policies & Tracking HIPAA Compliance
Securing ePHI Personnel Training Facility Access Policies & Tracking HIPAA
Compliance
Securing ePHI Personnel Training Facility Access Policies & Tracking HIPAA
Compliance
Securing ePHI Personnel Training Facility Access Policies & Tracking HIPAA
Compliance
hhs.gov/sites/default/files/ocr/privacy/hipaa/administrative/securityrule/techsafeguards.pdf
Recent Examples
techcrunch.com/2019/03/17/medical-health-data-leak
techcrunch.com/2019/03/17/medical-health-data-leak Unsecured Elasticsearch Database
techcrunch.com/2019/03/17/medical-health-data-leak Unsecured Elasticsearch Database 6 million health records exposed
techcrunch.com/2019/03/17/medical-health-data-leak
Medical records techcrunch.com/2019/03/17/medical-health-data-leak
Medical records Doctor’s notes techcrunch.com/2019/03/17/medical-health-data-leak
Medical records Doctor’s notes Prescriptions techcrunch.com/2019/03/17/medical-health-data-leak
Medical records Doctor’s notes Prescriptions Illness information techcrunch.com/2019/03/17/medical-health-data-leak
Medical records Doctor’s notes Prescriptions Illness information Blood test results
techcrunch.com/2019/03/17/medical-health-data-leak
techcrunch.com/2019/03/17/medical-health-data-leak Medical records Doctor’s notes Prescriptions Illness information Blood test
results Name, address, date of birth
techcrunch.com/2019/03/17/medical-health-data-leak Medical records Doctor’s notes Prescriptions Illness information Blood test
results Name, address, date of birth Insurance information
techcrunch.com/2019/03/17/medical-health-data-leak Medical records Doctor’s notes Prescriptions Illness information Blood test
results Name, address, date of birth Insurance information Payment data
techcrunch.com/2019/03/17/medical-health-data-leak Doctor’s notes Prescriptions Illness information Blood test results Name,
address, date of birth Insurance information Payment data Personal data
techcrunch.com/2019/03/17/medical-health-data-leak Prescriptions Illness information Blood test results Name, address, date
of birth Insurance information Payment data Personal data Information on children
techcrunch.com/2019/03/17/medical-health-data-leak Prescriptions Illness information Blood test results Name, address, date
of birth Insurance information Payment data Personal data Information on children ePHI
newsroom.uw.edu/news/data-error-exposes-patient-information
Exposed data to search engines during migration newsroom.uw.edu/news/data-error-exposes-patient-information
databreachtoday.com/wellpoint-to-pay-17-million-settlement-a-5904
databreachtoday.com/wellpoint-to-pay-17-million-settlement-a-5904 Stopped checking user identities during 3rd party software upgrade
databreachtoday.com/wellpoint-to-pay-17-million-settlement-a-5904 Stopped checking user identities during 3rd party software upgrade
1.7 million dollars in fines
databreachtoday.com/wellpoint-to-pay-17-million-settlement-a-5904 Stopped checking user identities during 3rd party software upgrade
1.7 million dollars in fines Many more…
DataBreachToday.com
DataBreachToday.com HipaaJournal.com
DataBreachToday.com HipaaJournal.com ocrportal.hhs.gov/ocr/ breach
80% of data breaches are by mistake databreachtoday.com/misconfiguration-leads-to-major-health-data-breach-a-12042
80% of data breaches are by mistake databreachtoday.com/misconfiguration-leads-to-major-health-data-breach-a-12042
None
if user.identity == "bob" { send(ePHI, to: user) }
Data base API
Data base API
Data base API Securing the perimeter
Data base API Data in plaintext ->
theguardian.com/technology/2014/jun/06/heartbleed-openssl-bug-security-vulnerabilities
xda-developers.com/user-data-leak-misconfigured-firebase-backends
Heavy HHS fines
Heavy HHS fines Data for ransom securelink.com/blog/healthcare-data-new-prize-hackers
Heavy HHS fines Data for ransom securelink.com/blog/healthcare-data-new-prize-hackers Up to 250$/record
www2.trustwave.com/Value-of-Data-Report_LP.html
cyberscoop.com/yahoo-class-action-settlement-85m-data-breach-lawsuit
cyberscoop.com/yahoo-class-action-settlement-85m-data-breach-lawsuit Heavy HHS fines Data for ransom Lawsuits …
None
None
None
apple.com/privacy/approach-to-privacy
apple.com/privacy/approach-to-privacy
None
washingtonpost.com
Data base API
API
API
Ali Ali B Bo ( )
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
<- Encrypts <- Decrypts
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice)
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice)
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Hello Dr. Alice
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Hello Dr. Alice
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) $&!@*#%?$&
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) $&!@*#%?$&
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) $&!@*#%?$&
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Hello Dr. Alice
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Hello Dr. Alice
Public Key Service iOS Application IP Messaging
Public Key Service iOS Application IP Messaging Generate Key Pair
Encrypt/Decrypt
Public Key Service iOS Application IP Messaging Generate Key Pair
Encrypt/Decrypt Catalog/Distribute Public Keys
Public Key Service iOS Application IP Messaging Generate Key Pair
Encrypt/Decrypt Store/Transmit encrypted Messages Catalog/Distribute Public Keys
iOS Application
https://github.com/VirgilSecurity/virgil-crypto
import VirgilCrypto // generate key pair let crypto = try!
VirgilCrypto() let keyPair = try! crypto.generateKeyPair() 1
// save private key UserDefaults.standard.set( keyPair.privateKey, forKey: "private_key") // code
for keychain too big for slides // but use keychain!! 2
// publish public key publishPublicKey( keyPair.publicKey, for: "bob") 3
// lookup public key let k = lookupPublicKey(of: "alice")! 4
// encrypt message let encryptedData = try crypto.encrypt( "Hello Alice!".data(using:
.utf8)!, for: [k]) 5
// encrypt message let encryptedData = try crypto.encrypt( "Hello Alice!".data(using:
.utf8)!, for: [k]/* encrypt for multiple keys */) 5
// decrypt message let decryptedData = try crypto.decrypt( encryptedData, with:
keyPair.privateKey) let message = String( data: decryptedData, encoding: .utf8) 6
Transmission Security STANDARD § 164.312(e)(1)
Integrity STANDARD § 164.312(c)(1)
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Hello Alice
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Something else
( ) Public (Alice) Public (Bob) Private (Bob) Private (Alice)
Public (Bob) Public (Alice) Something else
Encryption Message Body Signature
Encryption Message Body Signature
// encrypt message let encryptedData = try crypto.encrypt( "Hello Alice!".data(using:
.utf8)!, for: [k])
// sign and encrypt message let signedData = try crypto.signThenEncrypt(
"Hello Bob!".data(using: .utf8)!, with: keyPair.privateKey, /* to sign! */ for: [k])
// decrypt message let decryptedData = try crypto.decrypt( encryptedData, with:
keyPair.privateKey)
// decrypt and verify signature let verifiedData = try crypto.decryptThenVerify(
signedData, with: keyPair.privateKey, using: k /* to verify! */)
// decrypt and verify signature let verifiedData = try crypto.decryptThenVerify(
signedData, with: keyPair.privateKey, using: k /* to verify! */) No need to be a Cryptographer
+ Database Compromises
+ Man-in-the-middle Attacks
+ Brute-force Attacks
Non-deterministic encrypt(“Hello Dr. Alice”) = X encrypt(“Hello Dr. Alice”) =
Y encrypt(“Hello Dr. Alice”) = Z …
+ Database Compromises + Man-in-the-middle Attacks + Brute-force Attacks
Transmission Security STANDARD § 164.312(e)(1) Integrity STANDARD § 164.312(c)(1)
Quick Demo! Please work
https://github.com/VirgilSecurity/virgil-crypto
https://github.com/VirgilSecurity/virgil-crypto Objective-C, Swift, Java, Kotlin, C, C++ Go, PHP, Python,
Ruby, C#/.NET, AsmJS, NodeJS, WebAssembly, …
+ Database Compromises + Man-in-the-middle Attacks + Brute-force Attacks
+ Database Compromises + Man-in-the-middle Attacks + Brute-force Attacks That’s
not all, folks
Perfect Forward Secrecy + Private Key Compromises
Perfect Forward Secrecy (Double Ratchet) signal.org/docs/specifications/doubleratchet/doubleratchet.pdf
To consider…
CareKit ResearchKit HealthKit
HealthKit Track health & fitness
Track health & fitness Access health records HealthKit
Track health & fitness Access health records HealthKit Ongoing health
CareKit Measure symptoms Track medications Get Insights Share with doctors
CareKit Measure symptoms Track medications Share with doctors Medical treatment
ResearchKit Enroll participants Gather data Share with researchers
ResearchKit Enroll participants Measure symptoms Share with doctors Medical research
CareKit ResearchKit HealthKit
CareKit ResearchKit HealthKit User consent Secure storage
None
Questions?
Matheus Cardoso " Open Sourcerer - GitHub.com/cardoso ✉ Mail Reader
-
[email protected]