Package org.signal.libsignal.sgxsession
Class SgxClient
-
- All Implemented Interfaces:
-
org.signal.libsignal.internal.NativeHandleGuard.Owner
public class SgxClient extends NativeHandleGuard.SimpleOwner
SgxClient provides bindings to interact with a Signal SGX service.
Interaction with the service is done over a websocket, which is handled by the client. Once the websocket has been initiated, the client establishes a connection in the following manner:
- connect to the service websocket, read service attestation
- instantiate SgxClient with the attestation message
- send SgxClient.initialRequest()
- receive a response and pass to SgxClient.completeHandshake()
-
-
Method Summary
Modifier and Type Method Description Array<byte>initialRequest()Initial request to send to SGX service, which begins post-attestation handshake. voidcompleteHandshake(Array<byte> handshakeResponse)Called by client upon receipt of first non-attestation message from service, to complete handshake. Array<byte>establishedSend(Array<byte> plaintextToSend)Called by client after completeHandshake has succeeded, to encrypt a message to send. Array<byte>establishedRecv(Array<byte> receivedCiphertext)Called by client after completeHandshake has succeeded, to decrypt a received message. -
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.SimpleOwner
unsafeNativeHandleWithoutGuard -
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.Owner
guard, guardedMap, guardedMapChecked, guardedRun, guardedRunChecked -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
initialRequest
Array<byte> initialRequest()
Initial request to send to SGX service, which begins post-attestation handshake.
-
completeHandshake
void completeHandshake(Array<byte> handshakeResponse)
Called by client upon receipt of first non-attestation message from service, to complete handshake.
-
establishedSend
Array<byte> establishedSend(Array<byte> plaintextToSend)
Called by client after completeHandshake has succeeded, to encrypt a message to send.
-
establishedRecv
Array<byte> establishedRecv(Array<byte> receivedCiphertext)
Called by client after completeHandshake has succeeded, to decrypt a received message.
-
-
-
-