Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for FromP3 (0.15 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.go

    	0x73, 0xfe, 0x6f, 0x2b, 0xee, 0x6c, 0x03, 0x52})
    var d2 = new(field.Element).Add(d, d)
    
    func (v *projCached) FromP3(p *Point) *projCached {
    	v.YplusX.Add(&p.y, &p.x)
    	v.YminusX.Subtract(&p.y, &p.x)
    	v.Z.Set(&p.z)
    	v.T2d.Multiply(&p.t, d2)
    	return v
    }
    
    func (v *affineCached) FromP3(p *Point) *affineCached {
    	v.YplusX.Add(&p.y, &p.x)
    	v.YminusX.Subtract(&p.y, &p.x)
    	v.T2d.Multiply(&p.t, d2)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 13 19:21:54 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  6. 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)
  7. src/cmd/internal/obj/link.go

    	Destination
    )
    
    // From3Type returns p.GetFrom3().Type, or TYPE_NONE when
    // p.GetFrom3() returns nil.
    func (p *Prog) From3Type() AddrType {
    	from3 := p.GetFrom3()
    	if from3 == nil {
    		return TYPE_NONE
    	}
    	return from3.Type
    }
    
    // GetFrom3 returns second source operand (the first is Prog.From).
    // The same kinds of operands are saved in order so GetFrom3 actually
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  8. src/cmd/internal/obj/x86/obj6.go

    	p1.From.Sym = source.Sym
    	p1.From.Name = obj.NAME_GOTREF
    	p1.To.Type = obj.TYPE_REG
    	p1.To.Reg = reg
    
    	p2.As = p.As
    	p2.From = p.From
    	p2.To = p.To
    	if from3 := p.GetFrom3(); from3 != nil {
    		p2.AddRestSource(*from3)
    	}
    	if p.From.Name == obj.NAME_EXTERN {
    		p2.From.Reg = reg
    		p2.From.Name = obj.NAME_NONE
    		p2.From.Sym = nil
    	} else if p.To.Name == obj.NAME_EXTERN {
    		p2.To.Reg = reg
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:36:45 UTC 2023
    - 40.9K bytes
    - Viewed (0)
  9. src/cmd/internal/obj/x86/asm6.go

    			case Zevex_i_rm_v_r:
    				imm, from, from3, to := unpackOps4(p)
    				ab.evex = newEVEXBits(z, &o.op)
    				ab.asmevex(ctxt, p, from, from3, to, nil)
    				ab.asmand(ctxt, cursym, p, from, to)
    				ab.Put1(byte(imm.Offset))
    
    			case Zevex_i_rm_v_k_r:
    				imm, from, from3, kmask, to := unpackOps5(p)
    				ab.evex = newEVEXBits(z, &o.op)
    				ab.asmevex(ctxt, p, from, from3, to, kmask)
    				ab.asmand(ctxt, cursym, p, from, to)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 146.9K bytes
    - Viewed (0)
  10. src/cmd/internal/obj/loong64/asm.go

    	instoffset int64
    	pc         int64
    }
    
    // Instruction layout.
    
    const (
    	FuncAlign = 4
    	loopAlign = 16
    )
    
    type Optab struct {
    	as    obj.As
    	from1 uint8
    	reg   uint8
    	from3 uint8
    	to1   uint8
    	to2   uint8
    	type_ int8
    	size  int8
    	param int16
    	flag  uint8
    }
    
    const (
    	NOTUSETMP = 1 << iota // p expands to multiple instructions, but does NOT use REGTMP
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:04:54 UTC 2024
    - 61.8K bytes
    - Viewed (0)
Back to top