OSDN Git Service

Add helpers for generating keys, wrapping them, and persisting them
authorRobert Berry <robertberry@google.com>
Thu, 7 Dec 2017 14:33:54 +0000 (14:33 +0000)
committerRobert Berry <robertberry@google.com>
Fri, 8 Dec 2017 17:47:56 +0000 (17:47 +0000)
commitce50cd302a8cf2199660e99334888131a0d47926
tree322ea5f83464384489d4ab4f2b161cc574f4f5ca
parent4d51f44535ff3935c0aabed0371dc988112b925b
Add helpers for generating keys, wrapping them, and persisting them

As part of the RecoverableKeyStoreLoader, we need to be able to generate new
256-bit AES keys, sync them with AndroidKeyStore, and persist them, wrapped
to disk. This allows us to recover them later, using a Platform key, and
sync them with remote storage.

Test: manual for now (how do we do automated tests on Framework?)
Change-Id: I32e0beabaecc9bea9f95ca2beea851e9be833358
core/java/android/security/recoverablekeystore/RecoverableKeyGenerator.java [new file with mode: 0644]
core/java/android/security/recoverablekeystore/RecoverableKeyStorage.java [new file with mode: 0644]
core/java/android/security/recoverablekeystore/RecoverableKeyStorageImpl.java [new file with mode: 0644]
core/java/android/security/recoverablekeystore/WrappedKey.java [new file with mode: 0644]
core/tests/coretests/src/android/security/recoverablekeystore/RecoverableKeyGeneratorTest.java [new file with mode: 0644]
core/tests/coretests/src/android/security/recoverablekeystore/WrappedKeyTest.java [new file with mode: 0644]