Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestScalarSetCanonicalBytes (0.35 sec)

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

    	f := func(sc Scalar) bool {
    		return isReduced(sc.Bytes())
    	}
    	if err := quick.Check(f, quickCheckConfig(1024)); err != nil {
    		t.Errorf("generated unreduced scalar: %v", err)
    	}
    }
    
    func TestScalarSetCanonicalBytes(t *testing.T) {
    	f1 := func(in [32]byte, sc Scalar) bool {
    		// Mask out top 4 bits to guarantee value falls in [0, l).
    		in[len(in)-1] &= (1 << 4) - 1
    		if _, err := sc.SetCanonicalBytes(in[:]); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:26:17 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top