YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.secure.Identity Class Reference

The identity of one side of the protocol: a Curve25519 key pair whose public key, base64url without padding (43 characters), is the client_id or server_id and at the same time the static key of the Noise handshake. More...

Collaboration diagram for de.yaacc.sendspin.secure.Identity:
Collaboration graph

Public Member Functions

String id ()
 The id: base64url of the public key, 43 characters.
 
byte[] publicKey ()
 
byte[] exportPrivateKey ()
 For storing it wrapped (never for a log).
 
X25519Keys.KeyPair keyPair ()
 The handshake takes the key pair of the identity; the pair is the identity's own and is kept by it.
 
void destroy ()
 

Static Public Member Functions

static Identity generate (SecureRandom random)
 
static Identity fromPrivateKey (byte[] privateKey)
 

Detailed Description

The identity of one side of the protocol: a Curve25519 key pair whose public key, base64url without padding (43 characters), is the client_id or server_id and at the same time the static key of the Noise handshake.

The key is drawn from a CSPRNG once per installation and role and is never a shared default.

Member Function Documentation

◆ fromPrivateKey()

static Identity de.yaacc.sendspin.secure.Identity.fromPrivateKey ( byte[] privateKey)
static
Parameters
privateKey32 bytes, as exportPrivateKey() gave them
Here is the call graph for this function:

The documentation for this class was generated from the following file: