Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SetCanonicalBytes (0.36 sec)

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

    	}
    
    	b := scalarMinusOneBytes
    	b[31] += 1
    	s := scOne
    	if out, err := s.SetCanonicalBytes(b[:]); err == nil {
    		t.Errorf("SetCanonicalBytes worked on a non-canonical value")
    	} else if s != scOne {
    		t.Errorf("SetCanonicalBytes modified its receiver")
    	} else if out != nil {
    		t.Errorf("SetCanonicalBytes did not return nil with an error")
    	}
    }
    
    func TestScalarSetUniformBytes(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:26:17 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  2. src/crypto/internal/edwards25519/scalarmult_test.go

    // license that can be found in the LICENSE file.
    
    package edwards25519
    
    import (
    	"testing"
    	"testing/quick"
    )
    
    var (
    	// a random scalar generated using dalek.
    	dalekScalar, _ = (&Scalar{}).SetCanonicalBytes([]byte{219, 106, 114, 9, 174, 249, 155, 89, 69, 203, 201, 93, 92, 116, 234, 187, 78, 115, 103, 172, 182, 98, 62, 103, 187, 136, 13, 100, 248, 110, 12, 4})
    	// the above, times the edwards25519 basepoint.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:26:17 UTC 2023
    - 4.9K bytes
    - Viewed (0)
Back to top