Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for P521Element (0.1 sec)

  1. src/crypto/internal/nistec/fiat/p521.go

    func (e *P521Element) Sub(t1, t2 *P521Element) *P521Element {
    	p521Sub(&e.x, &t1.x, &t2.x)
    	return e
    }
    
    // Mul sets e = t1 * t2, and returns e.
    func (e *P521Element) Mul(t1, t2 *P521Element) *P521Element {
    	p521Mul(&e.x, &t1.x, &t2.x)
    	return e
    }
    
    // Square sets e = t * t, and returns e.
    func (e *P521Element) Square(t *P521Element) *P521Element {
    	p521Square(&e.x, &t.x)
    	return e
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 12 00:04:29 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  2. src/crypto/internal/nistec/p521.go

    func p521Polynomial(y2, x *fiat.P521Element) *fiat.P521Element {
    	y2.Square(x)
    	y2.Mul(y2, x)
    
    	threeX := new(fiat.P521Element).Add(x, x)
    	threeX.Add(threeX, x)
    	y2.Sub(y2, threeX)
    
    	return y2.Add(y2, p521B())
    }
    
    func p521CheckOnCurve(x, y *fiat.P521Element) error {
    	// y² = x³ - 3x + b
    	rhs := p521Polynomial(new(fiat.P521Element), x)
    	lhs := new(fiat.P521Element).Square(y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 12 00:04:29 UTC 2022
    - 17K bytes
    - Viewed (0)
  3. src/crypto/internal/nistec/fiat/p521_invert.go

    // license that can be found in the LICENSE file.
    
    // Code generated by addchain. DO NOT EDIT.
    
    package fiat
    
    // Invert sets e = 1/x, and returns e.
    //
    // If x == 0, Invert returns e = 0.
    func (e *P521Element) Invert(x *P521Element) *P521Element {
    	// Inversion is implemented as exponentiation with exponent p − 2.
    	// The sequence of 13 multiplications and 520 squarings is derived from the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 12 00:04:29 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  4. src/crypto/internal/nistec/fiat/fiat_test.go

    		v := new(fiat.P384Element).One()
    		b.ReportAllocs()
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			v.Mul(v, v)
    		}
    	})
    	b.Run("P521", func(b *testing.B) {
    		v := new(fiat.P521Element).One()
    		b.ReportAllocs()
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			v.Mul(v, v)
    		}
    	})
    }
    
    func BenchmarkSquare(b *testing.B) {
    	b.Run("P224", func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 05 21:53:03 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  5. src/crypto/internal/nistec/fiat/generate.go

    	// Note that unsaturated_solinas would be about 2x faster than
    	// word_by_word_montgomery for P-521, but this curve is used rarely enough
    	// that it's not worth carrying unsaturated_solinas support for it.
    	{
    		Element:  "P521Element",
    		Prime:    "2^521 - 1",
    		Prefix:   "p521",
    		FiatType: "[9]uint64",
    		BytesLen: 66,
    	},
    }
    
    func main() {
    	t := template.Must(template.New("montgomery").Parse(tmplWrapper))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 12 00:04:29 UTC 2022
    - 9.1K bytes
    - Viewed (0)
  6. src/crypto/internal/nistec/generate.go

    		BuildTags: "(!amd64 && !arm64 && !ppc64le && !s390x) || purego",
    	},
    	{
    		P:       "P384",
    		Element: "fiat.P384Element",
    		Params:  elliptic.P384().Params(),
    	},
    	{
    		P:       "P521",
    		Element: "fiat.P521Element",
    		Params:  elliptic.P521().Params(),
    	},
    }
    
    func main() {
    	t := template.Must(template.New("tmplNISTEC").Parse(tmplNISTEC))
    
    	tmplAddchainFile, err := os.CreateTemp("", "addchain-template")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top