Documentation
¶
Index ¶
- Constants
- func AffineFromMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
- func AffineToMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
- func FromMontgomery(scalars core.HostOrDeviceSlice) runtime.EIcicleError
- func GenerateAffinePoints(size int) core.HostSlice[Affine]
- func GenerateProjectivePoints(size int) core.HostSlice[Projective]
- func GenerateScalars(size int) core.HostSlice[ScalarField]
- func ProjectiveFromMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
- func ProjectiveToMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
- func ToMontgomery(scalars core.HostOrDeviceSlice) runtime.EIcicleError
- type Affine
- type BaseField
- func (f BaseField) AsPointer() *uint32
- func (f *BaseField) FromBytesLittleEndian(bytes []byte) BaseField
- func (f *BaseField) FromLimbs(limbs []uint32) BaseField
- func (f *BaseField) FromUint32(v uint32) BaseField
- func (f BaseField) GetLimbs() []uint32
- func (f *BaseField) IsZero() bool
- func (f BaseField) Len() int
- func (f *BaseField) One() BaseField
- func (f BaseField) Size() int
- func (f BaseField) ToBytesLittleEndian() []byte
- func (f *BaseField) Zero() BaseField
- type Projective
- func (p Projective) Add(p2 *Projective) Projective
- func (p Projective) AsPointer() *uint32
- func (p *Projective) FromAffine(a Affine) Projective
- func (p *Projective) FromLimbs(x, y, z []uint32) Projective
- func (p Projective) ProjectiveEq(p2 *Projective) bool
- func (p Projective) Size() int
- func (p Projective) Sub(p2 *Projective) Projective
- func (p *Projective) ToAffine() Affine
- func (p *Projective) Zero() Projective
- type ScalarField
- func (f ScalarField) Add(f2 *ScalarField) ScalarField
- func (f ScalarField) AsPointer() *uint32
- func (f *ScalarField) FromBytesLittleEndian(bytes []byte) ScalarField
- func (f *ScalarField) FromLimbs(limbs []uint32) ScalarField
- func (f *ScalarField) FromUint32(v uint32) ScalarField
- func (f ScalarField) GetLimbs() []uint32
- func (f ScalarField) Inv() ScalarField
- func (f *ScalarField) IsZero() bool
- func (f ScalarField) Len() int
- func (f ScalarField) Mul(f2 *ScalarField) ScalarField
- func (f *ScalarField) One() ScalarField
- func (f ScalarField) Pow(exp int) ScalarField
- func (f ScalarField) Size() int
- func (f ScalarField) Sqr() ScalarField
- func (f ScalarField) Sub(f2 *ScalarField) ScalarField
- func (f ScalarField) ToBytesLittleEndian() []byte
- func (f *ScalarField) Zero() ScalarField
Constants ¶
View Source
const (
BASE_LIMBS int = 8
)
View Source
const (
SCALAR_LIMBS int = 8
)
Variables ¶
This section is empty.
Functions ¶
func AffineFromMontgomery ¶
func AffineFromMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
func AffineToMontgomery ¶
func AffineToMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
func FromMontgomery ¶
func FromMontgomery(scalars core.HostOrDeviceSlice) runtime.EIcicleError
func GenerateProjectivePoints ¶
func GenerateProjectivePoints(size int) core.HostSlice[Projective]
func GenerateScalars ¶
func GenerateScalars(size int) core.HostSlice[ScalarField]
func ProjectiveFromMontgomery ¶
func ProjectiveFromMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
func ProjectiveToMontgomery ¶
func ProjectiveToMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError
func ToMontgomery ¶
func ToMontgomery(scalars core.HostOrDeviceSlice) runtime.EIcicleError
Types ¶
type Affine ¶
type Affine struct {
X, Y BaseField
}
func AffineFromProjective ¶
func AffineFromProjective(p *Projective) Affine
func (Affine) ToProjective ¶
func (a Affine) ToProjective() Projective
type BaseField ¶
type BaseField struct {
// contains filtered or unexported fields
}
func (*BaseField) FromBytesLittleEndian ¶
func (*BaseField) FromUint32 ¶
func (BaseField) ToBytesLittleEndian ¶
type Projective ¶
type Projective struct {
X, Y, Z BaseField
}
func (Projective) Add ¶ added in v3.3.0
func (p Projective) Add(p2 *Projective) Projective
func (Projective) AsPointer ¶
func (p Projective) AsPointer() *uint32
func (*Projective) FromAffine ¶
func (p *Projective) FromAffine(a Affine) Projective
func (*Projective) FromLimbs ¶
func (p *Projective) FromLimbs(x, y, z []uint32) Projective
func (Projective) ProjectiveEq ¶
func (p Projective) ProjectiveEq(p2 *Projective) bool
func (Projective) Size ¶
func (p Projective) Size() int
func (Projective) Sub ¶ added in v3.3.0
func (p Projective) Sub(p2 *Projective) Projective
func (*Projective) ToAffine ¶
func (p *Projective) ToAffine() Affine
func (*Projective) Zero ¶
func (p *Projective) Zero() Projective
type ScalarField ¶
type ScalarField struct {
// contains filtered or unexported fields
}
func (ScalarField) Add ¶ added in v3.3.0
func (f ScalarField) Add(f2 *ScalarField) ScalarField
func (ScalarField) AsPointer ¶
func (f ScalarField) AsPointer() *uint32
func (*ScalarField) FromBytesLittleEndian ¶
func (f *ScalarField) FromBytesLittleEndian(bytes []byte) ScalarField
func (*ScalarField) FromLimbs ¶
func (f *ScalarField) FromLimbs(limbs []uint32) ScalarField
func (*ScalarField) FromUint32 ¶
func (f *ScalarField) FromUint32(v uint32) ScalarField
func (ScalarField) GetLimbs ¶
func (f ScalarField) GetLimbs() []uint32
func (ScalarField) Inv ¶ added in v3.3.0
func (f ScalarField) Inv() ScalarField
func (*ScalarField) IsZero ¶ added in v3.1.0
func (f *ScalarField) IsZero() bool
func (ScalarField) Len ¶
func (f ScalarField) Len() int
func (ScalarField) Mul ¶ added in v3.3.0
func (f ScalarField) Mul(f2 *ScalarField) ScalarField
func (*ScalarField) One ¶
func (f *ScalarField) One() ScalarField
func (ScalarField) Pow ¶ added in v3.3.0
func (f ScalarField) Pow(exp int) ScalarField
func (ScalarField) Size ¶
func (f ScalarField) Size() int
func (ScalarField) Sqr ¶ added in v3.3.0
func (f ScalarField) Sqr() ScalarField
func (ScalarField) Sub ¶ added in v3.3.0
func (f ScalarField) Sub(f2 *ScalarField) ScalarField
func (ScalarField) ToBytesLittleEndian ¶
func (f ScalarField) ToBytesLittleEndian() []byte
func (*ScalarField) Zero ¶
func (f *ScalarField) Zero() ScalarField
Click to show internal directories.
Click to hide internal directories.