Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for carryPropagateGeneric (0.28 sec)

  1. src/crypto/internal/edwards25519/field/fe_arm64_noasm.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !arm64 || purego
    
    package field
    
    func (v *Element) carryPropagate() *Element {
    	return v.carryPropagateGeneric()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 290 bytes
    - Viewed (0)
  2. src/crypto/internal/edwards25519/field/fe_arm64.s

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !purego
    
    #include "textflag.h"
    
    // carryPropagate works exactly like carryPropagateGeneric and uses the
    // same AND, ADD, and LSR+MADD instructions emitted by the compiler, but
    // avoids loading R0-R4 twice and uses LDP and STP.
    //
    // See https://golang.org/issues/43145 for the main compiler issue.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. src/crypto/internal/edwards25519/field/fe_generic.go

    	rr4 := r4.lo&maskLow51Bits + c3
    
    	*v = Element{rr0, rr1, rr2, rr3, rr4}
    	v.carryPropagate()
    }
    
    // carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
    // identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry.
    func (v *Element) carryPropagateGeneric() *Element {
    	c0 := v.l0 >> 51
    	c1 := v.l1 >> 51
    	c2 := v.l2 >> 51
    	c3 := v.l3 >> 51
    	c4 := v.l4 >> 51
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 27 01:16:19 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  4. src/crypto/internal/edwards25519/field/fe_test.go

    func TestCarryPropagate(t *testing.T) {
    	asmLikeGeneric := func(a [5]uint64) bool {
    		t1 := &Element{a[0], a[1], a[2], a[3], a[4]}
    		t2 := &Element{a[0], a[1], a[2], a[3], a[4]}
    
    		t1.carryPropagate()
    		t2.carryPropagateGeneric()
    
    		if *t1 != *t2 {
    			t.Logf("got: %#v,\nexpected: %#v", t1, t2)
    		}
    
    		return *t1 == *t2 && isInBounds(t2)
    	}
    
    	if err := quick.Check(asmLikeGeneric, quickCheckConfig(1024)); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:26:17 UTC 2023
    - 13.9K bytes
    - Viewed (0)
  5. src/crypto/internal/edwards25519/field/fe.go

    	// assembly. Probably because the body of this function is so simple that
    	// the compiler can figure out better optimizations by inlining the carry
    	// propagation.
    	return v.carryPropagateGeneric()
    }
    
    // Subtract sets v = a - b, and returns v.
    func (v *Element) Subtract(a, b *Element) *Element {
    	// We first add 2 * p, to guarantee the subtraction won't underflow, and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top