mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
The word "tag" was overloaded, so from now on use "tag" for the
predefined tags in the protocol and serial components, and "IV" for the encrypted IVs used to identify connections in the transport component.
This commit is contained in:
@@ -10,31 +10,31 @@ import javax.crypto.SecretKey;
|
||||
|
||||
public interface CryptoComponent {
|
||||
|
||||
SecretKey deriveIncomingMacKey(byte[] secret);
|
||||
|
||||
SecretKey deriveIncomingFrameKey(byte[] secret);
|
||||
|
||||
SecretKey deriveIncomingTagKey(byte[] secret);
|
||||
SecretKey deriveIncomingIvKey(byte[] secret);
|
||||
|
||||
SecretKey deriveOutgoingMacKey(byte[] secret);
|
||||
SecretKey deriveIncomingMacKey(byte[] secret);
|
||||
|
||||
SecretKey deriveOutgoingFrameKey(byte[] secret);
|
||||
|
||||
SecretKey deriveOutgoingTagKey(byte[] secret);
|
||||
SecretKey deriveOutgoingIvKey(byte[] secret);
|
||||
|
||||
SecretKey deriveOutgoingMacKey(byte[] secret);
|
||||
|
||||
KeyPair generateKeyPair();
|
||||
|
||||
SecretKey generateSecretKey();
|
||||
|
||||
Cipher getFrameCipher();
|
||||
|
||||
Cipher getIvCipher();
|
||||
|
||||
KeyParser getKeyParser();
|
||||
|
||||
Mac getMac();
|
||||
|
||||
MessageDigest getMessageDigest();
|
||||
|
||||
Cipher getFrameCipher();
|
||||
|
||||
Signature getSignature();
|
||||
|
||||
Cipher getTagCipher();
|
||||
}
|
||||
|
||||
@@ -10,8 +10,9 @@ import net.sf.briar.api.db.DbException;
|
||||
public interface ConnectionRecogniser {
|
||||
|
||||
/**
|
||||
* Returns the ID of the contact who created the tag if the connection
|
||||
* should be accepted, or null if the connection should be rejected.
|
||||
* Returns the ID of the contact who created the encrypted IV if the
|
||||
* connection should be accepted, or null if the connection should be
|
||||
* rejected.
|
||||
*/
|
||||
ContactId acceptConnection(byte[] tag) throws DbException;
|
||||
ContactId acceptConnection(byte[] encryptedIv) throws DbException;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ public interface TransportConstants {
|
||||
*/
|
||||
static final int MAX_FRAME_LENGTH = 65536; // 2^16
|
||||
|
||||
/** The length in bytes of the tag that uniquely identifies a connection. */
|
||||
static final int TAG_LENGTH = 16;
|
||||
/**
|
||||
* The length in bytes of the encrypted IV that uniquely identifies a
|
||||
* connection.
|
||||
*/
|
||||
static final int IV_LENGTH = 16;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user