mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Extract contact exchange protocol from BT introduction protocol
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package org.briarproject.api.contact;
|
||||
|
||||
import org.briarproject.api.identity.Author;
|
||||
|
||||
public interface ContactExchangeListener {
|
||||
|
||||
void contactExchangeSucceeded(Author remoteAuthor);
|
||||
|
||||
/** The exchange failed because the contact already exists. */
|
||||
void duplicateContact(Author remoteAuthor);
|
||||
|
||||
/** A general failure. */
|
||||
void contactExchangeFailed();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.briarproject.api.contact;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.crypto.SecretKey;
|
||||
import org.briarproject.api.identity.LocalAuthor;
|
||||
import org.briarproject.api.plugins.duplex.DuplexTransportConnection;
|
||||
|
||||
/**
|
||||
* A task for conducting a contact information exchange with a remote peer.
|
||||
*/
|
||||
public interface ContactExchangeTask {
|
||||
|
||||
/**
|
||||
* Exchange contact information with a remote peer.
|
||||
*/
|
||||
void startExchange(ContactExchangeListener listener,
|
||||
LocalAuthor localAuthor, SecretKey masterSecret,
|
||||
DuplexTransportConnection conn, TransportId transportId,
|
||||
boolean alice, boolean reuseConnection);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public interface CryptoComponent {
|
||||
* sign.
|
||||
* @param alice whether the nonce is for use by Alice or Bob.
|
||||
*/
|
||||
byte[] deriveBTSignatureNonce(SecretKey master, boolean alice);
|
||||
byte[] deriveSignatureNonce(SecretKey master, boolean alice);
|
||||
|
||||
/**
|
||||
* Derives a commitment to the provided public key.
|
||||
|
||||
Reference in New Issue
Block a user