section-engineering-education / engineering-education

“Section's Engineering Education (EngEd) Program is dedicated to offering a unique quality community experience for computer science university students."
Apache License 2.0
363 stars 889 forks source link

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

Open MuindiStephen opened 1 year ago

MuindiStephen commented 1 year ago

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)

github-actions[bot] commented 1 year ago

👋 @MuindiStephen Good afternoon and thank you for submitting your topic suggestion. Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

MuindiStephen commented 1 year ago

@WanjaMIKE Could you review this, please?

MuindiStephen commented 1 year ago

wave @MuindiStephen Good afternoon and thank you for submitting your topic suggestion. Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

@WanjaMIKE @Ericgacoki