Documentation ¶
Index ¶
- func Context(client, server kyber.Point) []byte
- func DhExchange(ownPrivate kyber.Scalar, remotePublic kyber.Point) kyber.Point
- func GenEphemeralKeys(r *onet.Roster) (map[string]kyber.Scalar, map[string]kyber.Point)
- func GenNonce() []byte
- func NewAEAD(fn func() hash.Hash, preSharedKey kyber.Point, context []byte) (cipher.AEAD, error)
- func SignWithNonce(privateKey kyber.Scalar, msg []byte, nonce []byte) ([]byte, error)
- func VerifyWithNonce(publicKey kyber.Point, msg []byte, nonce []byte, sig []byte) error
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Context ¶
func Context(client, server kyber.Point) []byte
Context returns the context slice to be used when encrypting a share
func DhExchange ¶
func DhExchange(ownPrivate kyber.Scalar, remotePublic kyber.Point) kyber.Point
DhExchange computes the shared key from a private key and a public key
func GenEphemeralKeys ¶
GenEphemeralKeys generate an ephemeral key pair for every conode in the roster. Note: the security of this function should be verified, because we return also the private keys
func SignWithNonce ¶
SignWithNonce signs the message concatenated with the nonce using a Schnorr signature.
Types ¶
type Resource ¶
Resource is used to store everything is needed about the resource to run the protocol
func FetchAllResources ¶
FetchAllResources fetches the main content and (part of) the files referenced in it
func FetchMainResource ¶
FetchMainResource fetches the resource referenced by URL and return it as a format-agnostic array of bytes, together with the content type. Note that this function only fetches the main content referenced by the URL and not other contents present in the resource.