OBB: use PBKDF2 for key generation.

Switch to using PBKDF2 for the key generation for OBBs. Any previously
generated OBBs will stop being read correctly. A small pbkdf2gen program
is available to allow generation of appropriate keys with the salts.

Bug: 3059950
Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
This commit is contained in:
Kenny Root
2010-10-13 15:00:07 -07:00
parent dfc07279fc
commit 3b1abba6bb
12 changed files with 316 additions and 36 deletions

View File

@@ -48,6 +48,13 @@ public class ObbInfo implements Parcelable {
*/
public int flags;
/**
* The salt for the encryption algorithm.
*
* @hide
*/
public byte[] salt;
// Only allow things in this package to instantiate.
/* package */ ObbInfo() {
}
@@ -75,6 +82,7 @@ public class ObbInfo implements Parcelable {
dest.writeString(packageName);
dest.writeInt(version);
dest.writeInt(flags);
dest.writeByteArray(salt);
}
public static final Parcelable.Creator<ObbInfo> CREATOR
@@ -93,5 +101,6 @@ public class ObbInfo implements Parcelable {
packageName = source.readString();
version = source.readInt();
flags = source.readInt();
salt = source.createByteArray();
}
}