com/android/security/SecureBox.class
SecureBox.java
package com.android.security
public com.android.security.SecureBox extends java.lang.Object {
private static final byte[] VERSION
private static final byte[] HKDF_SALT
private static final byte[] HKDF_INFO_WITH_PUBLIC_KEY
private static final byte[] HKDF_INFO_WITHOUT_PUBLIC_KEY
private static final byte[] CONSTANT_01
private static final byte[] EMPTY_BYTE_ARRAY
private static final byte EC_PUBLIC_KEY_PREFIX
private static final String CIPHER_ALG
private static final String EC_ALG
private static final String EC_P256_COMMON_NAME
private static final String EC_P256_OPENSSL_NAME
private static final String ENC_ALG
private static final String KA_ALG
private static final String MAC_ALG
private static final int EC_COORDINATE_LEN_BYTES
private static final int EC_PUBLIC_KEY_LEN_BYTES
private static final int GCM_NONCE_LEN_BYTES
private static final int GCM_KEY_LEN_BYTES
private static final int GCM_TAG_LEN_BYTES
private static final java.math.BigInteger BIG_INT_02
private static final java.math.BigInteger EC_PARAM_P
private static final java.math.BigInteger EC_PARAM_A
private static final java.math.BigInteger EC_PARAM_B
static final java.security.spec.ECParameterSpec EC_PARAM_SPEC
private void <init> ()
public static java.security.KeyPair genKeyPair () throws java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterException ex
java.security.KeyPairGenerator keyPairGenerator
public static byte[] encrypt (java.security.PublicKey, byte[], byte[], byte[]) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException
java.security.KeyPair senderKeyPair
byte[] dhSecret
byte[] hkdfInfo
java.security.PublicKey theirPublicKey
byte[] sharedSecret
byte[] header
byte[] payload
java.security.KeyPair senderKeyPair
byte[] dhSecret
byte[] hkdfInfo
byte[] randNonce
byte[] keyingMaterial
javax.crypto.SecretKey encryptionKey
byte[] ciphertext
public static byte[] decrypt (java.security.PrivateKey, byte[], byte[], byte[]) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException javax.crypto.AEADBadTagException
byte[] dhSecret
byte[] hkdfInfo
byte[] senderPublicKeyBytes
java.security.PrivateKey ourPrivateKey
byte[] sharedSecret
byte[] header
byte[] encryptedPayload
java.nio.ByteBuffer ciphertextBuffer
byte[] version
byte[] dhSecret
byte[] hkdfInfo
byte[] randNonce
byte[] ciphertext
byte[] keyingMaterial
javax.crypto.SecretKey decryptionKey
private static byte[] readEncryptedPayload (java.nio.ByteBuffer, int) throws javax.crypto.AEADBadTagException
java.nio.BufferUnderflowException ex
java.nio.ByteBuffer buffer
int length
byte[] output
private static byte[] dhComputeSecret (java.security.PrivateKey, java.security.PublicKey) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException
RuntimeException ex
java.security.PrivateKey ourPrivateKey
java.security.PublicKey theirPublicKey
javax.crypto.KeyAgreement agreement
private static javax.crypto.SecretKey hkdfDeriveKey (byte[], byte[], byte[]) throws java.security.NoSuchAlgorithmException
java.security.InvalidKeyException ex
java.security.InvalidKeyException ex
byte[] secret
byte[] salt
byte[] info
javax.crypto.Mac mac
byte[] pseudorandomKey
byte[] hkdfOutput
private static byte[] aesGcmEncrypt (javax.crypto.SecretKey, byte[], byte[], byte[]) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException
javax.crypto.AEADBadTagException ex
javax.crypto.SecretKey key
byte[] nonce
byte[] plaintext
byte[] aad
private static byte[] aesGcmDecrypt (javax.crypto.SecretKey, byte[], byte[], byte[]) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException javax.crypto.AEADBadTagException
javax.crypto.SecretKey key
byte[] nonce
byte[] ciphertext
byte[] aad
private static byte[] aesGcmInternal (com.android.security.SecureBox$AesGcmOperation, javax.crypto.SecretKey, byte[], byte[], byte[]) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException javax.crypto.AEADBadTagException
javax.crypto.Cipher cipher
javax.crypto.NoSuchPaddingException ex
java.security.InvalidAlgorithmParameterException ex
javax.crypto.AEADBadTagException ex
java.security.GeneralSecurityException ex
com.android.security.SecureBox$AesGcmOperation operation
javax.crypto.SecretKey key
byte[] nonce
byte[] text
byte[] aad
javax.crypto.Cipher cipher
javax.crypto.spec.GCMParameterSpec spec
public static byte[] encodePublicKey (java.security.PublicKey)
java.security.PublicKey publicKey
java.security.spec.ECPoint point
byte[] x
byte[] y
byte[] output
public static java.security.PublicKey decodePublicKey (byte[]) throws java.security.NoSuchAlgorithmException java.security.InvalidKeyException
java.security.spec.InvalidKeySpecException ex
byte[] keyBytes
java.math.BigInteger x
java.math.BigInteger y
java.security.KeyFactory keyFactory
private static void validateEcPoint (java.math.BigInteger, java.math.BigInteger) throws java.security.InvalidKeyException
java.math.BigInteger x
java.math.BigInteger y
java.math.BigInteger lhs
java.math.BigInteger rhs
private static byte[] genRandomNonce () throws java.security.NoSuchAlgorithmException
byte[] nonce
private static byte[] emptyByteArrayIfNull (byte[])
byte[] input
static void <clinit> ()
java.security.spec.EllipticCurve curveSpec
java.security.spec.ECPoint generator
java.math.BigInteger generatorOrder
}
com/android/security/SecureBox$AesGcmOperation.class
SecureBox.java
package com.android.security
final enum com.android.security.SecureBox$AesGcmOperation extends java.lang.Enum {
public static final enum com.android.security.SecureBox$AesGcmOperation ENCRYPT
public static final enum com.android.security.SecureBox$AesGcmOperation DECRYPT
private static final synthetic com.android.security.SecureBox$AesGcmOperation[] $VALUES
public static com.android.security.SecureBox$AesGcmOperation[] values ()
public static com.android.security.SecureBox$AesGcmOperation valueOf (java.lang.String)
String name
private void <init> (java.lang.String, int)
private static synthetic com.android.security.SecureBox$AesGcmOperation[] $values ()
static void <clinit> ()
}
com/android/security/
com/android/
com/
META-INF/MANIFEST.MF
META-INF/