Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for FromP3 (0.12 sec)

  1. src/crypto/internal/edwards25519/tables.go

    	for i := 0; i < 7; i++ {
    		v.points[i+1].FromP3(tmpP3.fromP1xP1(tmpP1xP1.Add(&q2, &v.points[i])))
    	}
    }
    
    // This is not optimised for speed; fixed-base tables should be precomputed.
    func (v *nafLookupTable8) FromP3(q *Point) {
    	v.points[0].FromP3(q)
    	q2 := Point{}
    	q2.Add(q, q)
    	tmpP3 := Point{}
    	tmpP1xP1 := projP1xP1{}
    	for i := 0; i < 63; i++ {
    		v.points[i+1].FromP3(tmpP3.fromP1xP1(tmpP1xP1.AddAffine(&q2, &v.points[i])))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 05 21:02:45 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  2. src/crypto/internal/edwards25519/scalarmult.go

    func basepointTable() *[32]affineLookupTable {
    	basepointTablePrecomp.initOnce.Do(func() {
    		p := NewGeneratorPoint()
    		for i := 0; i < 32; i++ {
    			basepointTablePrecomp.table[i].FromP3(p)
    			for j := 0; j < 8; j++ {
    				p.Add(p, p)
    			}
    		}
    	})
    	return &basepointTablePrecomp.table
    }
    
    var basepointTablePrecomp struct {
    	table    [32]affineLookupTable
    	initOnce sync.Once
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 05 21:53:10 UTC 2022
    - 6.3K bytes
    - Viewed (0)
  3. src/crypto/internal/edwards25519/tables_test.go

    // license that can be found in the LICENSE file.
    
    package edwards25519
    
    import (
    	"testing"
    )
    
    func TestProjLookupTable(t *testing.T) {
    	var table projLookupTable
    	table.FromP3(B)
    
    	var tmp1, tmp2, tmp3 projCached
    	table.SelectInto(&tmp1, 6)
    	table.SelectInto(&tmp2, -2)
    	table.SelectInto(&tmp3, -4)
    	// Expect T1 + T2 + T3 = identity
    
    	var accP1xP1 projP1xP1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 05 21:53:10 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  4. src/crypto/internal/edwards25519/scalarmult_test.go

    	table := make([]affineLookupTable, 32)
    	for i := 0; i < 32; i++ {
    		// Build the table
    		table[i].FromP3(tmp3)
    		// Assert equality with the hardcoded one
    		if table[i] != basepointTable[i] {
    			t.Errorf("Basepoint table %d does not match", i)
    		}
    
    		// Set p = (16^2)*p = 256*p = 2^8*p
    		tmp2.FromP3(tmp3)
    		for j := 0; j < 7; j++ {
    			tmp1.Double(tmp2)
    			tmp2.FromP1xP1(tmp1)
    		}
    		tmp1.Double(tmp2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:26:17 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  5. src/crypto/internal/edwards25519/edwards25519_test.go

    	}
    	// Check that t is correct.
    	checkOnCurve(t, B)
    }
    
    func TestAddSubNegOnBasePoint(t *testing.T) {
    	checkLhs, checkRhs := &Point{}, &Point{}
    
    	checkLhs.Add(B, B)
    	tmpP2 := new(projP2).FromP3(B)
    	tmpP1xP1 := new(projP1xP1).Double(tmpP2)
    	checkRhs.fromP1xP1(tmpP1xP1)
    	if checkLhs.Equal(checkRhs) != 1 {
    		t.Error("B + B != [2]B")
    	}
    	checkOnCurve(t, checkLhs, checkRhs)
    
    	checkLhs.Subtract(B, B)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 10 18:45:00 UTC 2022
    - 9.3K bytes
    - Viewed (0)
Back to top