SlideShare a Scribd company logo
1 of 13
Download to read offline
ANDROID RECOVERABLE
KEYSTORE
Nikolay Elenkov
Dec 2019
AGENDA
• ANDROID KEYSTORE
• RECOVERABLE KEYSTORE
• IMPLEMENTATION
• WHO USES IT?
• SUMMARY
1
ANDROID KEYSTORE QUICK INTRO
• PROTECTS KEYS WITH HARDWARE
• IMPLEMENTED USING TEE OR HARDWARE (TITAN CHIP ON PIXELS)
• KEYS ARE NOT EXPORTABLE
• INTEGRATES WITH LOCK SCREEN AND BIOMETRICS
• KEYS MIGHT REQUIRE AUTHENTICATION TO USE
• PROVIDES KEY ATTESTATION
• VERIFIABLE INFO ABOUT DEVICE THAT GENERATED KEY
2
KEYSTORE IMPLEMENTATION
Source: https://source.android.com/security/authentication/
3
RECOVERABLE KEYSTORE?
• RECOVERABLE == EXPORTABLE?
• IS THIS SAFE?
• WHY IS IT NEEDED?
•
4
BRIEF SPECS
• ONLY SYMMETRIC KEYS ARE SUPPORTED (AES)
• LOCAL KEYS ARE WRAPPED USING AES-GCM PLATFORM KEY
• KEYSTORE SNAPSHOTS ENCRYPTED WITH CLOUD PUBLIC KEY AND KEY BASED ON PIN
• AKA: ‘LOCK SCREEN KNOWLEDGE FACTOR’ (LSKF)
• ONLY SYSTEM APPS CAN GENERATE AND RESTORE RECOVERABLE KEYS
• REQUIRES RECOVER_KEYSTORE (SYSTEM|PRIVILEGED) PERMISSION
• KEYS ARE BACKED UP TO GOOGLE CLOUD KEY VAULT SERVICE (CKV)
• HTTPS://DEVELOPER.ANDROID.COM/ABOUT/VERSIONS/PIE/SECURITY/CKV-WHITEPAPER
5
RECOVERABLE KEY GENERATION
6
RECOVERABLE KEYSTORE INITIALIZATION
7
RECOVERABLE KEYSTORE SNAPSHOT
8
CRYPTO DETAILS -- SECURE BOX
• byte[] SecureBox.encrypt(theirPublicKey,sharedSecret, header,payload)
• byte[] SecureBox.decrypt(ourPrivateKey, sharedSecret, header, encryptedPayload)
• Key agreement: ECDH with NIST P-256/secp256r1
• Key derivation: HKDF
• Encryption: AES-GCM
byte[] randNonce = genRandomNonce();
byte[] keyingMaterial = concat(dhSecret, sharedSecret);
SecretKey encryptionKey = hkdfDeriveKey(keyingMaterial, HKDF_SALT, hkdfInfo);
byte[] ciphertext = aesGcmEncrypt(encryptionKey, randNonce, payload, header);
9
USERS OF RECOVERABLE KEYSTORE
• CURRENTLY ONLY GOOGLE PLAY SERVICE (GMS)
• HAS RECOVER_KEYSTORE PERMISSION
• CAN KICK OFF KEYSTORE SNAPSHOT AND RECOVERY
• GMS.AUTH.FOLSOM.START_RECOVERY
• ACTION.RECOVERABLE_KEYSTORE_SNAPSHOT
• PACKAGE COM.GOOGLE.ANDROID.GMS.AUTH.FOLSOM/*
• FOLSOMGCMTASKCHIMERASERVICE
• FOLSOMPUBLICKEYUPDATESERVICE
• FOLSOMMODULEINITINTENTOPERATION
• KEYSYNCINTENTOPERATION
• KEYRECOVERYINTENTOPERATION 10
SUMMARY
• ANDROID 9-10 HAVE RECOVERABLE KEYSTORE PROTECTED BY LOCKSCREEN PIN
• CAN BE MIGRATED TO NEW DEVICE
• LINKED TO GOOGLE ACCOUNT
• ONLY SYMMETRIC KEYS SUPPORTED ATM
• GOOGLE PLAY SERVICES ACTS AS A RECOVERY AGENT
• RECOVERABLE KEY ALLOWS SECURE RECOVERY OF ARBITRARY DATA
• FULL DEVICE BACKUP, ETC.
11
REFERENCES
• INSIDER ATTACK RESISTANCE IN THE ANDROID ECOSYSTEM, ENIGMA 2019
• HTTPS://SECURITY.GOOGLEBLOG.COM/2018/10/GOOGLE-AND-ANDROID-HAVE-YOUR-BACK-BY.HTML
• HTTPS://DEVELOPER.ANDROID.COM/GUIDE/TOPICS/DATA/BACKUP
• HTTPS://WWW.NCCGROUP.TRUST/US/OUR-RESEARCH/ANDROID-CLOUD-BACKUPRESTORE/
12

More Related Content

What's hot

Introduction to Optee (26 may 2016)
Introduction to Optee (26 may 2016)Introduction to Optee (26 may 2016)
Introduction to Optee (26 may 2016)Yannick Gicquel
 
Intel(r) Quick Assist Technology Overview
Intel(r) Quick Assist Technology OverviewIntel(r) Quick Assist Technology Overview
Intel(r) Quick Assist Technology OverviewMichelle Holley
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELinaro
 
FIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO Alliance
 
Lightelligence: Optical CXL Interconnect for Large Scale Memory Pooling
Lightelligence: Optical CXL Interconnect for Large Scale Memory PoolingLightelligence: Optical CXL Interconnect for Large Scale Memory Pooling
Lightelligence: Optical CXL Interconnect for Large Scale Memory PoolingMemory Fabric Forum
 
Red Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft AzureRed Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft AzureJohn Archer
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEELinaro
 
Decouvrir CQRS (sans Event sourcing) par la pratique
Decouvrir CQRS (sans Event sourcing) par la pratiqueDecouvrir CQRS (sans Event sourcing) par la pratique
Decouvrir CQRS (sans Event sourcing) par la pratiqueThomas Pierrain
 
Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"
Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"
Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"Piotr Król
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Linaro
 
ISSCC 2018: "Zeppelin": an SoC for Multi-chip Architectures
ISSCC 2018: "Zeppelin": an SoC for Multi-chip ArchitecturesISSCC 2018: "Zeppelin": an SoC for Multi-chip Architectures
ISSCC 2018: "Zeppelin": an SoC for Multi-chip ArchitecturesAMD
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
HBaseCon 2013: Compaction Improvements in Apache HBase
HBaseCon 2013: Compaction Improvements in Apache HBaseHBaseCon 2013: Compaction Improvements in Apache HBase
HBaseCon 2013: Compaction Improvements in Apache HBaseCloudera, Inc.
 
Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...
Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...
Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...Dell Technologies
 
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSFernando Luiz Cola
 
ssh.ppt
ssh.pptssh.ppt
ssh.pptjoekr1
 

What's hot (20)

Introduction to Optee (26 may 2016)
Introduction to Optee (26 may 2016)Introduction to Optee (26 may 2016)
Introduction to Optee (26 may 2016)
 
Intel(r) Quick Assist Technology Overview
Intel(r) Quick Assist Technology OverviewIntel(r) Quick Assist Technology Overview
Intel(r) Quick Assist Technology Overview
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEE
 
FIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO2 Specifications Overview
FIDO2 Specifications Overview
 
Lightelligence: Optical CXL Interconnect for Large Scale Memory Pooling
Lightelligence: Optical CXL Interconnect for Large Scale Memory PoolingLightelligence: Optical CXL Interconnect for Large Scale Memory Pooling
Lightelligence: Optical CXL Interconnect for Large Scale Memory Pooling
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
Red Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft AzureRed Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft Azure
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Decouvrir CQRS (sans Event sourcing) par la pratique
Decouvrir CQRS (sans Event sourcing) par la pratiqueDecouvrir CQRS (sans Event sourcing) par la pratique
Decouvrir CQRS (sans Event sourcing) par la pratique
 
Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"
Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"
Booting UEFI-aware OS on coreboot enabled platform - "In God's Name, Why?"
 
Keycloak SSO basics
Keycloak SSO basicsKeycloak SSO basics
Keycloak SSO basics
 
Vault 101
Vault 101Vault 101
Vault 101
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8
 
ISSCC 2018: "Zeppelin": an SoC for Multi-chip Architectures
ISSCC 2018: "Zeppelin": an SoC for Multi-chip ArchitecturesISSCC 2018: "Zeppelin": an SoC for Multi-chip Architectures
ISSCC 2018: "Zeppelin": an SoC for Multi-chip Architectures
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
HBaseCon 2013: Compaction Improvements in Apache HBase
HBaseCon 2013: Compaction Improvements in Apache HBaseHBaseCon 2013: Compaction Improvements in Apache HBase
HBaseCon 2013: Compaction Improvements in Apache HBase
 
Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...
Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...
Dell Technologies Dell EMC ISILON Storage On One Single Page - POSTER - v1a S...
 
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
 
ssh.ppt
ssh.pptssh.ppt
ssh.ppt
 

Similar to ANDROID RECOVERABLE KEYSTORE

7.3. iCloud keychain-2
7.3. iCloud keychain-27.3. iCloud keychain-2
7.3. iCloud keychain-2defconmoscow
 
How to do Cryptography right in Android Part One
How to do Cryptography right in Android Part OneHow to do Cryptography right in Android Part One
How to do Cryptography right in Android Part OneArash Ramez
 
[OWASP Poland Day] Saving private token
[OWASP Poland Day] Saving private token[OWASP Poland Day] Saving private token
[OWASP Poland Day] Saving private tokenOWASP
 
Via forensics icloud-keychain_passwords_13
Via forensics icloud-keychain_passwords_13Via forensics icloud-keychain_passwords_13
Via forensics icloud-keychain_passwords_13viaForensics
 
FIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure EnclaveFIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure EnclavewolfSSL
 
Your House is My House: Use of Offensive Enclaves In Adversarial Operations
Your House is My House: Use of Offensive Enclaves In Adversarial OperationsYour House is My House: Use of Offensive Enclaves In Adversarial Operations
Your House is My House: Use of Offensive Enclaves In Adversarial OperationsDimitry Snezhkov
 
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...Consulthinkspa
 
DefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataDefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataMichael Smith
 
Managing your secrets in a cloud environment
Managing your secrets in a cloud environmentManaging your secrets in a cloud environment
Managing your secrets in a cloud environmentTaswar Bhatti
 
Implementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile WorldImplementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile WorldLINE Corporation
 
iOS secure app development
iOS secure app developmentiOS secure app development
iOS secure app developmentDusan Klinec
 
Tokenization vs encryption vs masking
Tokenization vs encryption vs maskingTokenization vs encryption vs masking
Tokenization vs encryption vs maskingUlf Mattsson
 
Solnik secure enclaveprocessor-pacsec
Solnik secure enclaveprocessor-pacsecSolnik secure enclaveprocessor-pacsec
Solnik secure enclaveprocessor-pacsecPacSecJP
 
Cryptography and encryption and security network
Cryptography and encryption and security networkCryptography and encryption and security network
Cryptography and encryption and security networkNirajKumar620142
 
Encryption Boot Camp at JavaZone 2010
Encryption Boot Camp at JavaZone 2010Encryption Boot Camp at JavaZone 2010
Encryption Boot Camp at JavaZone 2010Matthew McCullough
 

Similar to ANDROID RECOVERABLE KEYSTORE (20)

7.3. iCloud keychain-2
7.3. iCloud keychain-27.3. iCloud keychain-2
7.3. iCloud keychain-2
 
How to do Cryptography right in Android Part One
How to do Cryptography right in Android Part OneHow to do Cryptography right in Android Part One
How to do Cryptography right in Android Part One
 
[OWASP Poland Day] Saving private token
[OWASP Poland Day] Saving private token[OWASP Poland Day] Saving private token
[OWASP Poland Day] Saving private token
 
Via forensics icloud-keychain_passwords_13
Via forensics icloud-keychain_passwords_13Via forensics icloud-keychain_passwords_13
Via forensics icloud-keychain_passwords_13
 
FIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure EnclaveFIPS 140-2 Validations in a Secure Enclave
FIPS 140-2 Validations in a Secure Enclave
 
Your House is My House: Use of Offensive Enclaves In Adversarial Operations
Your House is My House: Use of Offensive Enclaves In Adversarial OperationsYour House is My House: Use of Offensive Enclaves In Adversarial Operations
Your House is My House: Use of Offensive Enclaves In Adversarial Operations
 
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
 
DefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataDefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android Data
 
Managing your secrets in a cloud environment
Managing your secrets in a cloud environmentManaging your secrets in a cloud environment
Managing your secrets in a cloud environment
 
Implementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile WorldImplementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile World
 
iOS secure app development
iOS secure app developmentiOS secure app development
iOS secure app development
 
Tokenization vs encryption vs masking
Tokenization vs encryption vs maskingTokenization vs encryption vs masking
Tokenization vs encryption vs masking
 
Aes jul-upload
Aes jul-uploadAes jul-upload
Aes jul-upload
 
Solnik secure enclaveprocessor-pacsec
Solnik secure enclaveprocessor-pacsecSolnik secure enclaveprocessor-pacsec
Solnik secure enclaveprocessor-pacsec
 
Senzations’15: Secure Internet of Things
Senzations’15: Secure Internet of ThingsSenzations’15: Secure Internet of Things
Senzations’15: Secure Internet of Things
 
Encryption 2021
Encryption 2021Encryption 2021
Encryption 2021
 
Cryptography and encryption and security network
Cryptography and encryption and security networkCryptography and encryption and security network
Cryptography and encryption and security network
 
Encryption Boot Camp at JavaZone 2010
Encryption Boot Camp at JavaZone 2010Encryption Boot Camp at JavaZone 2010
Encryption Boot Camp at JavaZone 2010
 
Secure Your Encryption with HSM
Secure Your Encryption with HSMSecure Your Encryption with HSM
Secure Your Encryption with HSM
 
2014.11 asfws
2014.11 asfws2014.11 asfws
2014.11 asfws
 

Recently uploaded

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

ANDROID RECOVERABLE KEYSTORE

  • 2. AGENDA • ANDROID KEYSTORE • RECOVERABLE KEYSTORE • IMPLEMENTATION • WHO USES IT? • SUMMARY 1
  • 3. ANDROID KEYSTORE QUICK INTRO • PROTECTS KEYS WITH HARDWARE • IMPLEMENTED USING TEE OR HARDWARE (TITAN CHIP ON PIXELS) • KEYS ARE NOT EXPORTABLE • INTEGRATES WITH LOCK SCREEN AND BIOMETRICS • KEYS MIGHT REQUIRE AUTHENTICATION TO USE • PROVIDES KEY ATTESTATION • VERIFIABLE INFO ABOUT DEVICE THAT GENERATED KEY 2
  • 5. RECOVERABLE KEYSTORE? • RECOVERABLE == EXPORTABLE? • IS THIS SAFE? • WHY IS IT NEEDED? • 4
  • 6. BRIEF SPECS • ONLY SYMMETRIC KEYS ARE SUPPORTED (AES) • LOCAL KEYS ARE WRAPPED USING AES-GCM PLATFORM KEY • KEYSTORE SNAPSHOTS ENCRYPTED WITH CLOUD PUBLIC KEY AND KEY BASED ON PIN • AKA: ‘LOCK SCREEN KNOWLEDGE FACTOR’ (LSKF) • ONLY SYSTEM APPS CAN GENERATE AND RESTORE RECOVERABLE KEYS • REQUIRES RECOVER_KEYSTORE (SYSTEM|PRIVILEGED) PERMISSION • KEYS ARE BACKED UP TO GOOGLE CLOUD KEY VAULT SERVICE (CKV) • HTTPS://DEVELOPER.ANDROID.COM/ABOUT/VERSIONS/PIE/SECURITY/CKV-WHITEPAPER 5
  • 10. CRYPTO DETAILS -- SECURE BOX • byte[] SecureBox.encrypt(theirPublicKey,sharedSecret, header,payload) • byte[] SecureBox.decrypt(ourPrivateKey, sharedSecret, header, encryptedPayload) • Key agreement: ECDH with NIST P-256/secp256r1 • Key derivation: HKDF • Encryption: AES-GCM byte[] randNonce = genRandomNonce(); byte[] keyingMaterial = concat(dhSecret, sharedSecret); SecretKey encryptionKey = hkdfDeriveKey(keyingMaterial, HKDF_SALT, hkdfInfo); byte[] ciphertext = aesGcmEncrypt(encryptionKey, randNonce, payload, header); 9
  • 11. USERS OF RECOVERABLE KEYSTORE • CURRENTLY ONLY GOOGLE PLAY SERVICE (GMS) • HAS RECOVER_KEYSTORE PERMISSION • CAN KICK OFF KEYSTORE SNAPSHOT AND RECOVERY • GMS.AUTH.FOLSOM.START_RECOVERY • ACTION.RECOVERABLE_KEYSTORE_SNAPSHOT • PACKAGE COM.GOOGLE.ANDROID.GMS.AUTH.FOLSOM/* • FOLSOMGCMTASKCHIMERASERVICE • FOLSOMPUBLICKEYUPDATESERVICE • FOLSOMMODULEINITINTENTOPERATION • KEYSYNCINTENTOPERATION • KEYRECOVERYINTENTOPERATION 10
  • 12. SUMMARY • ANDROID 9-10 HAVE RECOVERABLE KEYSTORE PROTECTED BY LOCKSCREEN PIN • CAN BE MIGRATED TO NEW DEVICE • LINKED TO GOOGLE ACCOUNT • ONLY SYMMETRIC KEYS SUPPORTED ATM • GOOGLE PLAY SERVICES ACTS AS A RECOVERY AGENT • RECOVERABLE KEY ALLOWS SECURE RECOVERY OF ARBITRARY DATA • FULL DEVICE BACKUP, ETC. 11
  • 13. REFERENCES • INSIDER ATTACK RESISTANCE IN THE ANDROID ECOSYSTEM, ENIGMA 2019 • HTTPS://SECURITY.GOOGLEBLOG.COM/2018/10/GOOGLE-AND-ANDROID-HAVE-YOUR-BACK-BY.HTML • HTTPS://DEVELOPER.ANDROID.COM/GUIDE/TOPICS/DATA/BACKUP • HTTPS://WWW.NCCGROUP.TRUST/US/OUR-RESEARCH/ANDROID-CLOUD-BACKUPRESTORE/ 12