-
Notifications
You must be signed in to change notification settings - Fork 5
/
DecryptWithNonceTestVector.json
136 lines (136 loc) · 13.9 KB
/
DecryptWithNonceTestVector.json
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
"desc": "Test decrypt ballot with nonce",
"joint_public_key": "DC2A5A705053B3E1A390D6F1751893D359C13A5C3A39414BCE909FD51AD4C0211FBAC4A2296A60B6D5AB336BECABA0C2D9632E6FFF93A1E3907217319DF0F7419FC491C36B29935AC66D9A6F486566098A8210103467ECD685E29D22F6525FC79766C6FE36D3CF8157E81C13948C18F9E54A4C228EE15AA8648EA4A474C90CC38235ECAE43672DAED9E13C9AAAA0C7DC6B70EC52DC20114AD508547ECD5F448504B7FACCA4F1B15D817F0B92E3812FDD2B5966ACE5F8115840CC33906005146232C7A66A79499DD0788052F37D3CA846D1DACBD72A9C9676F1D9273ADCEFF35C6385F9B8ABFEA9E4140B3FA35EC249EE05D8ADA59513644A7EB8BE07FA9102A115AF18E798A98DFE6F799376315AC8E8BDEAD17567AF9EAA14ABBBF8D21925B6DCF6F5DD513EA0CC5A5E4695AFF25DC2836098139F5315185D206BDD269AD091A673196225D76F6B3154040631AA11A2364376281DF62D9D7B5EAEA0A9ADDE24D4B272A34F571A8AE83F5393CC317D2B0F007B8B3481792864959B16F314266E60EDD6BCC447460B38C290460EB0591189A406BEFEA44E0F25786B7514061F1F1C90610B4DD1E6295810D971B25E63DFA79775D6300151E2A06C2FB6784D2417FDF8198E674CA3A62B16E65661FAB341FBC68BEB0C78643FFD126ED7F8C5E87BFB472E8106478731821396933243BD646E1F545EE3D854C5E24126471EA252E8",
"extended_base_hash": "8E7969C96047D209760B009AF58B6F5516DCF1AC300A343A2C7F221E1F01B1D5",
"primary_nonce": "BA92F9F75D6C24CD23FF517B96CD509E3C2FD98AEA8C4A90938C8B220D951E9A",
"encrypted_ballot": {
"ballot_id": "id-1902517766",
"ballot_style_id": "ballotStyle",
"encrypting_device": "device",
"timestamp": 1689690585,
"code_baux": "",
"confirmation_code": "B239285E1F5CE907E57D7C97286EBD778CDC6FEBB7BC374878A0086FAA021466",
"contests": [
{
"contest_id": "onlyContest",
"sequence_order": 0,
"votes_allowed": 1,
"contest_hash": "A7DF1F7AF51F5863CE37BE932BB14EDFA3EB08751F7F92D3BE79942F69EB903A",
"selections": [
{
"selection_id": "selection1",
"sequence_order": 0,
"encrypted_vote": {
"pad": "6663CF2122426F5E15AEF0F6803A97048F8A8224A3666107E329CC75296415DAE45B1CE319DDCF5A3D0A9BD0E211FA1EBB0AF0C8DAE49C71915006DA788A98909879347A66D87453480E6AEF9A6A5E6C23D54035C224CC14E38DDDB615471FA1503345919D194991EAA9FB107D804DAF7D793FEEFF9B62D6195452CE71E2A55FB845BC44AB7A90C3EF3CD3B1F47D0255820CEEE726EA34FBD4FA94762E76450C269179E0BB21E6BD277F83C1870D3DA61E6979AF9D41056618C2871DD5957FAA95AFA6B4B514CCBC74FC82F750E3232E0152382C5FB2ADAF237D78F6516BC39696E81F2284D57F83E1775FC59B45E1CB630FCCF3E514FDBB5C8EC7C1BE0FB589D1B8AAF2DA905F449DECA283CD1F7E3C959A54645425B20B16C2D1698BD5F080E4CB937D820398A8BE02AB31089A4CAC23867E93E590CE991825DE1D59004400D629268BE2A82E0249A202ECB327FBA7C05E7263DBE44204F649AC18E975A3B85CA38201E500A053EB04982AD8CC2023AC2A5672F20F75E621831D61225E0F30C7F6E9C1EC7490BC99C77D851E9DF84BA5F99EFF456C04655B322C84212EED8FE1834887A748484A72B5072A95B21A3B43A254E45D165ECE9DB15DBA4BDDB567E33378779B3E2122F82336D2B1860985B980955E2F506155A37E9D3ADC73614E4F24A30DD9F0E71D385C56B6A9B7E96DC71063CD6CC683ED5C109305F80C2DBA",
"data": "AA321973C4C5E7AEB0C7C1B29D8847E54F23277F6F1839CD97CE9823B9996EFEE298A36B58EF2FE3EB3531A43A61C9941EC377064603BE168ACC4B2E3B43CCBBAEE441FC47EEA525A7EFF297B88CC48800F2A5EE5B4256905A99CFDF119BD7D3703F3B439383BC5824B631871384A2770BA3BF32B7EC6BB892C9E51A1B42F72DA44B9E51661A97CF7449F32AA34AB5FDC0B3652D662D48A4B3BB3CE411C536211949493CA6D00A852127B6EC6E2CAE9DF36947C10C06EB47CA2EC68FC58A5D1D1E4C1B3F0AB2FE2CD65691DB64EC00646AB84886BF440D7C1EB92BC9F82A010FE847DAE9CB395C162CABD9C54AF6232C4E56016DEB5C8DCA5F80085B155C84BCF3BE34A9060E74EFF3203A76EAB361FA8542F89EA147C93AC276338388D89A434EE2A7801F0064654CB007079B8F121F59FC6A40F1CECB5D1416F31619E377C3C38DF953B92D1913BC3D1A114060EC3CF14319EEAC6495AF6FC85EF69FC6874D557BD984B75F5D49B59710799ECB0DB69F53993B04748EF0A898FA30BAC46D063C06458EDEE6FC78703F8BEA1A8E5A14120E2DEF85EB147933B7621B555525A1D486A77E48D12125677DC04DD35549FD34692B49F2B157341ACE5A0B3C9954E52C63D27745F573236F9ADB0F7BBDD7569903D76BAA0B5C0DE3148065534DA1EEBCF75C88DC514D02E6ABAD924645D958FF8B1042D8E3FCDE490BA2D322263F79"
},
"proof": {
"proofs": [
{
"challenge": "984B8686D0CA66A4F5DFC02E6B985B358EDC7644171B3B946656979425901A15",
"response": "DBBEFC55FCAD1156504B8E494C31F90655DDC793161F53B8C551326DDA6F25F1"
},
{
"challenge": "CF7F69769EDC1C50BB9CF00C2C57F6129DC6C57211B399A22620FCBCBA7874FB",
"response": "F79740ECCE246AFAC773E395840811AD92A88F867D2570F9FF01F38246BE6AE8"
}
]
}
},
{
"selection_id": "selection2",
"sequence_order": 1,
"encrypted_vote": {
"pad": "52D4C75484D43E2457AA80E4BA9C4D4162584B9D11626D4E3FD2E41C5A09896AA8461004769B6BBB44563DC16EE1027D7E75DC3EF9607867FD4CDCEB6BC9975A2B6B85D791EF7930E264E4B2A689204C6D8B8212A4306CCAA3E8206890438B556B9E061630EAB45C5CE33953F5B11132E31E709889EC18F8C7D2C0E07C166F63DB641A0A2D4FEAA46F0ABC35C50F591F41D53B990CA44993D823DFE2B2D98E2D08E4A537904B738B0FB0D0B19BEFEC58251ABE2A96C31ECC5AC99E29B5CA10983AFB2E7EFCF2AB3FF5E6E50A122E504A323154AD4BCC6CB68F9473D333375EA1CB86A6A409A860FA91360CCB04DC16A7A84E37CAC909B528E13CB5349E4D4B022AED886C6913D210E4C8D8CBDCDA022AE19DAED29ECF45D1D3E4ADADAE3C0978D4D84DC7366BC43D25A40821432A2992D22DC7FC964CD9C04C33ADD519D5342E232F607B6534B450BF267DDA0856AD879F3E266EC4D7B0D73D4799A69595034E6EF97CA006BDB147FDC370B9645DB233229DB9DEED7F9689FF11EB2280041CBD95C9C5174A0084A3167303047BB2199AB4265FBBBF0443B62FDDD4D022DAE8E8C75AE02A882A9EC1089136EDF33A484E088F12DA692719B5F4E14D5810115B1B489055D3DA68812FAFFA0D182D1AE7349961835560BC64421B7716B7FE4C26A9ADC08725A6C8300E3048CE26848929A5E372D4BA03841F1A5015EE2397175286",
"data": "44A57501EF05FCB2A9E7E6C7F3CBD3349EBFE39EADF6E884BED5686AEFA2495ACAF7AE97FB7C2CBD6167E7F75502B4299567D6BFD894CD809597C9C2694D32BEEFD96D2A0A840C0A80C868EFCC7C8833830065C4A0EF3109F94AB1CDD626756B5103357EEA11448B485DDB44000AC17E652D2E7B86ABA13F14B61991CD327DF1AB9887FF94D2868265E305E10C12AAFEEC55C24E16473C2C0A53E55E2E56ADD14B47D24EEFF04C5AA0777AB36DAEAC925297252E31453615329A899A78611533F6B54043CCE021DD951C869C925C8AD2CACA0EDA2C7038316769804A8D6CDD1219870A0ACFE462495249937B33CB8E45C94A3A0875BFED55C798AE161745D509110D50FB0068A44011BBA3FDB02F69DCAC7D933847BE4A93F60711AB104FED92AB344BCC4C5CC444EBAFE67A3EDAFE429C44D5AF60C9CE7F21BACAB1DB554A702DD5D5B9DDD7A6230D6E73F445E03CF5956339EBD71651E5AF09739F11EA422BF475041E92F49B964BDD855B8CBDCA46745D4DD20DDC8F2A142B7C09DEB91EB5729C00AD3E7227E910B7627B4E673FE214248486A4EDF7944670F2D39715ADC355173A9FEAFFF3AF63DF4C22533C52F5116612565E19694928CF46F1DDABA8037861490E43851884C282A1EF21BA8AE777EA18F6CA9273E9877CF5649707887AA70795DF6B61FD3AC3E734DE374D400F9E6BED9F166FE8F1DC3E97E7B7BE7025"
},
"proof": {
"proofs": [
{
"challenge": "B0ABEEBA5A362506227F10846084C385A0DD68BBC7377F2BB803C03759EA5C70",
"response": "63DDC59115B8A32813A91F4C744005EBC0629DCAEE4EDDADDFCA9539DC00D9EA"
},
{
"challenge": "AFEEBD6FA0F405D3972B8A4C79D5D6C1EAE10753EA827D81E58D1D619808BF44",
"response": "C1FF6E75290B960C8CE08BAB94313ADCF2BE304B598B87866346485C9F60B878"
}
]
}
},
{
"selection_id": "selection3",
"sequence_order": 2,
"encrypted_vote": {
"pad": "5894703D163FB2EDAF4344CA255182E75BE7690FA2B673E6C1C463582F6BC8D355A3A8FE378D6633DED30FAB0DD5CEEA381A24D60EBE4816A789724925B47CAFD0C885E180D86F53E2F52A509976791036FFE44D0EDE6956DFAB3EBE7E5D5C58F39443F9295E0FCA406A6864C26A8E089A311488A8EF1CEEDB4B836CB8D6AF4BE1DAF12E8333AE98CDDF999A2E8F1F5343165CDA2806B4FE6C39185DE693C2FFB55CA8560E35D94ED7584C418D74360B3B34CC809A62939931A5AA085513687F0C47182801AF09B964D02936A90030D737DF8E8CCFFF114F78FD75C6941D82EDE205E0AC40852D4D74E521EB7B67D23BF1BDAEE689467EBE201976348E9957EB72364FDF03C29CB256D9B8364C45E0224BA1DE975C815CF42BF3BDEB184AAB2678190AB00023B951E5CF6A84FFE06A10849076EBA8E6C102A5675D62E68C503F42CCC2D7D80BECDEC72263D815CE819B497FA19F7FF65728B0AB3481DFE01AEA5E5B35F3A7BB2E7B59340619BEADC5B48B53E8B508C920B62FCB5C918F1F4C4CC1CC29B2970C781B891BAFD755E2B0BB438BE830D5ADB11ED4A78AB72E257680D3587B8C2E9AA069B8E528BF924F3A062EB243B9E7257BEB852E8E1918AC91B0D18B35E6D62FBFD2475BBB2187EB55BADDEFA62B66AE615A4D877F35633A889FB414FC880A34A0EF2C08DC168C6FEDC50F757E1B1FF01286A82BE9CB3FCFAF8B",
"data": "96CF8297DC899C16BBCDCF6A12DB79248D6161F0A4F67A1D992AAF505A7B2C7767034130402CFBFC0DF3D0EE4B4DAE1B47D0F43AB4D135F66C58F7DC2076361805C1CF778B1FC80CBF6E5885660347F3B74792C7CE95695C43E3E6B09A7ED36C2C14F1CDB0681E493B0A700BE0187FBD9CE9E349E05BDAA83236558390E7EA1F155936DB1FE96CCA7AE941EBC044AB2E5A3D8122C4B53A2D6CDDE26D19ED994C4E496CB216AFDC06C54BAD424EDDB8F2F1AC958ACF14918716D163248D8D4F5D040E6257A581C0FD089AC82B82484288CB291575ABA5B6F496262BCD319923C242384E09E9AEDF4F03D0FFE475A1D85837CF9AF23ED0F900345DEF59CD6E39979E7372FF7C6F26877B1260400809C1F5B5A47AC947947C4D73E9DFD428BA09350783D5CB43876CDD8A6B3A5D7263DE9CFFBD8A1B0ACA5BFC15182E076A5FE4363BB6B3FCD8A5322A2F3BDEC8ED05AAE11E62D73DC1DBFC57CBE54F1891DDEDF209B3D9738E6D353201E25C16C4671D418D0D18AC62D636C1595AB3A8A767E1C44CF490AA4A5D60A8DA592DB88F4F98E5CE260804A16031043E0917DB21ED1E28DB7A2CE592402E79D0AF85AA24A260A8C4C0190889DF1A6D0A09FCAF64346CCBC53A0FEF62D2C3CEEBF10C52E5741EF19EA0350A4EF998C5CEB6325432281B6A43615B177EC18AD23BAA3E150FFE73679A9D0E9B1916BFD197DA2335DD316225"
},
"proof": {
"proofs": [
{
"challenge": "2BC115A7CFB78CDE44685A91D1FFF223BDC2856DEFEFBEE4DDB7FF032A4EC45E",
"response": "84630845950F70013E3DA2B78F209080AD979F6B2D0FEB227AC97399FAAE1ABB"
},
{
"challenge": "5C4708E47E3C38E9C275908A0A7A385893773360443544C73F45A7DCE0E9AC11",
"response": "BAFECF6E224D24F295341C64CE029B51D1AAC93338807323E12A17447C91726A"
}
]
}
}
],
"proof": {
"proofs": [
{
"challenge": "5E616E6807A0D3AC9A12A2D7F7D33396C0AFBC0A193E851570D8DB2A64A6A496",
"response": "A7E6D3DADCB14B2514F6C76596EA667EF70DD6574D573836F545B9E42DDAAC4D"
},
{
"challenge": "012672AECB4D08BAF0C39CEAC5E5B6A501C79AC3C62D4F11E5546B6A7E14DC1B",
"response": "258DBD22CDD2D451FBA1613DE41D73A171B673D7EBD360FDD1602EC45FD06C5D"
}
]
},
"encrypted_contest_data": {
"c0": "16C5B03EED98B2ECA145560F0709A24FDE206EA8F3482BC98B031F4BB2F0AFFA31676F58C082435865BAE7A8B581ABEFA9BD30A872357C8E8E1FF411610669D8E29F9CF297C76ACCCAB67647B7ECD8942FE34E1521723A7AEA7912A86D604E576C1A2D39A7207300EE09A3B8716FA0DDF253BE6239A2DDB6FD1B112264489EDE731714D5B05EED8E4DB690E78808C5464592CF325CCFF9882B53C0A1FF8F4184E7D696D5714422F307714E5D8FEFDF204D9CE5CF63820D36B188CAA895DE63A51535A67A278DC0888D7C6FDF81E45499BABAF1ABD7C736FCDF06A32A000655B0541B4AE5C89CF7898B0141A08BAE79AA9B33093B623E20C12A314A4A3E4D8E94039D4372AA5417085A8950050CCFB54AC5F1689B3B91F57E6FD83493E2FFF6211DAD1D5752AC0ACFA725DD0290BFBFF7316A36BF6CD16D2FDA3651E673C6C70DC12F9F28896EE2B24291E13A5780C230A65E8C559A100FAD9585EDC6E3921EDE9AD9EE5FFB57BAC4B7622CB77E74A206673C7CB728F8B45E7A110401CBDF2DCC490DE7C5487F52BD541B3B8C7DAE616EF2240648F2097EBE0899DF370546CE33543B6FD93EE3E0741086BCA1A243FAAF8105B7F74F48AA5E92934DE02E9D05645E8357DC3D033FB5CF913F610E154B265E02E8B5A585EAA63F192524E57E36A2CA5466753053A47AE7DD0A70DFC18B451EA158EB250A9ED50DC62530675B81B1",
"c1": "4FBE4C4092474F9A0F27AE45E5EAFE6DECBB47BF0CAE807F60F07F22069E10CBD018DA0B269E467FCF317DE498082F00330846F2315A266CA9DF185217D4E1E3",
"c2": "7D5C14EB901A12EB7F055A7717D07C596AA1C2E318B6C3A47E0CE153D83F96F0",
"numBytes": 64
},
"pre_encryption": null
}
],
"state": "CAST",
"is_preencrypt": false,
"primary_nonce": null
},
"task": "Decrypt ballot with given primary nonce",
"expected_decrypted_ballot": {
"ballot_id": "id-1902517766",
"ballot_style": "ballotStyle",
"contests": [
{
"contest_id": "onlyContest",
"sequence_order": 0,
"selections": [
{
"selection_id": "selection1",
"sequence_order": 0,
"vote": 0
},
{
"selection_id": "selection2",
"sequence_order": 1,
"vote": 0
},
{
"selection_id": "selection3",
"sequence_order": 2,
"vote": 0
}
],
"write_ins": [
]
}
]
}
}