Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitiatorCurve25519 ¶
func InitiatorCurve25519( hashString string, publicIdentityKeyReceiver ed25519.PublicKey, publicSignedPreKeyReceiver ed25519.PublicKey, publicOneTimePreKeyReceiver ed25519.PublicKey, privateIdentityKeySender ed25519.PrivateKey, privateEphemeralKeySender ed25519.PrivateKey) ([]byte, error)
InitiatorCurve25519 performs the X3DH Keyexchange using Curve25519. It is used by the initiator of the Keyexchange.
It returns the shared secret and an error wich is nil if nothing bad happened.
!!Make sure to check the signature of the Public Keys before using this function!!
Parameters:
hashString: a string that specifies the used hash function (SHA256, SHA512) The rest is exacty what the names of the parameters are. The Private Keys have the type ed25519.PrivateKey and the Public Keys the type ed25519.PublicKey. To get those types import the package golang.org/x/crypto/ed25519.
func ReceiverCurve25519 ¶
func ReceiverCurve25519( hashString string, privateIdentityKeyReceiver ed25519.PrivateKey, privateSignedPreKeyReceiver ed25519.PrivateKey, privateOneTimePreKeyReceiver ed25519.PrivateKey, publicIdentityKeySender ed25519.PublicKey, publicEphemeralKeySender ed25519.PublicKey) ([]byte, error)
ReceiverCurve25519 performs the X3DH Keyexchange using Curve25519. It is used by the receiver of the Keyexchange.
It returns the shared secret and an error wich is nil if nothing bad happened.
!!Make sure to check the signature of the Public Keys before using this function!!
Parameters:
hashString: a string that specifies the used hash function (SHA256, SHA512) The rest is exacty what the names of the parameters are. The Private Keys have the type ed25519.PrivateKey and the Public Keys the type ed25519.PublicKey. To get those types import the package golang.org/x/crypto/ed25519.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.