Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for natFromBytes (0.08 sec)

  1. lib/fips140/v1.0.0-c2097c7c.zip

    x: []byte{0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, y: 0, expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06}, }} for i, tt := range examples { m := modulusFromBytes(tt.m) got := natFromBytes(tt.x).ExpandFor(m).shiftIn(uint(tt.y), m) if exp := natFromBytes(tt.expected).ExpandFor(m); got.Equal(exp) != 1 { t.Errorf("%d: got %v, expected %v", i, got, exp) } } } func TestModulusAndNatSiz(t *testing.T) { // These are 126 bit (2 * _W on 64-bit architectures) values, serialized...
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Sep 25 19:53:19 UTC 2025
    - 642.7K bytes
    - Viewed (0)
  2. lib/fips140/v1.1.0-rc1.zip

    x: []byte{0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, y: 0, expected: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06}, }} for i, tt := range examples { m := modulusFromBytes(tt.m) got := natFromBytes(tt.x).ExpandFor(m).shiftIn(uint(tt.y), m) if exp := natFromBytes(tt.expected).ExpandFor(m); got.Equal(exp) != 1 { t.Errorf("%d: got %v, expected %v", i, got, exp) } } } func TestModulusAndNatSiz(t *testing.T) { // These are 126 bit (2 * _W on 64-bit architectures) values, serialized...
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Dec 11 16:27:41 UTC 2025
    - 663K bytes
    - Viewed (0)
Back to top