Skip to content

How to Secure a Room Database With Passcode-Based Encryption #7815

@MuindiStephen

Description

@MuindiStephen

Introduction

As Android developers we need to secure the data we store in our android apps. This is to objectively ensure the three triads: Confidentiality, Integrity and Availability. Password Based Encryption is an encryption technique used for providing with strong encryption keys to encrypt room persistent data away from attackers or hackers.

Key Takeaways

  1. Generate a random key
  2. SQLCipher key formats
  3. Create a hex encoded db key
  4. PBE encrypt + store the database key
  5. Restore + decrypt the database key
  6. Encrypt your Room database

References

https://developer.android.com/training/data-storage/room)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions