Documentation ¶
Overview ¶
Package scalar implements the ristretto255 scalar group.
Index ¶
- type Scalar
- func (s *Scalar) Add(x, y *Scalar) *Scalar
- func (s *Scalar) Bytes(b []byte) []byte
- func (s *Scalar) Equal(t *Scalar) int
- func (s *Scalar) FromCanonicalBytes(x []byte) error
- func (s *Scalar) FromUniformBytes(x []byte) *Scalar
- func (s *Scalar) Inv(t *Scalar) *Scalar
- func (s *Scalar) Mul(x, y *Scalar) *Scalar
- func (s *Scalar) Neg(x *Scalar) *Scalar
- func (s *Scalar) NonAdjacentForm(w uint) [256]int8
- func (s *Scalar) SignedRadix16() [64]int8
- func (s *Scalar) Sub(x, y *Scalar) *Scalar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scalar ¶
type Scalar [32]byte
A Scalar is an integer modulo l = 2^252 + 27742317777372353535851937790883648493, here represented as an opaque little-endian byte string.
func (*Scalar) FromCanonicalBytes ¶
FromCanonicalBytes sets s = x, where x is a 32 bytes little-endian encoding of s. If x is not a canonical encoding of s, FromCanonicalBytes returns an error and the receiver is unchanged.
func (*Scalar) FromUniformBytes ¶
FromUniformBytes sets s to an uniformly distributed value given 64 uniformly distributed random bytes.
func (*Scalar) NonAdjacentForm ¶
NonAdjacentForm computes a width-w non-adjacent form for this scalar.
func (*Scalar) SignedRadix16 ¶
Click to show internal directories.
Click to hide internal directories.