package csidh
import "github.com/cloudflare/circl/dh/csidh"
Package csidh implements commutative supersingular isogeny-based Diffie-Hellman key exchange algorithm (CSIDH) resulting from the group action. Implementation uses prime field of a size 512-bits. This implementation is highly experimental work and currently it is not suitable for securing systems.
References:
- cSIDH: ia.cr/2018/383
- Faster cSIDH: ia.cr/2018/782
Index ¶
- Constants
- func DeriveSecret(out *[64]byte, pub *PublicKey, prv *PrivateKey, rng io.Reader) bool
- func GeneratePrivateKey(key *PrivateKey, rng io.Reader) error
- func GeneratePublicKey(pub *PublicKey, prv *PrivateKey, rng io.Reader)
- func Validate(pub *PublicKey, rng io.Reader) bool
- type PrivateKey
- type PublicKey
Constants ¶
const ( // PrivateKeySize is a size of cSIDH/512 private key in bytes. PrivateKeySize = 37 // PublicKeySize is a size of cSIDH/512 public key in bytes. PublicKeySize = 64 // SharedSecretSize is a size of cSIDH/512 shared secret in bytes. = 64 )
Functions ¶
func DeriveSecret ¶
DeriveSecret computes a cSIDH shared secret. If successful, returns true and fills 'out' with shared secret. Function returns false in case 'pub' is invalid. More precisely, shared secret is a Montgomery coefficient A of a secret curve y^2 = x^3 + Ax^2 + x, computed by applying action of a prv.e on a curve represented by pub.a.
func GeneratePrivateKey ¶
func GeneratePrivateKey(key *PrivateKey, rng io.Reader) error
func GeneratePublicKey ¶
func GeneratePublicKey(pub *PublicKey, prv *PrivateKey, rng io.Reader)
func Validate ¶
Validate returns true if 'pub' is a valid cSIDH public key, otherwise false. More precisely, the function verifies that curve
y^2 = x^3 + pub.a * x^2 + x
is supersingular.
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
Defines operations on private key
func (PrivateKey) Export ¶
func (c PrivateKey) Export(out []byte) bool
func (*PrivateKey) Import ¶
func (c *PrivateKey) Import(key []byte) bool
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
Defines operations on public key
func (*PublicKey) Export ¶
Assumes key is exported as encoded in Montgomery domain.
func (*PublicKey) Import ¶
Assumes key is in Montgomery domain.
Source Files ¶
consts.go csidh.go curve.go doc.go fp511.go fp511_amd64.go fp511_generic.go
- Version
- v1.6.1 (latest)
- Published
- Apr 9, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 2 days ago –
Tools for package owners.