Documentation ¶
Index ¶
- func ValidateParameters(n *saferith.Modulus, s, t *saferith.Nat) error
- type Error
- type Parameters
- func (p Parameters) Commit(x, y *saferith.Int) *saferith.Nat
- func (Parameters) Domain() string
- func (p Parameters) N() *saferith.Modulus
- func (p Parameters) NArith() *arith.Modulus
- func (p Parameters) S() *saferith.Nat
- func (p Parameters) T() *saferith.Nat
- func (p Parameters) Verify(a, b, e *saferith.Int, S, T *saferith.Nat) bool
- func (p *Parameters) WriteTo(w io.Writer) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
func New ¶
func New(n *arith.Modulus, s, t *saferith.Nat) *Parameters
New returns a new set of Pedersen parameters. Assumes ValidateParameters(n, s, t) returns nil.
func (Parameters) Commit ¶
func (p Parameters) Commit(x, y *saferith.Int) *saferith.Nat
Commit computes sˣ tʸ (mod N)
x and y are taken as saferith.Int, because we want to keep these values in secret, in general. The commitment produced, on the other hand, hides their values, and can be safely shared.
func (Parameters) Domain ¶
func (Parameters) Domain() string
Domain implements hash.WriterToWithDomain, and separates this type within hash.Hash.
func (Parameters) NArith ¶
func (p Parameters) NArith() *arith.Modulus
N, but as an arith modulus, which is sometimes useful
Click to show internal directories.
Click to hide internal directories.