tweak_vectors.json raw
1 {
2 "sk": "7FB9E0E687ADA1EEBF7ECFE2F21E73EBDB51A7D450948DFE8D76D7F2D1007671",
3 "pubkeys": [
4 "03935F972DA013F80AE011890FA89B67A27B7BE6CCB24D3274D18B2D4067F261A9",
5 "02F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9",
6 "02DFF1D77F2A671C5F36183726DB2341BE58FEAE1DA2DECED843240F7B502BA659"
7 ],
8 "secnonce": "508B81A611F100A6B2B6B29656590898AF488BCF2E1F55CF22E5CFB84421FE61FA27FD49B1D50085B481285E1CA205D55C82CC1B31FF5CD54A489829355901F703935F972DA013F80AE011890FA89B67A27B7BE6CCB24D3274D18B2D4067F261A9",
9 "pnonces": [
10 "0337C87821AFD50A8644D820A8F3E02E499C931865C2360FB43D0A0D20DAFE07EA0287BF891D2A6DEAEBADC909352AA9405D1428C15F4B75F04DAE642A95C2548480",
11 "0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817980279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
12 "032DE2662628C90B03F5E720284EB52FF7D71F4284F627B68A853D78C78E1FFE9303E4C5524E83FFE1493B9077CF1CA6BEB2090C93D930321071AD40B2F44E599046"
13 ],
14 "aggnonce": "028465FCF0BBDBCF443AABCCE533D42B4B5A10966AC09A49655E8C42DAAB8FCD61037496A3CC86926D452CAFCFD55D25972CA1675D549310DE296BFF42F72EEEA8C9",
15 "tweaks": [
16 "E8F791FF9225A2AF0102AFFF4A9A723D9612A682A25EBE79802B263CDFCD83BB",
17 "AE2EA797CC0FE72AC5B97B97F3C6957D7E4199A167A58EB08BCAFFDA70AC0455",
18 "F52ECBC565B3D8BEA2DFD5B75A4F457E54369809322E4120831626F290FA87E0",
19 "1969AD73CC177FA0B4FCED6DF1F7BF9907E665FDE9BA196A74FED0A3CF5AEF9D",
20 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"
21 ],
22 "msg": "F95466D086770E689964664219266FE5ED215C92AE20BAB5C9D79ADDDDF3C0CF",
23 "valid_test_cases": [
24 {
25 "key_indices": [1, 2, 0],
26 "nonce_indices": [1, 2, 0],
27 "tweak_indices": [0],
28 "is_xonly": [true],
29 "signer_index": 2,
30 "expected": "E28A5C66E61E178C2BA19DB77B6CF9F7E2F0F56C17918CD13135E60CC848FE91",
31 "comment": "A single x-only tweak"
32 },
33 {
34 "key_indices": [1, 2, 0],
35 "nonce_indices": [1, 2, 0],
36 "tweak_indices": [0],
37 "is_xonly": [false],
38 "signer_index": 2,
39 "expected": "38B0767798252F21BF5702C48028B095428320F73A4B14DB1E25DE58543D2D2D",
40 "comment": "A single plain tweak"
41 },
42 {
43 "key_indices": [1, 2, 0],
44 "nonce_indices": [1, 2, 0],
45 "tweak_indices": [0, 1],
46 "is_xonly": [false, true],
47 "signer_index": 2,
48 "expected": "408A0A21C4A0F5DACAF9646AD6EB6FECD7F7A11F03ED1F48DFFF2185BC2C2408",
49 "comment": "A plain tweak followed by an x-only tweak"
50 },
51 {
52 "key_indices": [1, 2, 0],
53 "nonce_indices": [1, 2, 0],
54 "tweak_indices": [0, 1, 2, 3],
55 "is_xonly": [false, false, true, true],
56 "signer_index": 2,
57 "expected": "45ABD206E61E3DF2EC9E264A6FEC8292141A633C28586388235541F9ADE75435",
58 "comment": "Four tweaks: plain, plain, x-only, x-only."
59 },
60 {
61 "key_indices": [1, 2, 0],
62 "nonce_indices": [1, 2, 0],
63 "tweak_indices": [0, 1, 2, 3],
64 "is_xonly": [true, false, true, false],
65 "signer_index": 2,
66 "expected": "B255FDCAC27B40C7CE7848E2D3B7BF5EA0ED756DA81565AC804CCCA3E1D5D239",
67 "comment": "Four tweaks: x-only, plain, x-only, plain. If an implementation prohibits applying plain tweaks after x-only tweaks, it can skip this test vector or return an error."
68 }
69 ],
70 "error_test_cases": [
71 {
72 "key_indices": [1, 2, 0],
73 "nonce_indices": [1, 2, 0],
74 "tweak_indices": [4],
75 "is_xonly": [false],
76 "signer_index": 2,
77 "error": {
78 "type": "value",
79 "message": "The tweak must be less than n."
80 },
81 "comment": "Tweak is invalid because it exceeds group size"
82 }
83 ]
84 }
85