mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Removed bundle encryption.
Android doesn't currently store bundles persistently, so it's premature to protect against accidental information leaks through persistent bundle storage. Protecting against deliberate information leaks by the OS is probably futile, so there's currently no need for bundle encryption.
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
package net.sf.briar.api.android;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
/**
|
||||
* Encrypts and decrypts the contents of bundles in case the operating system
|
||||
* writes them to unencrypted storage.
|
||||
* <p>
|
||||
* This interface is designed to be accessed from the UI thread, so
|
||||
* implementations may not be thread-safe.
|
||||
*/
|
||||
public interface BundleEncrypter {
|
||||
|
||||
/**
|
||||
* Encrypts the given bundle, replacing its contents with the encrypted
|
||||
* data.
|
||||
*/
|
||||
void encrypt(Bundle b);
|
||||
|
||||
/**
|
||||
* Decrypts the given bundle, replacing its contents with the decrypted
|
||||
* data, or returns false if the bundle contains invalid data, which may
|
||||
* occur if the process that created the encrypted bundle was terminated
|
||||
* and replaced by the current process.
|
||||
*/
|
||||
boolean decrypt(Bundle b);
|
||||
}
|
||||
@@ -95,21 +95,6 @@ public interface CryptoComponent {
|
||||
void encodeTag(byte[] tag, Cipher tagCipher, ErasableKey tagKey,
|
||||
long connection);
|
||||
|
||||
/**
|
||||
* Encrypts and authenticates the given plaintext so it can be written to
|
||||
* temporary storage. The ciphertext will not be decryptable after the app
|
||||
* restarts.
|
||||
*/
|
||||
byte[] encryptTemporaryStorage(byte[] plaintext);
|
||||
|
||||
/**
|
||||
* Decrypts and authenticates the given ciphertext that has been read from
|
||||
* temporary storage. Returns null if the ciphertext cannot be decrypted
|
||||
* and authenticated (for example, if it was written before the app
|
||||
* restarted).
|
||||
*/
|
||||
byte[] decryptTemporaryStorage(byte[] ciphertext);
|
||||
|
||||
/**
|
||||
* Encrypts and authenticates the given plaintext so it can be written to
|
||||
* storage. The encryption and authentication keys are derived from the
|
||||
|
||||
Reference in New Issue
Block a user