Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestFieldMul (0.12 sec)

  1. lib/fips140/v1.1.0-rc1.zip

    TestFieldReduceOnce(t *testing.T) { t.Parallel() for a := range uint32(2 * q) { got := fieldReduceOnce(a) var exp uint32 if a < q { exp = a } else { exp = a - q } if uint32(got) != exp { t.Fatalf("fieldReduceOnce(%d) = %d, expected %d", a, got, exp) } } } func TestFieldMul(t *testing.T) { t.Parallel() for _, a := range interestingValues() { for b := range fieldElement(q) { got := fieldFromMontgomery(fieldMontgomeryMul(a.m, b)) exp := uint32((uint64(a.v) * uint64(fieldFromMontgomery(b))) % q) if got != exp { t.Fatalf("%d...
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Dec 11 16:27:41 UTC 2025
    - 663K bytes
    - Viewed (0)
  2. lib/fips140/v1.0.0-c2097c7c.zip

    } } func TestFieldSub(t *testing.T) { for a := fieldElement(0); a < q; a++ { for b := fieldElement(0); b < q; b++ { got := fieldSub(a, b) exp := (a - b + q) % q if got != exp { t.Fatalf("%d - %d = %d, expected %d", a, b, got, exp) } } } } func TestFieldMul(t *testing.T) { for a := fieldElement(0); a < q; a++ { for b := fieldElement(0); b < q; b++ { got := fieldMul(a, b) exp := fieldElement((uint32(a) * uint32(b)) % q) if got != exp { t.Fatalf("%d * %d = %d, expected %d", a, b, got, exp) } } } } func...
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Sep 25 19:53:19 UTC 2025
    - 642.7K bytes
    - Viewed (0)
Back to top