Renamed "encrypted IVs" as "tags" (actual crypto changes to follow).

This commit is contained in:
akwizgran
2011-12-02 12:02:55 +00:00
parent f7360cddde
commit f3fdd85996
26 changed files with 225 additions and 227 deletions

View File

@@ -11,7 +11,7 @@ public interface CryptoComponent {
ErasableKey deriveFrameKey(byte[] secret, boolean initiator);
ErasableKey deriveIvKey(byte[] secret, boolean initiator);
ErasableKey deriveTagKey(byte[] secret, boolean initiator);
ErasableKey deriveMacKey(byte[] secret, boolean initiator);
@@ -23,8 +23,6 @@ public interface CryptoComponent {
Cipher getFrameCipher();
Cipher getIvCipher();
KeyParser getKeyParser();
Mac getMac();
@@ -34,4 +32,6 @@ public interface CryptoComponent {
SecureRandom getSecureRandom();
Signature getSignature();
Cipher getTagCipher();
}

View File

@@ -6,7 +6,7 @@ import net.sf.briar.api.protocol.TransportIndex;
public interface BatchConnectionFactory {
void createIncomingConnection(ConnectionContext ctx,
BatchTransportReader r, byte[] encryptedIv);
BatchTransportReader r, byte[] tag);
void createOutgoingConnection(ContactId c, TransportIndex i,
BatchTransportWriter w);

View File

@@ -9,7 +9,7 @@ public interface ConnectionReaderFactory {
* initiator's side of a stream-mode connection.
*/
ConnectionReader createConnectionReader(InputStream in,
ConnectionContext ctx, byte[] encryptedIv);
ConnectionContext ctx, byte[] tag);
/**
* Creates a connection reader for the responder's side of a stream-mode

View File

@@ -13,8 +13,7 @@ public interface ConnectionRecogniser {
* Asynchronously calls one of the callback's connectionAccepted(),
* connectionRejected() or handleException() methods.
*/
void acceptConnection(TransportId t, byte[] encryptedIv,
Callback c);
void acceptConnection(TransportId t, byte[] tag, Callback c);
interface Callback {

View File

@@ -16,5 +16,5 @@ public interface ConnectionWriterFactory {
* connection.
*/
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
ConnectionContext ctx, byte[] encryptedIv);
ConnectionContext ctx, byte[] tag);
}

View File

@@ -6,7 +6,7 @@ import net.sf.briar.api.protocol.TransportIndex;
public interface StreamConnectionFactory {
void createIncomingConnection(ConnectionContext ctx,
StreamTransportConnection s, byte[] encryptedIv);
StreamTransportConnection s, byte[] tag);
void createOutgoingConnection(ContactId c, TransportIndex i,
StreamTransportConnection s);

View File

@@ -8,10 +8,10 @@ public interface TransportConstants {
static final int MAX_FRAME_LENGTH = 65536; // 2^16, 64 KiB
/**
* The length in bytes of the encrypted IV that uniquely identifies a
* The length in bytes of the pseudo-random tag that uniquely identifies a
* connection.
*/
static final int IV_LENGTH = 16;
static final int TAG_LENGTH = 16;
/**
* The minimum connection length in bytes that all transport plugins must