Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for Point (3.05 sec)

  1. src/crypto/elliptic/nistec.go

    // Encoding and decoding is 1/1000th of the runtime of a scalar multiplication,
    // so the overhead is acceptable.
    type nistCurve[Point nistPoint[Point]] struct {
    	newPoint func() Point
    	params   *CurveParams
    }
    
    // nistPoint is a generic constraint for the nistec Point types.
    type nistPoint[T any] interface {
    	Bytes() []byte
    	SetBytes([]byte) (T, error)
    	Add(T, T) T
    	Double(T) T
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 16:19:34 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/bench_test.go

    			fn(a[i]-a[i-1], a[i+len(a)/2-2]-a[i+len(a)/2-1])
    		}
    	}
    }
    
    type Point struct {
    	X, Y int
    }
    
    //go:noinline
    func sign(p1, p2, p3 Point) bool {
    	return (p1.X-p3.X)*(p2.Y-p3.Y)-(p2.X-p3.X)*(p1.Y-p3.Y) < 0
    }
    
    func BenchmarkInvertLessThanNoov(b *testing.B) {
    	p1 := Point{1, 2}
    	p2 := Point{2, 3}
    	p3 := Point{3, 4}
    	for i := 0; i < b.N; i++ {
    		sign(p1, p2, p3)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 21 02:36:06 UTC 2023
    - 835 bytes
    - Viewed (0)
  3. src/crypto/ecdh/nist.go

    	"crypto/internal/nistec"
    	"crypto/internal/randutil"
    	"errors"
    	"internal/byteorder"
    	"io"
    	"math/bits"
    )
    
    type nistCurve[Point nistPoint[Point]] struct {
    	name        string
    	newPoint    func() Point
    	scalarOrder []byte
    }
    
    // nistPoint is a generic constraint for the nistec Point types.
    type nistPoint[T any] interface {
    	Bytes() []byte
    	BytesX() ([]byte, error)
    	SetBytes([]byte) (T, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. src/crypto/elliptic/elliptic.go

    	x.FillBytes(ret[1 : 1+byteLen])
    	y.FillBytes(ret[1+byteLen : 1+2*byteLen])
    
    	return ret
    }
    
    // MarshalCompressed converts a point on the curve into the compressed form
    // specified in SEC 1, Version 2.0, Section 2.3.3. If the point is not on the
    // curve (or is the conventional point at infinity), the behavior is undefined.
    func MarshalCompressed(curve Curve, x, y *big.Int) []byte {
    	panicIfNotOnCurve(curve, x, y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/text/internal/language/compact/compact.go

    // ID for selecting language-related resources (such as translations) as well
    // as one for selecting regional defaults (currency, number formatting, etc.)
    //
    // It may want to export this functionality at some point, but at this point
    // this is only available for use within x/text.
    package compact // import "golang.org/x/text/internal/language/compact"
    
    import (
    	"sort"
    	"strings"
    
    	"golang.org/x/text/internal/language"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. src/cmp/cmp.go

    }
    
    // Less reports whether x is less than y.
    // For floating-point types, a NaN is considered less than any non-NaN,
    // and -0.0 is not less than (is equal to) 0.0.
    func Less[T Ordered](x, y T) bool {
    	return (isNaN(x) && !isNaN(y)) || x < y
    }
    
    // Compare returns
    //
    //	-1 if x is less than y,
    //	 0 if x equals y,
    //	+1 if x is greater than y.
    //
    // For floating-point types, a NaN is considered less than any non-NaN,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 16:31:02 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. src/crypto/ecdh/ecdh.go

    	NewPrivateKey(key []byte) (*PrivateKey, error)
    
    	// NewPublicKey checks that key is valid and returns a PublicKey.
    	//
    	// For NIST curves, this decodes an uncompressed point according to SEC 1,
    	// Version 2.0, Section 2.3.4. Compressed encodings and the point at
    	// infinity are rejected.
    	//
    	// For X25519, this only checks the u-coordinate length. Adversarially
    	// selected public keys can cause ECDH to return an error.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  8. src/crypto/elliptic/params.go

    // to provide any security property.
    type CurveParams struct {
    	P       *big.Int // the order of the underlying field
    	N       *big.Int // the order of the base point
    	B       *big.Int // the constant of the curve equation
    	Gx, Gy  *big.Int // (x,y) of the base point
    	BitSize int      // the size of the underlying field
    	Name    string   // the canonical name of the curve
    }
    
    func (curve *CurveParams) Params() *CurveParams {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 16 17:46:09 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testshared/testdata/dep3/dep3.go

    package dep3
    
    // The point of this test file is that it references a type from
    // depBase that is also referenced in dep2, but dep2 is loaded by the
    // linker before depBase (because it is earlier in the import list).
    // There was a bug in the linker where it would not correctly read out
    // the type data in this case and later crash.
    
    import (
    	"testshared/dep2"
    	"testshared/depBase"
    )
    
    type Dep3 struct {
    	dep  depBase.Dep
    	dep2 dep2.Dep2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 503 bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testerrors/testdata/issue42580.go

    	doublePointerChecked      = []byte{1}
    	singleInnerPointerChecked = []byte{1}
    )
    
    // This test checks the positions of variable identifiers.
    // Changing the positions of the test variables idents after this point will break the test.
    
    func TestSingleArgumentCast() C.int {
    	retcode := C.func_with_char((*C.char)(unsafe.Pointer(&checkedPointer[0])), unsafe.Pointer(C.strarg))
    	return retcode
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
Back to top