github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/crypto/internal/edwards25519/scalarmult.go (about)

     1  // Copyright (c) 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package edwards25519
     6  
     7  // ScalarBaseMult sets v = x * B, where B is the canonical generator, and
     8  // returns v.
     9  //
    10  // The scalar multiplication is done in constant time.
    11  func (v *Point) ScalarBaseMult(x *Scalar) *Point
    12  
    13  // ScalarMult sets v = x * q, and returns v.
    14  //
    15  // The scalar multiplication is done in constant time.
    16  func (v *Point) ScalarMult(x *Scalar, q *Point) *Point
    17  
    18  // VarTimeDoubleScalarBaseMult sets v = a * A + b * B, where B is the canonical
    19  // generator, and returns v.
    20  //
    21  // Execution time depends on the inputs.
    22  func (v *Point) VarTimeDoubleScalarBaseMult(a *Scalar, A *Point, b *Scalar) *Point