-
Notifications
You must be signed in to change notification settings - Fork 1
/
wnafs_test.go
45 lines (41 loc) · 3.57 KB
/
wnafs_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package ed448
import (
. "gopkg.in/check.v1"
)
func (s *Ed448Suite) Test_twPNielsLookup(c *C) {
t := []*twPNiels{
&twPNiels{
&twNiels{
&bigNumber{0x04b154fd, 0x02d141e7, 0x03592b5a, 0x01e88a9c, 0x093c61bd, 0x0e172586, 0x05ce0790, 0x0db34174, 0x053d0152, 0x04719a06, 0x0dad3c6b, 0x006f0f01, 0x0b481abf, 0x0b0c1f09, 0x03908b22, 0x06dca75b},
&bigNumber{0x00d0d43b, 0x0a14bb97, 0x06f205cd, 0x0c5f386c, 0x05a80441, 0x051d867b, 0x04e232c7, 0x00b2e714, 0x04832342, 0x0f15f1c4, 0x04dd6a71, 0x0681c53f, 0x03a2a9c0, 0x066842c8, 0x05fa8823, 0x026935f6},
&bigNumber{0x0460a1f7, 0x0e76b0c4, 0x0bc48547, 0x0a643633, 0x0ff970aa, 0x0cb5cdc9, 0x0d2a0bc4, 0x06940a23, 0x0ad0577f, 0x07e65c18, 0x04b0332f, 0x059b353f, 0x010aebde, 0x09e69eb7, 0x084e54ff, 0x09ba3b12},
},
&bigNumber{0x0480d8e3, 0x065fb6ce, 0x04b23545, 0x00bf849c, 0x0b8a1a13, 0x00d258b7, 0x07522faf, 0x05dfd4e9, 0x06fa010a, 0x09abbdf4, 0x0177cf5a, 0x0a1b52ef, 0x015bf04e, 0x0a84b9bb, 0x06fb02da, 0x0ab39a14},
},
&twPNiels{
&twNiels{
&bigNumber{0x00a553ee, 0x00234003, 0x055c092c, 0x057bcbdd, 0x0e495a8c, 0x09c8b997, 0x0c143649, 0x0399ba66, 0x0df0f55f, 0x0c004b24, 0x0a7c0ab5, 0x0a95f91a, 0x005ee2fc, 0x011bb28d, 0x08ca5e5a, 0x0192776c},
&bigNumber{0x0a2f247e, 0x02e7847f, 0x0a1e65d9, 0x0571128d, 0x0c710f20, 0x0d2d073c, 0x02f89f06, 0x01a67d7c, 0x0f1e3c52, 0x0e90f285, 0x0a97b2e7, 0x00f68012, 0x005f2af2, 0x0ddcb5d2, 0x0bd8a372, 0x0c15a881},
&bigNumber{0x0c7957ba, 0x02b7715c, 0x0951bac2, 0x08ceafd5, 0x0de55a10, 0x01edb51f, 0x019e372a, 0x0ef9da41, 0x00e4539d, 0x08f12616, 0x072899db, 0x04eabccc, 0x01c30552, 0x03c77348, 0x02e95364, 0x0d406ee6},
},
&bigNumber{0x0f2830d8, 0x0056a35b, 0x08ce98ce, 0x0523ef98, 0x0922d7c0, 0x0dea9b3d, 0x04016a54, 0x0f7d6e3f, 0x0596053c, 0x0f26db88, 0x0e066eea, 0x0866a255, 0x0e8a62a7, 0x0dffb915, 0x084fa2b2, 0x04b35e84},
},
&twPNiels{
&twNiels{
&bigNumber{0x0bdc0118, 0x02f3217f, 0x09ebc3b3, 0x07617f27, 0x0434daf9, 0x05c63130, 0x079ffbba, 0x0ed66a9f, 0x0ac6adc7, 0x0cea22df, 0x0ead4d20, 0x04d91dbe, 0x08aea04f, 0x0eff9bba, 0x08c6636d, 0x08fbf2fe},
&bigNumber{0x0d6dae4e, 0x042ef7e0, 0x0e1974ba, 0x04c7f440, 0x0cc3f843, 0x00083ff4, 0x0490f26f, 0x0e95b6b5, 0x04b546d1, 0x059c8373, 0x03c0f841, 0x02ff119c, 0x087b2772, 0x0fc993a1, 0x02ddd9b6, 0x04a9c14d},
&bigNumber{0x0b9dbcd2, 0x0156cdf2, 0x02889448, 0x067306ba, 0x0bb5be76, 0x090eb070, 0x0a50ce79, 0x09b43e73, 0x080845ed, 0x09a2ecf7, 0x018e594a, 0x0b241a06, 0x051f02da, 0x031bbca7, 0x09b2848e, 0x0bbb2ec8},
},
&bigNumber{0x08078601, 0x088d1850, 0x00e0769d, 0x08eb236c, 0x0130e14f, 0x09e4586f, 0x0911c3b0, 0x0ce7530f, 0x0c10cc39, 0x0da28bc9, 0x05845355, 0x0003ec5a, 0x07b7bf88, 0x0300bf50, 0x0653991f, 0x049db070},
},
}
expected := &twPNiels{
&twNiels{
&bigNumber{0x00a553ee, 0x00234003, 0x055c092c, 0x057bcbdd, 0x0e495a8c, 0x09c8b997, 0x0c143649, 0x0399ba66, 0x0df0f55f, 0x0c004b24, 0x0a7c0ab5, 0x0a95f91a, 0x005ee2fc, 0x011bb28d, 0x08ca5e5a, 0x0192776c},
&bigNumber{0x0a2f247e, 0x02e7847f, 0x0a1e65d9, 0x0571128d, 0x0c710f20, 0x0d2d073c, 0x02f89f06, 0x01a67d7c, 0x0f1e3c52, 0x0e90f285, 0x0a97b2e7, 0x00f68012, 0x005f2af2, 0x0ddcb5d2, 0x0bd8a372, 0x0c15a881},
&bigNumber{0x0c7957ba, 0x02b7715c, 0x0951bac2, 0x08ceafd5, 0x0de55a10, 0x01edb51f, 0x019e372a, 0x0ef9da41, 0x00e4539d, 0x08f12616, 0x072899db, 0x04eabccc, 0x01c30552, 0x03c77348, 0x02e95364, 0x0d406ee6},
},
&bigNumber{0x0f2830d8, 0x0056a35b, 0x08ce98ce, 0x0523ef98, 0x0922d7c0, 0x0dea9b3d, 0x04016a54, 0x0f7d6e3f, 0x0596053c, 0x0f26db88, 0x0e066eea, 0x0866a255, 0x0e8a62a7, 0x0dffb915, 0x084fa2b2, 0x04b35e84},
}
c.Assert(constTimeLookup(t, 1), DeepEquals, expected)
}