安卓全设备加密技术 | 安全代码战士

设备加密是对 Android 设备上的所有数据进行加密的过程。在 Android 设备上启用此功能后,所有用户创建的数据都会立即加密,然后再写入存储。这样可以保护数据,因此即使任何未经授权的一方试图访问数据,他们也无法读取数据。对于智能手机设备来说,这是一项特别好的功能,因为它们由用户随身携带,并且比其他计算设备更容易丢失或被盗。除非能够解锁手机,否则任何好奇的发现者或小偷都无法访问数据。
安卓有 两种类型 设备加密:全盘加密和基于文件的加密。
全盘加密
全盘加密是在 API 级别 19(安卓 4.4 KitKat)中引入的,但是 API 级别 21(安卓 5.0 Lollipop)中的新功能确实开始了它的使用。全盘加密使用单个密钥来保护整个设备的用户数据分区。密钥受用户凭证保护,必须在启动时提供密钥,然后才能访问磁盘的任何部分。
这对于安全性非常有用,但也意味着在用户输入凭据之前,设备的大部分功能都不可用。这意味着,当设备重启但未解锁时,某些功能,例如警报器无法运行,服务不可用,电话无法接听电话。出于这个原因,创建了第二种加密模式。
基于文件的加密
基于文件的加密是第二种设备加密模式,从 API 级别 24(Android 7.0 Nougat)开始可用。在此模式下,不同的文件使用不同的密钥进行加密,这些密钥可以独立解锁。随着这种加密模式的出现 直接启动 模式,允许加密设备直接启动到锁屏,在解锁设备之前启用先前缺少的功能。
直接启动允许应用程序在设备解锁之前在有限的环境中运行。这样,它们仍然可以在不影响用户信息的情况下按预期运行。为了提供此功能,Android 设备需要两个存储位置:
- 凭据加密存储。默认存储位置,仅在用户解锁设备后才可用。
- 设备加密存储。在 “直接启动” 模式下可用,也可以在用户解锁设备后使用。

如果您的应用程序在直接启动模式下运行时需要访问数据,则应使用设备加密存储。但是要注意安全隐患!不应使用设备加密存储来存储任何敏感数据!设备加密存储使用密钥进行加密,该密钥将在设备成功启动后立即可用。任何仅供用户访问的数据都应保存在默认位置,即凭据加密存储。
如果你想进一步了解什么是加密或为什么它很重要,请查看 该视频 在安全代码勇士门户网站上。或者你可以尝试通过玩一些来测试你对加密的了解 挑战。
需要设备分步指南吗?退房 这篇文章 来自 Pixel Privacy 的比尔·赫斯。
我希望你学到了一些新东西。下周见!
凭据加密存储,这是默认存储位置,仅在用户解锁设备后才可用。
https://developer.android.com/training/articles/direct-boot.html
Govern AI-driven development before it ships
Measure AI-assisted risk, enforce secure coding policy at commit, and accelerate secure delivery across your SDLC.
Explore more blogs
Lorem Issum diam quis eim leboutis ein selerisque lobortis sepitis beelrisque lobortis sepitis celerisque lobortis celeriskue filmentis celeriskue filmentis celeriskue diam
%252520%252520(3).avif)
Supercharged Security Awareness: How Tournaments are Inspiring Developers at Erste Group
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Security as culture: How Blue Prism cultivates world-class secure developers
Learn how Blue Prism, the global leader in intelligent automation for the enterprise, used Secure Code Warrior's agile learning platform to create a security-first culture with their developers, achieve their business goals, and ship secure code at speed

One Culture of Security: How Sage built their security champions program with agile secure code learning
Discover how Sage enhanced security with a flexible, relationship-focused approach, creating 200+ security champions and achieving measurable risk reduction.
Secure AI-driven development before it ships
See developer risk, enforce policy, and prevent vulnerabilities across your software development lifecycle.


