x25519ell2

package
v0.0.0-...-7ea316a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: BSD-2-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package x25519ell2 implements obfuscated X25519 ECDH, via the Elligator2 mapping.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepresentativeToPublicKey

func RepresentativeToPublicKey(publicKey, representative *[32]byte)

RepresentativeToPublicKey converts a uniform representative value for a curve25519 public key, as produced by ScalarBaseMult, to a curve25519 public key.

func ScalarBaseMult

func ScalarBaseMult(publicKey, representative, privateKey *[32]byte, tweak byte) bool

ScalarBaseMult computes a curve25519 public key from a private key and also a uniform representative for that public key. Note that this function will fail and return false for about half of private keys.

The `privateKey` input MUST be the full 32-bytes of entropy (X25519-style "clamping" will result in non-uniformly distributed representatives).

WARNING: The underlying scalar multiply explicitly does not clear the cofactor, and thus the public keys will be different from those produced by normal implementations.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL