Documentation ¶
Index ¶
- func ValidateParameters(n *safenum.Modulus, s, t *safenum.Nat) error
- type Error
- type Parameters
- func (p Parameters) Commit(x, y *safenum.Int) *safenum.Nat
- func (Parameters) Domain() string
- func (p Parameters) N() *safenum.Modulus
- func (p Parameters) S() *safenum.Nat
- func (p Parameters) T() *safenum.Nat
- func (p Parameters) Verify(a, b, e *safenum.Int, S, T *safenum.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 *safenum.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 *safenum.Int) *safenum.Nat
Commit computes sˣ tʸ (mod N)
x and y are taken as safenum.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.
Click to show internal directories.
Click to hide internal directories.