diff --git a/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/KeyAgreementCrypto.java b/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/KeyAgreementCrypto.java index 1dcf7ebf8bf2e56b29f6f2d1d93cc54036ca7790..a35cd3114e26e3ff69e991fb2e35138faed2c042 100644 --- a/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/KeyAgreementCrypto.java +++ b/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/KeyAgreementCrypto.java @@ -1,5 +1,9 @@ package org.briarproject.bramble.api.crypto; +/** + * Crypto operations for the key agreement protocol - see + * https://code.briarproject.org/akwizgran/briar-spec/blob/master/protocols/BQP.md + */ public interface KeyAgreementCrypto { /** @@ -21,8 +25,6 @@ public interface KeyAgreementCrypto { /** * Derives a commitment to the provided public key. - * <p/> - * Used by the key exchange protocol. * * @param publicKey the public key * @return the commitment to the provided public key. @@ -31,8 +33,6 @@ public interface KeyAgreementCrypto { /** * Derives the content of a confirmation record. - * <p/> - * Used by the key exchange protocol. * * @param sharedSecret the common shared secret * @param theirPayload the key exchange payload of the remote party diff --git a/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/TransportCrypto.java b/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/TransportCrypto.java index e8be1484d6d0134a5a934a535a092cbb52f9ad3c..6385d1f015bbf7d0dff30d0c03390caf7af11196 100644 --- a/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/TransportCrypto.java +++ b/bramble-api/src/main/java/org/briarproject/bramble/api/crypto/TransportCrypto.java @@ -3,13 +3,15 @@ package org.briarproject.bramble.api.crypto; import org.briarproject.bramble.api.plugin.TransportId; import org.briarproject.bramble.api.transport.TransportKeys; +/** + * Crypto operations for the transport security protocol - see + * https://code.briarproject.org/akwizgran/briar-spec/blob/master/protocols/BTP.md + */ public interface TransportCrypto { /** * Derives initial transport keys for the given transport in the given * rotation period from the given master secret. - * <p/> - * Used by the transport security protocol. * * @param alice whether the keys are for use by Alice or Bob. */ @@ -18,16 +20,12 @@ public interface TransportCrypto { /** * Rotates the given transport keys to the given rotation period. If the - * keys are for a future rotation period they are not rotated. - * <p/> - * Used by the transport security protocol. + * keys are for the given period or any later period they are not rotated. */ TransportKeys rotateTransportKeys(TransportKeys k, long rotationPeriod); /** * Encodes the pseudo-random tag that is used to recognise a stream. - * <p/> - * Used by the transport security protocol. */ void encodeTag(byte[] tag, SecretKey tagKey, int protocolVersion, long streamNumber);