OSDN Git Service

Zero memory used for encryuption keys.
authorPavel Grafov <pgrafov@google.com>
Tue, 1 Aug 2017 16:15:53 +0000 (17:15 +0100)
committerPavel Grafov <pgrafov@google.com>
Thu, 10 Aug 2017 16:31:03 +0000 (17:31 +0100)
commite2e2d308df2da26838de32852318bc2cb690d052
tree6637d5b5af5d3dc50fe68edc6dc0525f3ea92983
parent53deec14b8418abbc1a6f30ff89629710437279f
Zero memory used for encryuption keys.

std::vector with custom zeroing allocator is used instead of
std::string for data that can contain encryption keys.

Bug: 64201177
Test: manually created a managed profile, changed it's credentials
Test: manually upgraded a phone with profile from O to MR1.
Change-Id: Ic31877049f69eba9f8ea64fd99acaaca5a01d3dd
13 files changed:
Android.mk
Ext4Crypt.cpp
KeyBuffer.cpp [new file with mode: 0644]
KeyBuffer.h [new file with mode: 0644]
KeyStorage.cpp
KeyStorage.h
KeyUtil.cpp
KeyUtil.h
Keymaster.cpp
Keymaster.h
MetadataCrypt.cpp
Utils.cpp
Utils.h