-
Notifications
You must be signed in to change notification settings - Fork 3
/
dh.h
483 lines (469 loc) · 34.6 KB
/
dh.h
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
/*
* Copyright 2016 naehrwert
* Licensed under the terms of the GNU GPL, version 2
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
*/
#ifndef _DH_H_
#define _DH_H_
#include "bn.h"
// Example safe-primes to use for the Diffie-Hellman key exchange
/*
$ openssl genpkey -genparam -algorithm DH -out dhp.pem -pkeyopt dh_paramgen_prime_len:1024
$ openssl pkeyparam -in dhp.pem -text
PKCS#3 DH Parameters: (1024 bit)
prime:
00:95:69:52:ff:9f:ab:0a:99:b2:43:2f:84:d3:53:
db:97:c4:65:ad:ff:8c:d9:50:eb:9a:a7:e5:d5:4c:
17:23:dd:2d:9c:8c:f4:32:bc:3c:e1:af:3a:89:45:
8f:ca:53:3a:5a:6e:39:d1:fb:79:3d:5c:94:66:83:
75:7e:77:0b:0c:dd:9c:c2:be:55:2b:3b:da:74:21:
bd:ed:31:eb:8f:61:e3:88:15:0f:78:48:9d:71:d9:
ca:f9:cc:82:eb:a9:6f:aa:4c:77:d3:ca:7d:6f:90:
65:65:e5:bf:eb:36:3b:88:5c:0e:5f:db:41:3e:f1:
b7:eb:8f:f8:26:e3:21:90:4b
generator: 2 (0x2)
*/
#define bP_1024 "\x95\x69\x52\xff\x9f\xab\x0a\x99\xb2\x43\x2f\x84\xd3\x53\xdb\x97\xc4\x65\xad\xff\x8c\xd9\x50\xeb\x9a\xa7\xe5\xd5\x4c\x17\x23\xdd" \
"\x2d\x9c\x8c\xf4\x32\xbc\x3c\xe1\xaf\x3a\x89\x45\x8f\xca\x53\x3a\x5a\x6e\x39\xd1\xfb\x79\x3d\x5c\x94\x66\x83\x75\x7e\x77\x0b\x0c" \
"\xdd\x9c\xc2\xbe\x55\x2b\x3b\xda\x74\x21\xbd\xed\x31\xeb\x8f\x61\xe3\x88\x15\x0f\x78\x48\x9d\x71\xd9\xca\xf9\xcc\x82\xeb\xa9\x6f" \
"\xaa\x4c\x77\xd3\xca\x7d\x6f\x90\x65\x65\xe5\xbf\xeb\x36\x3b\x88\x5c\x0e\x5f\xdb\x41\x3e\xf1\xb7\xeb\x8f\xf8\x26\xe3\x21\x90\x4b"
/*
$ openssl genpkey -genparam -algorithm DH -out dhp.pem -pkeyopt dh_paramgen_prime_len:2048
$ openssl pkeyparam -in dhp.pem -text
PKCS#3 DH Parameters: (2048 bit)
prime:
00:f1:56:c5:98:39:22:49:e2:4b:b7:1f:c9:d2:93:
5d:90:27:bd:06:58:9e:59:26:1d:48:87:3f:0b:53:
dc:37:04:fa:55:9c:16:98:08:0f:ba:f4:68:63:a9:
37:57:09:79:a2:11:25:c8:cc:cf:d6:09:31:af:9b:
99:57:2b:aa:ad:7f:aa:2f:a2:dc:1c:29:73:30:76:
8f:d2:86:f0:19:ee:3c:af:59:d6:9d:2c:3f:aa:a0:
89:05:b0:a8:8e:2f:7a:08:a2:5a:d7:4a:a2:c3:d8:
28:68:57:9a:6c:91:15:e3:f6:5e:04:a5:d5:2d:ce:
26:52:f1:25:56:fa:51:d6:d0:f9:83:3e:27:5f:67:
e4:2a:4b:52:9d:8c:39:ae:d3:14:58:58:9f:19:7f:
e0:61:08:20:2f:25:7a:9b:cc:0d:b7:c5:59:87:6e:
8c:5f:5a:7c:4f:29:0d:38:b4:62:28:c0:1d:0c:b9:
fd:fe:3d:ce:77:58:3c:e1:79:0e:1c:05:b5:1a:51:
a6:8f:f3:26:9a:d1:c2:fd:89:d8:9f:50:7d:68:71:
f6:25:f5:b7:72:25:27:6d:e9:7d:26:74:2b:cd:73:
63:3a:2e:83:e8:9e:a5:cd:ea:4b:c5:f1:b7:20:d0:
c6:9a:75:89:aa:b1:30:b4:4c:bd:05:e4:8a:8d:98:
2e:7b
generator: 2 (0x2)
*/
#define bP_2048 "\xf1\x56\xc5\x98\x39\x22\x49\xe2\x4b\xb7\x1f\xc9\xd2\x93\x5d\x90\x27\xbd\x06\x58\x9e\x59\x26\x1d\x48\x87\x3f\x0b\x53\xdc\x37\x04" \
"\xfa\x55\x9c\x16\x98\x08\x0f\xba\xf4\x68\x63\xa9\x37\x57\x09\x79\xa2\x11\x25\xc8\xcc\xcf\xd6\x09\x31\xaf\x9b\x99\x57\x2b\xaa\xad" \
"\x7f\xaa\x2f\xa2\xdc\x1c\x29\x73\x30\x76\x8f\xd2\x86\xf0\x19\xee\x3c\xaf\x59\xd6\x9d\x2c\x3f\xaa\xa0\x89\x05\xb0\xa8\x8e\x2f\x7a" \
"\x08\xa2\x5a\xd7\x4a\xa2\xc3\xd8\x28\x68\x57\x9a\x6c\x91\x15\xe3\xf6\x5e\x04\xa5\xd5\x2d\xce\x26\x52\xf1\x25\x56\xfa\x51\xd6\xd0" \
"\xf9\x83\x3e\x27\x5f\x67\xe4\x2a\x4b\x52\x9d\x8c\x39\xae\xd3\x14\x58\x58\x9f\x19\x7f\xe0\x61\x08\x20\x2f\x25\x7a\x9b\xcc\x0d\xb7" \
"\xc5\x59\x87\x6e\x8c\x5f\x5a\x7c\x4f\x29\x0d\x38\xb4\x62\x28\xc0\x1d\x0c\xb9\xfd\xfe\x3d\xce\x77\x58\x3c\xe1\x79\x0e\x1c\x05\xb5" \
"\x1a\x51\xa6\x8f\xf3\x26\x9a\xd1\xc2\xfd\x89\xd8\x9f\x50\x7d\x68\x71\xf6\x25\xf5\xb7\x72\x25\x27\x6d\xe9\x7d\x26\x74\x2b\xcd\x73" \
"\x63\x3a\x2e\x83\xe8\x9e\xa5\xcd\xea\x4b\xc5\xf1\xb7\x20\xd0\xc6\x9a\x75\x89\xaa\xb1\x30\xb4\x4c\xbd\x05\xe4\x8a\x8d\x98\x2e\x7b"
/*
$ openssl genpkey -genparam -algorithm DH -out dhp.pem -pkeyopt dh_paramgen_prime_len:4096
$ openssl pkeyparam -in dhp.pem -text
PKCS#3 DH Parameters: (4096 bit)
prime:
00:81:ed:91:f5:75:42:78:ab:79:d1:90:ff:31:98:
37:da:e9:62:46:aa:35:f9:fc:b3:fb:77:82:78:34:
16:69:5c:51:75:14:43:b7:a8:5f:23:bb:0c:9c:08:
38:db:46:be:e4:36:ba:be:fc:8c:5b:92:a1:b9:e3:
4e:8f:62:18:0c:d7:e3:23:b2:b6:ae:4b:10:1f:a4:
5a:fe:c4:d0:65:ff:9d:9e:5a:86:21:0c:9b:95:64:
82:ab:80:05:57:d5:2b:c1:24:94:84:34:e1:39:4b:
a7:dc:06:ec:bd:37:e8:ed:75:ab:fd:98:b7:40:ea:
44:20:b7:4e:05:72:e8:eb:35:0e:39:38:cb:b9:ca:
4b:8b:b5:c2:fe:06:c7:35:98:fb:ed:01:c7:53:da:
b6:41:a7:f6:b9:b3:b4:c7:b8:87:ab:6f:69:34:e5:
ad:98:73:d6:84:a0:12:d3:2d:fc:a4:82:d6:b6:9c:
78:b3:85:5b:c4:f9:16:68:d7:b2:a6:71:d8:06:b6:
17:ae:98:a6:d7:03:81:96:3e:d2:d7:a1:84:01:e2:
00:4b:29:c6:de:c0:14:11:89:cc:06:45:39:58:d7:
aa:da:54:c4:2a:7c:cd:eb:47:2a:9b:9e:65:84:35:
b9:25:aa:b2:5e:6f:75:80:ca:f8:f0:3a:65:73:99:
aa:43:8c:88:67:28:0a:bf:0e:26:9b:74:4a:33:1a:
d7:a8:a2:38:d5:6c:cf:b4:34:29:b6:04:e0:69:50:
97:ab:22:de:28:ca:7b:20:fe:0d:4d:73:d0:1f:a9:
d6:00:09:98:9f:d5:0d:2c:8f:15:41:df:19:00:9d:
28:cb:48:bf:5b:e7:9e:ae:10:66:70:89:0f:bc:03:
13:f0:e1:66:bf:9f:0e:f7:69:c7:7d:93:df:a6:e8:
e1:fb:0e:b3:0f:35:79:6d:75:0d:98:a3:20:13:e2:
eb:18:00:fc:9c:4d:ef:8f:78:34:16:fe:9b:4f:3a:
61:a6:6f:b0:4f:2e:fe:67:8d:66:fc:8f:df:f2:2a:
49:ce:d8:f6:74:9e:77:e4:b8:48:09:a8:38:bd:97:
df:11:d5:1e:82:3e:c1:3c:70:34:57:a8:85:a5:e1:
3e:c4:57:ba:7c:5e:09:26:c1:8c:85:32:fa:de:84:
d0:75:1e:09:f6:e2:88:af:90:9e:f6:a6:5b:4e:b7:
fa:34:98:19:0e:85:2d:9e:dd:c1:3d:99:57:0c:63:
5b:1b:06:30:43:7e:51:fb:81:80:67:af:ce:97:a0:
98:cf:ca:d9:35:22:b5:41:48:dc:b3:52:64:76:28:
f0:8a:8c:e0:c1:e7:20:16:2d:52:6e:c3:14:82:3c:
52:ec:2b
generator: 2 (0x2)
*/
#define bP_4096 "\x81\xed\x91\xf5\x75\x42\x78\xab\x79\xd1\x90\xff\x31\x98\x37\xda\xe9\x62\x46\xaa\x35\xf9\xfc\xb3\xfb\x77\x82\x78\x34\x16\x69\x5c" \
"\x51\x75\x14\x43\xb7\xa8\x5f\x23\xbb\x0c\x9c\x08\x38\xdb\x46\xbe\xe4\x36\xba\xbe\xfc\x8c\x5b\x92\xa1\xb9\xe3\x4e\x8f\x62\x18\x0c" \
"\xd7\xe3\x23\xb2\xb6\xae\x4b\x10\x1f\xa4\x5a\xfe\xc4\xd0\x65\xff\x9d\x9e\x5a\x86\x21\x0c\x9b\x95\x64\x82\xab\x80\x05\x57\xd5\x2b" \
"\xc1\x24\x94\x84\x34\xe1\x39\x4b\xa7\xdc\x06\xec\xbd\x37\xe8\xed\x75\xab\xfd\x98\xb7\x40\xea\x44\x20\xb7\x4e\x05\x72\xe8\xeb\x35" \
"\x0e\x39\x38\xcb\xb9\xca\x4b\x8b\xb5\xc2\xfe\x06\xc7\x35\x98\xfb\xed\x01\xc7\x53\xda\xb6\x41\xa7\xf6\xb9\xb3\xb4\xc7\xb8\x87\xab" \
"\x6f\x69\x34\xe5\xad\x98\x73\xd6\x84\xa0\x12\xd3\x2d\xfc\xa4\x82\xd6\xb6\x9c\x78\xb3\x85\x5b\xc4\xf9\x16\x68\xd7\xb2\xa6\x71\xd8" \
"\x06\xb6\x17\xae\x98\xa6\xd7\x03\x81\x96\x3e\xd2\xd7\xa1\x84\x01\xe2\x00\x4b\x29\xc6\xde\xc0\x14\x11\x89\xcc\x06\x45\x39\x58\xd7" \
"\xaa\xda\x54\xc4\x2a\x7c\xcd\xeb\x47\x2a\x9b\x9e\x65\x84\x35\xb9\x25\xaa\xb2\x5e\x6f\x75\x80\xca\xf8\xf0\x3a\x65\x73\x99\xaa\x43" \
"\x8c\x88\x67\x28\x0a\xbf\x0e\x26\x9b\x74\x4a\x33\x1a\xd7\xa8\xa2\x38\xd5\x6c\xcf\xb4\x34\x29\xb6\x04\xe0\x69\x50\x97\xab\x22\xde" \
"\x28\xca\x7b\x20\xfe\x0d\x4d\x73\xd0\x1f\xa9\xd6\x00\x09\x98\x9f\xd5\x0d\x2c\x8f\x15\x41\xdf\x19\x00\x9d\x28\xcb\x48\xbf\x5b\xe7" \
"\x9e\xae\x10\x66\x70\x89\x0f\xbc\x03\x13\xf0\xe1\x66\xbf\x9f\x0e\xf7\x69\xc7\x7d\x93\xdf\xa6\xe8\xe1\xfb\x0e\xb3\x0f\x35\x79\x6d" \
"\x75\x0d\x98\xa3\x20\x13\xe2\xeb\x18\x00\xfc\x9c\x4d\xef\x8f\x78\x34\x16\xfe\x9b\x4f\x3a\x61\xa6\x6f\xb0\x4f\x2e\xfe\x67\x8d\x66" \
"\xfc\x8f\xdf\xf2\x2a\x49\xce\xd8\xf6\x74\x9e\x77\xe4\xb8\x48\x09\xa8\x38\xbd\x97\xdf\x11\xd5\x1e\x82\x3e\xc1\x3c\x70\x34\x57\xa8" \
"\x85\xa5\xe1\x3e\xc4\x57\xba\x7c\x5e\x09\x26\xc1\x8c\x85\x32\xfa\xde\x84\xd0\x75\x1e\x09\xf6\xe2\x88\xaf\x90\x9e\xf6\xa6\x5b\x4e" \
"\xb7\xfa\x34\x98\x19\x0e\x85\x2d\x9e\xdd\xc1\x3d\x99\x57\x0c\x63\x5b\x1b\x06\x30\x43\x7e\x51\xfb\x81\x80\x67\xaf\xce\x97\xa0\x98" \
"\xcf\xca\xd9\x35\x22\xb5\x41\x48\xdc\xb3\x52\x64\x76\x28\xf0\x8a\x8c\xe0\xc1\xe7\x20\x16\x2d\x52\x6e\xc3\x14\x82\x3c\x52\xec\x2b"
/*
$ openssl genpkey -genparam -algorithm DH -out dhp.pem -pkeyopt dh_paramgen_prime_len:8192
$ openssl pkeyparam -in dhp.pem -text
PKCS#3 DH Parameters: (8192 bit)
prime:
00:a1:88:15:26:43:86:bf:90:72:d4:7a:29:35:55:
52:5d:11:8a:f3:f0:15:c9:60:b4:5c:d5:d1:c7:39:
bf:9b:97:36:ce:4f:8d:36:d2:29:6d:3b:e5:8a:9b:
a4:e0:7b:d2:3f:66:ed:cb:2b:df:d7:c4:f5:de:bb:
ed:92:b2:bd:28:ee:e3:a4:c0:b9:e6:e4:7e:03:fd:
1a:b9:58:05:0e:17:52:8d:a1:d2:3a:46:ed:74:80:
a1:4c:0c:5e:dd:45:c0:be:30:fd:b5:2d:0a:b7:80:
59:b7:52:41:b5:3e:f5:44:8d:c7:47:d3:b5:05:7a:
cf:e3:85:de:5c:01:75:ca:e8:d2:8b:b0:09:ed:ea:
8d:0a:00:51:0c:22:86:29:1a:c7:60:58:dc:2e:65:
15:40:11:89:26:a0:b6:e3:22:f6:db:de:fe:2c:b5:
02:46:02:22:f8:65:e2:a6:77:c0:98:20:3d:3f:ed:
6c:b4:99:0d:03:b6:03:7d:2b:d4:bc:b4:63:3b:11:
23:d8:99:66:a9:3b:ea:ba:00:09:6a:40:fc:38:63:
f3:6b:cf:65:48:92:5e:d0:a2:bf:d5:0e:fd:25:b2:
2a:8e:7c:06:3b:4a:51:d8:17:33:f8:c5:56:7c:18:
e8:85:af:f6:94:d7:eb:fc:22:f7:5b:c0:d4:c7:1d:
57:a5:66:38:95:fe:9a:ca:2a:dc:96:c3:d0:8b:c1:
fc:cb:ab:9c:95:2b:be:e2:18:2e:f1:d2:c9:d2:1d:
85:32:f6:6e:2d:f7:30:f0:16:d5:c2:6d:22:78:78:
c6:cc:b3:f4:4c:55:b3:3e:d5:03:11:d0:33:ae:3d:
60:42:0b:3b:81:77:bc:dc:4f:cc:5b:ed:c0:89:05:
a6:5d:d3:d5:61:5b:c0:70:97:07:17:19:05:0d:82:
c1:c3:87:e5:e3:80:dc:82:12:7f:bf:c8:b1:65:96:
03:09:e9:71:74:17:00:e7:d5:4b:ff:0a:c0:6a:ae:
16:ff:1d:b9:b5:7f:14:61:59:6f:6e:d2:1b:56:09:
ab:7c:21:ad:ab:c0:02:c1:3a:17:f2:19:8f:62:4f:
36:6d:3a:65:a0:7a:a1:5b:0c:b9:ce:30:fa:5d:88:
ed:34:ab:5c:c5:bb:1b:64:67:2e:af:df:62:40:dd:
0b:54:3f:8a:85:24:e4:b0:5a:9c:bf:10:70:2b:44:
6c:e2:31:f9:df:0b:ed:67:d7:cb:af:fb:98:a9:38:
3a:36:58:24:26:8a:0e:0e:e0:eb:e8:18:da:e5:66:
22:57:9f:42:44:b9:14:4e:d4:42:b8:6c:1b:1e:e7:
d6:12:86:17:66:5f:50:f2:b5:ac:0b:59:c0:9c:df:
8b:28:88:1b:e2:d8:83:76:3c:9d:3d:6b:66:6d:99:
5f:43:d3:52:34:46:df:8d:c0:c7:a7:55:a1:1b:95:
03:d3:6d:80:38:4a:93:25:89:46:23:a0:c9:38:73:
f1:4f:00:2c:17:cc:76:95:b0:0b:6d:8a:37:22:47:
b7:3c:40:4a:42:0a:dd:f5:b9:89:87:4e:59:03:06:
81:c3:e0:b4:a0:3d:84:bd:13:de:e4:92:17:8f:c0:
b0:e1:ee:b5:2d:24:ad:ae:f0:d6:a5:32:15:50:6c:
4d:00:92:ef:66:a3:c6:51:0d:2c:41:e8:0e:35:4f:
a7:62:11:f3:d5:b0:26:5a:ca:82:ff:30:66:48:52:
65:be:d3:a9:5e:8b:27:5b:8f:bb:4d:6c:83:1f:b2:
17:b0:38:a1:99:0a:22:74:dc:85:9c:c0:ed:e3:a1:
41:dd:38:c6:1f:28:d9:ec:5a:d9:a9:ac:c1:6f:ac:
96:d4:5b:33:cb:c9:5d:12:d8:b8:be:37:9e:28:4e:
74:fb:ff:be:79:32:24:62:11:a4:bf:ed:8c:10:f3:
1f:71:d0:c9:7b:f7:ec:10:7e:34:b2:06:cb:7a:15:
f0:dd:e1:a2:f3:61:3a:85:fb:d1:e2:b1:b1:4a:6e:
bf:67:13:7d:3b:de:49:c6:92:2c:55:6a:e8:e2:ad:
b0:01:c9:d9:d9:65:c4:1a:d0:11:9c:b2:0c:0d:ef:
22:e8:2e:28:53:2e:6e:da:39:49:9d:07:fd:74:05:
61:76:f7:fc:1f:96:8d:5e:7a:9e:22:d0:7f:28:4e:
fa:fa:10:08:57:eb:65:cf:a9:91:57:f2:a6:56:f6:
20:eb:d4:11:93:4e:0e:5b:6f:14:51:2d:14:a0:4c:
8d:a5:fe:f0:95:9e:55:1c:bf:19:05:6a:76:e6:5d:
c5:54:2b:5a:e8:9f:30:80:68:c8:91:37:ec:f9:7c:
ac:03:f9:eb:f1:a9:a7:a3:ed:2d:54:28:3d:42:1a:
81:3d:4a:f3:13:4c:1b:56:c3:dd:8c:62:13:9b:29:
62:d7:77:4e:8b:4c:dc:8e:3b:cd:86:7e:bb:26:38:
a5:13:f5:14:2c:41:b2:2d:e1:1e:41:53:7a:35:c7:
21:e6:a4:4f:7d:68:9c:07:eb:d3:b0:28:90:6f:b7:
1d:fa:2b:11:56:9a:a0:0b:4e:07:2f:20:61:51:29:
e4:18:3e:1e:56:36:1c:73:ea:20:15:46:29:5f:65:
4c:7a:f7:c6:a2:d9:a3:24:e4:0f:20:0a:c5:c4:be:
69:bc:e5:5b:d1:7c:b6:e1:22:9c:c6:66:35:b4:11:
4a:ab:7d:24:47:d1:71:84:cb:50:ad:de:31:9e:38:
62:fc:fe:c3:ab
generator: 2 (0x2)
*/
#define bP_8192 "\xa1\x88\x15\x26\x43\x86\xbf\x90\x72\xd4\x7a\x29\x35\x55\x52\x5d\x11\x8a\xf3\xf0\x15\xc9\x60\xb4\x5c\xd5\xd1\xc7\x39\xbf\x9b\x97" \
"\x36\xce\x4f\x8d\x36\xd2\x29\x6d\x3b\xe5\x8a\x9b\xa4\xe0\x7b\xd2\x3f\x66\xed\xcb\x2b\xdf\xd7\xc4\xf5\xde\xbb\xed\x92\xb2\xbd\x28" \
"\xee\xe3\xa4\xc0\xb9\xe6\xe4\x7e\x03\xfd\x1a\xb9\x58\x05\x0e\x17\x52\x8d\xa1\xd2\x3a\x46\xed\x74\x80\xa1\x4c\x0c\x5e\xdd\x45\xc0" \
"\xbe\x30\xfd\xb5\x2d\x0a\xb7\x80\x59\xb7\x52\x41\xb5\x3e\xf5\x44\x8d\xc7\x47\xd3\xb5\x05\x7a\xcf\xe3\x85\xde\x5c\x01\x75\xca\xe8" \
"\xd2\x8b\xb0\x09\xed\xea\x8d\x0a\x00\x51\x0c\x22\x86\x29\x1a\xc7\x60\x58\xdc\x2e\x65\x15\x40\x11\x89\x26\xa0\xb6\xe3\x22\xf6\xdb" \
"\xde\xfe\x2c\xb5\x02\x46\x02\x22\xf8\x65\xe2\xa6\x77\xc0\x98\x20\x3d\x3f\xed\x6c\xb4\x99\x0d\x03\xb6\x03\x7d\x2b\xd4\xbc\xb4\x63" \
"\x3b\x11\x23\xd8\x99\x66\xa9\x3b\xea\xba\x00\x09\x6a\x40\xfc\x38\x63\xf3\x6b\xcf\x65\x48\x92\x5e\xd0\xa2\xbf\xd5\x0e\xfd\x25\xb2" \
"\x2a\x8e\x7c\x06\x3b\x4a\x51\xd8\x17\x33\xf8\xc5\x56\x7c\x18\xe8\x85\xaf\xf6\x94\xd7\xeb\xfc\x22\xf7\x5b\xc0\xd4\xc7\x1d\x57\xa5" \
"\x66\x38\x95\xfe\x9a\xca\x2a\xdc\x96\xc3\xd0\x8b\xc1\xfc\xcb\xab\x9c\x95\x2b\xbe\xe2\x18\x2e\xf1\xd2\xc9\xd2\x1d\x85\x32\xf6\x6e" \
"\x2d\xf7\x30\xf0\x16\xd5\xc2\x6d\x22\x78\x78\xc6\xcc\xb3\xf4\x4c\x55\xb3\x3e\xd5\x03\x11\xd0\x33\xae\x3d\x60\x42\x0b\x3b\x81\x77" \
"\xbc\xdc\x4f\xcc\x5b\xed\xc0\x89\x05\xa6\x5d\xd3\xd5\x61\x5b\xc0\x70\x97\x07\x17\x19\x05\x0d\x82\xc1\xc3\x87\xe5\xe3\x80\xdc\x82" \
"\x12\x7f\xbf\xc8\xb1\x65\x96\x03\x09\xe9\x71\x74\x17\x00\xe7\xd5\x4b\xff\x0a\xc0\x6a\xae\x16\xff\x1d\xb9\xb5\x7f\x14\x61\x59\x6f" \
"\x6e\xd2\x1b\x56\x09\xab\x7c\x21\xad\xab\xc0\x02\xc1\x3a\x17\xf2\x19\x8f\x62\x4f\x36\x6d\x3a\x65\xa0\x7a\xa1\x5b\x0c\xb9\xce\x30" \
"\xfa\x5d\x88\xed\x34\xab\x5c\xc5\xbb\x1b\x64\x67\x2e\xaf\xdf\x62\x40\xdd\x0b\x54\x3f\x8a\x85\x24\xe4\xb0\x5a\x9c\xbf\x10\x70\x2b" \
"\x44\x6c\xe2\x31\xf9\xdf\x0b\xed\x67\xd7\xcb\xaf\xfb\x98\xa9\x38\x3a\x36\x58\x24\x26\x8a\x0e\x0e\xe0\xeb\xe8\x18\xda\xe5\x66\x22" \
"\x57\x9f\x42\x44\xb9\x14\x4e\xd4\x42\xb8\x6c\x1b\x1e\xe7\xd6\x12\x86\x17\x66\x5f\x50\xf2\xb5\xac\x0b\x59\xc0\x9c\xdf\x8b\x28\x88" \
"\x1b\xe2\xd8\x83\x76\x3c\x9d\x3d\x6b\x66\x6d\x99\x5f\x43\xd3\x52\x34\x46\xdf\x8d\xc0\xc7\xa7\x55\xa1\x1b\x95\x03\xd3\x6d\x80\x38" \
"\x4a\x93\x25\x89\x46\x23\xa0\xc9\x38\x73\xf1\x4f\x00\x2c\x17\xcc\x76\x95\xb0\x0b\x6d\x8a\x37\x22\x47\xb7\x3c\x40\x4a\x42\x0a\xdd" \
"\xf5\xb9\x89\x87\x4e\x59\x03\x06\x81\xc3\xe0\xb4\xa0\x3d\x84\xbd\x13\xde\xe4\x92\x17\x8f\xc0\xb0\xe1\xee\xb5\x2d\x24\xad\xae\xf0" \
"\xd6\xa5\x32\x15\x50\x6c\x4d\x00\x92\xef\x66\xa3\xc6\x51\x0d\x2c\x41\xe8\x0e\x35\x4f\xa7\x62\x11\xf3\xd5\xb0\x26\x5a\xca\x82\xff" \
"\x30\x66\x48\x52\x65\xbe\xd3\xa9\x5e\x8b\x27\x5b\x8f\xbb\x4d\x6c\x83\x1f\xb2\x17\xb0\x38\xa1\x99\x0a\x22\x74\xdc\x85\x9c\xc0\xed" \
"\xe3\xa1\x41\xdd\x38\xc6\x1f\x28\xd9\xec\x5a\xd9\xa9\xac\xc1\x6f\xac\x96\xd4\x5b\x33\xcb\xc9\x5d\x12\xd8\xb8\xbe\x37\x9e\x28\x4e" \
"\x74\xfb\xff\xbe\x79\x32\x24\x62\x11\xa4\xbf\xed\x8c\x10\xf3\x1f\x71\xd0\xc9\x7b\xf7\xec\x10\x7e\x34\xb2\x06\xcb\x7a\x15\xf0\xdd" \
"\xe1\xa2\xf3\x61\x3a\x85\xfb\xd1\xe2\xb1\xb1\x4a\x6e\xbf\x67\x13\x7d\x3b\xde\x49\xc6\x92\x2c\x55\x6a\xe8\xe2\xad\xb0\x01\xc9\xd9" \
"\xd9\x65\xc4\x1a\xd0\x11\x9c\xb2\x0c\x0d\xef\x22\xe8\x2e\x28\x53\x2e\x6e\xda\x39\x49\x9d\x07\xfd\x74\x05\x61\x76\xf7\xfc\x1f\x96" \
"\x8d\x5e\x7a\x9e\x22\xd0\x7f\x28\x4e\xfa\xfa\x10\x08\x57\xeb\x65\xcf\xa9\x91\x57\xf2\xa6\x56\xf6\x20\xeb\xd4\x11\x93\x4e\x0e\x5b" \
"\x6f\x14\x51\x2d\x14\xa0\x4c\x8d\xa5\xfe\xf0\x95\x9e\x55\x1c\xbf\x19\x05\x6a\x76\xe6\x5d\xc5\x54\x2b\x5a\xe8\x9f\x30\x80\x68\xc8" \
"\x91\x37\xec\xf9\x7c\xac\x03\xf9\xeb\xf1\xa9\xa7\xa3\xed\x2d\x54\x28\x3d\x42\x1a\x81\x3d\x4a\xf3\x13\x4c\x1b\x56\xc3\xdd\x8c\x62" \
"\x13\x9b\x29\x62\xd7\x77\x4e\x8b\x4c\xdc\x8e\x3b\xcd\x86\x7e\xbb\x26\x38\xa5\x13\xf5\x14\x2c\x41\xb2\x2d\xe1\x1e\x41\x53\x7a\x35" \
"\xc7\x21\xe6\xa4\x4f\x7d\x68\x9c\x07\xeb\xd3\xb0\x28\x90\x6f\xb7\x1d\xfa\x2b\x11\x56\x9a\xa0\x0b\x4e\x07\x2f\x20\x61\x51\x29\xe4" \
"\x18\x3e\x1e\x56\x36\x1c\x73\xea\x20\x15\x46\x29\x5f\x65\x4c\x7a\xf7\xc6\xa2\xd9\xa3\x24\xe4\x0f\x20\x0a\xc5\xc4\xbe\x69\xbc\xe5" \
"\x5b\xd1\x7c\xb6\xe1\x22\x9c\xc6\x66\x35\xb4\x11\x4a\xab\x7d\x24\x47\xd1\x71\x84\xcb\x50\xad\xde\x31\x9e\x38\x62\xfc\xfe\xc3\xab"
/*
$ openssl genpkey -genparam -algorithm DH -out dhp.pem -pkeyopt dh_paramgen_prime_len:16384
$ openssl pkeyparam -in dhp.pem -text
PKCS#3 DH Parameters: (16384 bit)
prime:
00:8e:76:e3:96:e8:0a:d2:4f:b2:ab:c7:9b:5a:34:
17:85:d9:59:bd:16:a0:39:7c:36:6b:9c:0a:ba:c7:
89:88:23:0c:91:fc:b6:53:d6:d6:5b:a8:a3:72:7a:
1b:67:f9:9b:f1:26:a9:9b:b9:1a:43:8c:d4:8e:a7:
9e:28:d8:cd:eb:e7:2e:8d:ce:4a:17:db:ea:e0:27:
0e:76:c2:be:d1:ed:df:d8:20:1b:9f:80:4d:fa:8b:
82:0d:30:bd:c2:bc:89:c7:4f:0f:3b:ec:f0:fa:f0:
85:ae:99:b1:65:3a:83:93:90:38:22:c3:ff:b6:f6:
4f:d6:12:4a:18:6e:8a:77:10:f2:3f:e2:08:07:4b:
97:f9:92:1e:84:bc:74:19:6f:ee:bc:1c:f0:9e:f2:
6c:e8:73:5f:66:19:94:07:37:9f:3a:81:4b:f4:81:
4c:8e:6d:e7:89:38:85:d8:bb:f1:94:cb:ad:c7:57:
e4:a3:3a:f5:67:36:33:92:ba:71:b2:03:9b:46:11:
6d:6a:44:eb:41:09:e7:b6:04:22:8b:29:54:52:6d:
b2:c4:5d:96:95:e7:dd:9d:60:6f:1a:27:65:b1:62:
4f:b7:b9:94:75:69:d2:c9:71:ce:90:73:89:25:45:
97:89:6e:ff:1b:a2:bd:8a:32:30:52:2c:ba:ce:c2:
bc:cd:64:40:0f:ab:9a:11:60:84:2f:90:d0:17:0c:
06:52:ef:45:cc:0c:f7:ca:88:4e:3e:a8:ae:89:01:
15:00:da:e4:b3:c5:58:a0:04:ce:94:12:7e:9a:fd:
f8:b2:0f:00:e8:af:71:70:46:cd:fd:4c:00:8a:8b:
16:1d:a9:81:52:05:99:ac:98:5a:ae:d4:95:ff:bb:
9e:95:5a:66:b8:7b:6e:9c:a4:a6:1e:7c:1a:de:c1:
cf:cd:ee:2c:ac:fa:6c:ec:76:d6:67:11:9c:44:9d:
49:34:97:06:80:5a:fe:9e:a0:a5:61:1f:e3:60:7b:
3f:3e:51:33:bb:93:fa:e1:05:d1:97:aa:a3:72:33:
c7:88:a7:fb:6b:c4:a9:34:36:db:ec:0b:c6:43:54:
73:c5:f2:8d:f7:79:31:dc:1b:b1:cd:bf:7e:a1:86:
1b:f8:b7:e2:dd:47:6f:0a:a5:bd:eb:99:aa:bf:b0:
dd:e5:5a:c3:39:e6:31:c9:3b:60:00:03:a8:2a:e5:
4d:26:2c:3e:bc:7e:21:a9:e6:e8:9f:f3:24:f3:5a:
6a:ce:13:d6:7d:6b:9b:8b:af:f8:1f:b9:31:95:68:
d3:a0:88:ac:50:be:41:08:99:86:20:bf:cc:c6:a8:
33:86:d4:9d:9d:b7:68:7f:b3:c5:43:bc:38:41:d2:
8c:c8:d1:94:03:6a:1b:5c:e4:0c:a3:9b:21:14:45:
23:68:f4:5d:aa:b4:0a:3a:ba:08:d5:b6:d0:b8:fd:
f3:34:13:cf:40:fd:43:b6:c0:71:d3:2e:fd:be:e3:
40:57:01:5f:52:32:1f:98:f2:43:f9:69:58:dc:24:
b0:f3:00:81:a1:d6:f4:7c:ef:e9:2b:2a:5c:05:0d:
a6:ba:df:99:7a:11:f6:1b:59:8e:91:e2:c5:da:3b:
29:2c:ba:f7:25:7d:90:87:4d:4f:cd:73:ed:03:9e:
f1:ee:d7:11:d5:1f:35:19:4a:ca:08:ec:16:f6:4f:
3e:0d:f0:f4:bd:0a:12:43:f6:0d:fa:7c:f9:57:27:
19:85:0d:88:2e:b1:12:f0:57:59:51:96:3c:19:b3:
52:cd:c5:84:63:fe:a6:88:ae:81:37:f9:a5:70:68:
72:a8:59:08:17:f0:01:83:f8:90:c1:35:14:d1:a7:
de:53:56:ae:b1:51:93:70:32:46:84:29:5d:4c:e8:
7d:3b:64:70:b2:c6:08:8c:48:04:c0:a3:10:2e:68:
13:d7:0c:ba:20:33:cb:d7:a7:14:22:a4:cd:de:65:
0d:5f:48:88:7c:0d:ea:83:64:73:71:1a:41:21:d0:
2c:1f:08:fc:e3:87:a3:e2:b3:f8:27:5f:71:02:53:
4c:39:13:d1:73:52:7e:e9:41:d1:9f:85:ca:d8:d5:
16:52:e9:20:2d:34:d2:59:d2:5a:a1:68:27:2e:dd:
d0:36:c7:ef:57:24:df:e6:41:b5:a8:1a:03:a8:56:
8a:f1:da:04:12:b1:be:3c:5c:82:34:51:3b:a6:28:
e3:09:f0:07:a9:73:8b:fc:ed:8a:46:19:f1:9b:a7:
9d:cc:8d:a3:1c:6c:e9:ee:d0:e9:25:94:7d:a9:88:
3e:53:85:41:ce:ee:51:63:83:2b:d4:3b:34:91:99:
bd:e7:fb:0d:9b:1e:26:f4:b0:f3:03:e3:6e:32:6c:
27:18:88:63:0a:1f:de:c2:85:ea:99:b9:4b:5b:a1:
de:78:2f:81:a3:19:e2:b2:92:1e:29:00:c6:4a:fe:
01:26:56:70:90:80:71:c3:ae:77:ef:b2:2d:ff:3d:
f6:51:0f:7c:7a:04:56:94:63:4e:b3:3a:26:f6:e5:
15:c4:2a:09:77:5f:c9:38:d5:18:2f:47:7f:62:ac:
9b:b3:01:fd:14:74:a3:ed:d0:75:ae:75:09:6f:3e:
a1:40:03:7a:36:3d:d9:ab:4a:04:91:76:0f:0d:9e:
87:92:db:13:a1:4a:08:55:c2:02:8a:6d:b3:15:a8:
60:c7:44:3a:b0:ee:30:d8:ff:b5:2b:40:86:20:bd:
df:dc:b6:9d:0d:eb:a5:28:c1:1f:19:71:4a:4f:9f:
0e:e1:e7:e8:1d:96:63:43:f0:73:8a:dc:d4:04:94:
7a:9d:8f:c5:2e:55:64:70:52:2e:1b:b1:4e:d2:37:
6e:d3:2d:5d:54:eb:8f:5b:8f:b4:d7:a3:75:50:94:
a0:c7:cc:29:0c:01:d3:ea:d6:8f:d8:c4:d9:ba:25:
06:a5:f7:30:8a:b9:02:0a:8d:40:2b:69:33:22:a3:
6b:97:5b:e5:52:f8:c1:90:dd:6a:eb:e1:94:d9:b2:
05:c1:dc:a0:58:35:cc:a4:51:3f:10:f6:c2:4d:0c:
56:f1:bf:4a:62:49:83:ce:c4:f5:43:d5:b2:26:fb:
79:af:0d:fc:aa:fd:ba:8a:fe:a1:d1:2c:d8:5c:62:
eb:d4:07:86:f2:d5:5c:69:d1:ba:d5:b0:7a:61:e0:
b5:73:cd:d5:32:a9:78:18:4e:f3:af:5b:45:0b:b2:
0f:c1:e1:0c:be:33:1a:b9:e0:92:7b:2d:8d:4b:e8:
89:09:f3:59:aa:16:13:16:10:6f:2a:6d:92:95:80:
b5:fd:df:18:02:eb:0c:67:85:46:72:70:5a:b9:ed:
f6:e6:d6:00:54:12:8d:f0:1e:27:55:ae:17:d0:36:
bc:9e:06:ed:e9:54:e1:0b:ad:db:3e:06:4a:54:43:
04:9c:49:db:5e:c7:ff:11:a8:d6:83:9f:f6:02:13:
04:98:5a:61:cc:29:bf:da:2b:25:74:af:ff:f6:6f:
04:b8:8b:33:ee:b0:56:57:25:f7:16:7f:4d:42:89:
11:17:3c:ec:42:b2:b4:16:77:c4:24:6f:57:48:7f:
b5:7a:da:46:98:df:3b:52:ce:29:1c:da:8e:24:11:
6d:91:bc:ba:ca:b1:da:c1:85:74:16:a8:4e:67:8c:
6b:ce:c5:81:ce:b8:0b:1e:a1:dc:24:a7:a2:03:9d:
4e:28:69:a2:42:4c:1d:0e:be:80:ea:62:3a:3b:7f:
e6:58:d9:f1:48:81:20:97:30:7d:9a:c3:21:b8:83:
96:83:39:6b:fc:3f:6f:bf:82:12:0e:3c:bb:40:cc:
81:1d:d9:29:0e:df:9c:1c:f4:8d:8a:3d:1a:38:16:
08:5e:83:9b:2b:55:4b:e8:e0:fe:3f:85:a5:a6:b6:
02:9d:b5:f8:2b:e2:1a:32:cc:d5:af:70:83:85:5a:
da:e8:2e:7f:31:98:f1:7f:6b:ba:b4:ae:86:61:99:
52:0d:19:b6:b2:95:69:4c:db:11:c7:3a:1e:44:1a:
d5:9b:81:c2:6b:cf:9c:32:df:0c:bc:4f:3c:c8:3b:
17:28:17:5b:4b:01:06:cb:10:1c:e5:66:e9:45:d8:
ec:6c:34:b0:36:15:b7:e6:78:b4:0a:df:e1:40:0d:
da:e2:a3:13:f3:ec:ae:5e:a5:ab:e4:91:75:63:b5:
64:e4:c1:19:fe:f0:b4:84:fc:e2:6f:20:de:01:28:
bd:58:56:af:f4:e9:1b:b6:8c:2a:44:c1:bd:9d:b4:
39:de:cf:e8:c7:cd:1f:8e:00:ee:08:09:99:58:bc:
c5:87:f4:10:33:0c:d5:ec:e2:6e:05:be:bb:9f:27:
56:ef:d6:3f:92:63:49:a2:65:37:5c:ed:a7:a3:f2:
a7:ef:7c:62:30:a6:de:d5:2a:6f:d8:77:65:e8:58:
c9:4f:97:15:11:da:34:7b:84:9a:d8:a4:40:17:7a:
ec:ff:58:7e:44:7b:0f:e3:34:de:f6:3c:07:ab:55:
9a:94:85:9a:ce:f9:97:fc:4e:34:eb:59:e7:ea:54:
b0:29:5f:33:39:85:e5:19:e1:1f:c5:dd:dc:ac:36:
41:c6:d6:64:14:1e:b0:a0:db:2b:35:5f:9d:74:fb:
60:ef:d5:6d:e2:fb:97:1f:1b:54:89:84:e9:25:f6:
9b:be:88:c0:30:11:7e:e7:97:c1:e3:61:65:04:40:
a7:e8:ca:93:19:42:60:73:84:db:84:4c:b5:d9:c6:
dc:cd:be:63:51:e2:34:ce:bb:2b:28:0f:07:62:fb:
a4:49:d6:85:d0:9f:10:4c:94:16:89:9d:bd:2b:9d:
f4:f4:f0:f7:25:d2:f4:f4:69:92:14:e4:ad:01:b3:
b2:ec:c5:30:65:28:83:31:0b:70:f1:6e:36:96:a1:
43:5c:dd:79:b5:35:83:8f:53:90:66:41:b0:b8:b8:
fc:fa:01:b4:c4:1c:02:ed:b9:bc:8f:5d:3d:43:02:
ee:e5:77:85:b0:26:bd:60:cd:70:77:86:ce:ed:29:
3e:f7:62:89:a9:85:af:c5:4d:0c:43:20:20:31:11:
e6:19:12:0a:4d:c1:b4:bb:d3:55:d2:8f:28:e5:6b:
3e:72:02:f7:14:58:23:a9:fc:8e:c6:bc:8f:f7:c6:
48:52:ba:cf:95:54:20:f9:f9:53:0d:a1:db:fc:a9:
a6:26:d7:ea:db:21:85:63:0c:4a:bc:9c:d5:9d:31:
2f:0c:4f:7f:85:74:05:39:d9:0b:bc:8e:23:53:25:
ae:29:68:d5:89:6a:3c:18:fa:40:e1:f3:47:28:a9:
0b:d9:d3:b5:1e:1b:a3:6c:db:5f:8a:c7:29:df:91:
de:35:f6:80:a6:37:1f:95:ee:c6:10:1c:db:26:13:
3b:29:d0:88:35:cf:93:b7:c8:30:12:57:0b:da:01:
9b:2e:1c:71:b0:fc:bb:7b:5c:e0:31:d8:b0:66:92:
a1:e6:b7:18:b7:2c:af:45:ab
generator: 2 (0x2)
*/
// Paranoid, are we?
#define bP_16384 "\x8e\x76\xe3\x96\xe8\x0a\xd2\x4f\xb2\xab\xc7\x9b\x5a\x34\x17\x85\xd9\x59\xbd\x16\xa0\x39\x7c\x36\x6b\x9c\x0a\xba\xc7\x89\x88\x23" \
"\x0c\x91\xfc\xb6\x53\xd6\xd6\x5b\xa8\xa3\x72\x7a\x1b\x67\xf9\x9b\xf1\x26\xa9\x9b\xb9\x1a\x43\x8c\xd4\x8e\xa7\x9e\x28\xd8\xcd\xeb" \
"\xe7\x2e\x8d\xce\x4a\x17\xdb\xea\xe0\x27\x0e\x76\xc2\xbe\xd1\xed\xdf\xd8\x20\x1b\x9f\x80\x4d\xfa\x8b\x82\x0d\x30\xbd\xc2\xbc\x89" \
"\xc7\x4f\x0f\x3b\xec\xf0\xfa\xf0\x85\xae\x99\xb1\x65\x3a\x83\x93\x90\x38\x22\xc3\xff\xb6\xf6\x4f\xd6\x12\x4a\x18\x6e\x8a\x77\x10" \
"\xf2\x3f\xe2\x08\x07\x4b\x97\xf9\x92\x1e\x84\xbc\x74\x19\x6f\xee\xbc\x1c\xf0\x9e\xf2\x6c\xe8\x73\x5f\x66\x19\x94\x07\x37\x9f\x3a" \
"\x81\x4b\xf4\x81\x4c\x8e\x6d\xe7\x89\x38\x85\xd8\xbb\xf1\x94\xcb\xad\xc7\x57\xe4\xa3\x3a\xf5\x67\x36\x33\x92\xba\x71\xb2\x03\x9b" \
"\x46\x11\x6d\x6a\x44\xeb\x41\x09\xe7\xb6\x04\x22\x8b\x29\x54\x52\x6d\xb2\xc4\x5d\x96\x95\xe7\xdd\x9d\x60\x6f\x1a\x27\x65\xb1\x62" \
"\x4f\xb7\xb9\x94\x75\x69\xd2\xc9\x71\xce\x90\x73\x89\x25\x45\x97\x89\x6e\xff\x1b\xa2\xbd\x8a\x32\x30\x52\x2c\xba\xce\xc2\xbc\xcd" \
"\x64\x40\x0f\xab\x9a\x11\x60\x84\x2f\x90\xd0\x17\x0c\x06\x52\xef\x45\xcc\x0c\xf7\xca\x88\x4e\x3e\xa8\xae\x89\x01\x15\x00\xda\xe4" \
"\xb3\xc5\x58\xa0\x04\xce\x94\x12\x7e\x9a\xfd\xf8\xb2\x0f\x00\xe8\xaf\x71\x70\x46\xcd\xfd\x4c\x00\x8a\x8b\x16\x1d\xa9\x81\x52\x05" \
"\x99\xac\x98\x5a\xae\xd4\x95\xff\xbb\x9e\x95\x5a\x66\xb8\x7b\x6e\x9c\xa4\xa6\x1e\x7c\x1a\xde\xc1\xcf\xcd\xee\x2c\xac\xfa\x6c\xec" \
"\x76\xd6\x67\x11\x9c\x44\x9d\x49\x34\x97\x06\x80\x5a\xfe\x9e\xa0\xa5\x61\x1f\xe3\x60\x7b\x3f\x3e\x51\x33\xbb\x93\xfa\xe1\x05\xd1" \
"\x97\xaa\xa3\x72\x33\xc7\x88\xa7\xfb\x6b\xc4\xa9\x34\x36\xdb\xec\x0b\xc6\x43\x54\x73\xc5\xf2\x8d\xf7\x79\x31\xdc\x1b\xb1\xcd\xbf" \
"\x7e\xa1\x86\x1b\xf8\xb7\xe2\xdd\x47\x6f\x0a\xa5\xbd\xeb\x99\xaa\xbf\xb0\xdd\xe5\x5a\xc3\x39\xe6\x31\xc9\x3b\x60\x00\x03\xa8\x2a" \
"\xe5\x4d\x26\x2c\x3e\xbc\x7e\x21\xa9\xe6\xe8\x9f\xf3\x24\xf3\x5a\x6a\xce\x13\xd6\x7d\x6b\x9b\x8b\xaf\xf8\x1f\xb9\x31\x95\x68\xd3" \
"\xa0\x88\xac\x50\xbe\x41\x08\x99\x86\x20\xbf\xcc\xc6\xa8\x33\x86\xd4\x9d\x9d\xb7\x68\x7f\xb3\xc5\x43\xbc\x38\x41\xd2\x8c\xc8\xd1" \
"\x94\x03\x6a\x1b\x5c\xe4\x0c\xa3\x9b\x21\x14\x45\x23\x68\xf4\x5d\xaa\xb4\x0a\x3a\xba\x08\xd5\xb6\xd0\xb8\xfd\xf3\x34\x13\xcf\x40" \
"\xfd\x43\xb6\xc0\x71\xd3\x2e\xfd\xbe\xe3\x40\x57\x01\x5f\x52\x32\x1f\x98\xf2\x43\xf9\x69\x58\xdc\x24\xb0\xf3\x00\x81\xa1\xd6\xf4" \
"\x7c\xef\xe9\x2b\x2a\x5c\x05\x0d\xa6\xba\xdf\x99\x7a\x11\xf6\x1b\x59\x8e\x91\xe2\xc5\xda\x3b\x29\x2c\xba\xf7\x25\x7d\x90\x87\x4d" \
"\x4f\xcd\x73\xed\x03\x9e\xf1\xee\xd7\x11\xd5\x1f\x35\x19\x4a\xca\x08\xec\x16\xf6\x4f\x3e\x0d\xf0\xf4\xbd\x0a\x12\x43\xf6\x0d\xfa" \
"\x7c\xf9\x57\x27\x19\x85\x0d\x88\x2e\xb1\x12\xf0\x57\x59\x51\x96\x3c\x19\xb3\x52\xcd\xc5\x84\x63\xfe\xa6\x88\xae\x81\x37\xf9\xa5" \
"\x70\x68\x72\xa8\x59\x08\x17\xf0\x01\x83\xf8\x90\xc1\x35\x14\xd1\xa7\xde\x53\x56\xae\xb1\x51\x93\x70\x32\x46\x84\x29\x5d\x4c\xe8" \
"\x7d\x3b\x64\x70\xb2\xc6\x08\x8c\x48\x04\xc0\xa3\x10\x2e\x68\x13\xd7\x0c\xba\x20\x33\xcb\xd7\xa7\x14\x22\xa4\xcd\xde\x65\x0d\x5f" \
"\x48\x88\x7c\x0d\xea\x83\x64\x73\x71\x1a\x41\x21\xd0\x2c\x1f\x08\xfc\xe3\x87\xa3\xe2\xb3\xf8\x27\x5f\x71\x02\x53\x4c\x39\x13\xd1" \
"\x73\x52\x7e\xe9\x41\xd1\x9f\x85\xca\xd8\xd5\x16\x52\xe9\x20\x2d\x34\xd2\x59\xd2\x5a\xa1\x68\x27\x2e\xdd\xd0\x36\xc7\xef\x57\x24" \
"\xdf\xe6\x41\xb5\xa8\x1a\x03\xa8\x56\x8a\xf1\xda\x04\x12\xb1\xbe\x3c\x5c\x82\x34\x51\x3b\xa6\x28\xe3\x09\xf0\x07\xa9\x73\x8b\xfc" \
"\xed\x8a\x46\x19\xf1\x9b\xa7\x9d\xcc\x8d\xa3\x1c\x6c\xe9\xee\xd0\xe9\x25\x94\x7d\xa9\x88\x3e\x53\x85\x41\xce\xee\x51\x63\x83\x2b" \
"\xd4\x3b\x34\x91\x99\xbd\xe7\xfb\x0d\x9b\x1e\x26\xf4\xb0\xf3\x03\xe3\x6e\x32\x6c\x27\x18\x88\x63\x0a\x1f\xde\xc2\x85\xea\x99\xb9" \
"\x4b\x5b\xa1\xde\x78\x2f\x81\xa3\x19\xe2\xb2\x92\x1e\x29\x00\xc6\x4a\xfe\x01\x26\x56\x70\x90\x80\x71\xc3\xae\x77\xef\xb2\x2d\xff" \
"\x3d\xf6\x51\x0f\x7c\x7a\x04\x56\x94\x63\x4e\xb3\x3a\x26\xf6\xe5\x15\xc4\x2a\x09\x77\x5f\xc9\x38\xd5\x18\x2f\x47\x7f\x62\xac\x9b" \
"\xb3\x01\xfd\x14\x74\xa3\xed\xd0\x75\xae\x75\x09\x6f\x3e\xa1\x40\x03\x7a\x36\x3d\xd9\xab\x4a\x04\x91\x76\x0f\x0d\x9e\x87\x92\xdb" \
"\x13\xa1\x4a\x08\x55\xc2\x02\x8a\x6d\xb3\x15\xa8\x60\xc7\x44\x3a\xb0\xee\x30\xd8\xff\xb5\x2b\x40\x86\x20\xbd\xdf\xdc\xb6\x9d\x0d" \
"\xeb\xa5\x28\xc1\x1f\x19\x71\x4a\x4f\x9f\x0e\xe1\xe7\xe8\x1d\x96\x63\x43\xf0\x73\x8a\xdc\xd4\x04\x94\x7a\x9d\x8f\xc5\x2e\x55\x64" \
"\x70\x52\x2e\x1b\xb1\x4e\xd2\x37\x6e\xd3\x2d\x5d\x54\xeb\x8f\x5b\x8f\xb4\xd7\xa3\x75\x50\x94\xa0\xc7\xcc\x29\x0c\x01\xd3\xea\xd6" \
"\x8f\xd8\xc4\xd9\xba\x25\x06\xa5\xf7\x30\x8a\xb9\x02\x0a\x8d\x40\x2b\x69\x33\x22\xa3\x6b\x97\x5b\xe5\x52\xf8\xc1\x90\xdd\x6a\xeb" \
"\xe1\x94\xd9\xb2\x05\xc1\xdc\xa0\x58\x35\xcc\xa4\x51\x3f\x10\xf6\xc2\x4d\x0c\x56\xf1\xbf\x4a\x62\x49\x83\xce\xc4\xf5\x43\xd5\xb2" \
"\x26\xfb\x79\xaf\x0d\xfc\xaa\xfd\xba\x8a\xfe\xa1\xd1\x2c\xd8\x5c\x62\xeb\xd4\x07\x86\xf2\xd5\x5c\x69\xd1\xba\xd5\xb0\x7a\x61\xe0" \
"\xb5\x73\xcd\xd5\x32\xa9\x78\x18\x4e\xf3\xaf\x5b\x45\x0b\xb2\x0f\xc1\xe1\x0c\xbe\x33\x1a\xb9\xe0\x92\x7b\x2d\x8d\x4b\xe8\x89\x09" \
"\xf3\x59\xaa\x16\x13\x16\x10\x6f\x2a\x6d\x92\x95\x80\xb5\xfd\xdf\x18\x02\xeb\x0c\x67\x85\x46\x72\x70\x5a\xb9\xed\xf6\xe6\xd6\x00" \
"\x54\x12\x8d\xf0\x1e\x27\x55\xae\x17\xd0\x36\xbc\x9e\x06\xed\xe9\x54\xe1\x0b\xad\xdb\x3e\x06\x4a\x54\x43\x04\x9c\x49\xdb\x5e\xc7" \
"\xff\x11\xa8\xd6\x83\x9f\xf6\x02\x13\x04\x98\x5a\x61\xcc\x29\xbf\xda\x2b\x25\x74\xaf\xff\xf6\x6f\x04\xb8\x8b\x33\xee\xb0\x56\x57" \
"\x25\xf7\x16\x7f\x4d\x42\x89\x11\x17\x3c\xec\x42\xb2\xb4\x16\x77\xc4\x24\x6f\x57\x48\x7f\xb5\x7a\xda\x46\x98\xdf\x3b\x52\xce\x29" \
"\x1c\xda\x8e\x24\x11\x6d\x91\xbc\xba\xca\xb1\xda\xc1\x85\x74\x16\xa8\x4e\x67\x8c\x6b\xce\xc5\x81\xce\xb8\x0b\x1e\xa1\xdc\x24\xa7" \
"\xa2\x03\x9d\x4e\x28\x69\xa2\x42\x4c\x1d\x0e\xbe\x80\xea\x62\x3a\x3b\x7f\xe6\x58\xd9\xf1\x48\x81\x20\x97\x30\x7d\x9a\xc3\x21\xb8" \
"\x83\x96\x83\x39\x6b\xfc\x3f\x6f\xbf\x82\x12\x0e\x3c\xbb\x40\xcc\x81\x1d\xd9\x29\x0e\xdf\x9c\x1c\xf4\x8d\x8a\x3d\x1a\x38\x16\x08" \
"\x5e\x83\x9b\x2b\x55\x4b\xe8\xe0\xfe\x3f\x85\xa5\xa6\xb6\x02\x9d\xb5\xf8\x2b\xe2\x1a\x32\xcc\xd5\xaf\x70\x83\x85\x5a\xda\xe8\x2e" \
"\x7f\x31\x98\xf1\x7f\x6b\xba\xb4\xae\x86\x61\x99\x52\x0d\x19\xb6\xb2\x95\x69\x4c\xdb\x11\xc7\x3a\x1e\x44\x1a\xd5\x9b\x81\xc2\x6b" \
"\xcf\x9c\x32\xdf\x0c\xbc\x4f\x3c\xc8\x3b\x17\x28\x17\x5b\x4b\x01\x06\xcb\x10\x1c\xe5\x66\xe9\x45\xd8\xec\x6c\x34\xb0\x36\x15\xb7" \
"\xe6\x78\xb4\x0a\xdf\xe1\x40\x0d\xda\xe2\xa3\x13\xf3\xec\xae\x5e\xa5\xab\xe4\x91\x75\x63\xb5\x64\xe4\xc1\x19\xfe\xf0\xb4\x84\xfc" \
"\xe2\x6f\x20\xde\x01\x28\xbd\x58\x56\xaf\xf4\xe9\x1b\xb6\x8c\x2a\x44\xc1\xbd\x9d\xb4\x39\xde\xcf\xe8\xc7\xcd\x1f\x8e\x00\xee\x08" \
"\x09\x99\x58\xbc\xc5\x87\xf4\x10\x33\x0c\xd5\xec\xe2\x6e\x05\xbe\xbb\x9f\x27\x56\xef\xd6\x3f\x92\x63\x49\xa2\x65\x37\x5c\xed\xa7" \
"\xa3\xf2\xa7\xef\x7c\x62\x30\xa6\xde\xd5\x2a\x6f\xd8\x77\x65\xe8\x58\xc9\x4f\x97\x15\x11\xda\x34\x7b\x84\x9a\xd8\xa4\x40\x17\x7a" \
"\xec\xff\x58\x7e\x44\x7b\x0f\xe3\x34\xde\xf6\x3c\x07\xab\x55\x9a\x94\x85\x9a\xce\xf9\x97\xfc\x4e\x34\xeb\x59\xe7\xea\x54\xb0\x29" \
"\x5f\x33\x39\x85\xe5\x19\xe1\x1f\xc5\xdd\xdc\xac\x36\x41\xc6\xd6\x64\x14\x1e\xb0\xa0\xdb\x2b\x35\x5f\x9d\x74\xfb\x60\xef\xd5\x6d" \
"\xe2\xfb\x97\x1f\x1b\x54\x89\x84\xe9\x25\xf6\x9b\xbe\x88\xc0\x30\x11\x7e\xe7\x97\xc1\xe3\x61\x65\x04\x40\xa7\xe8\xca\x93\x19\x42" \
"\x60\x73\x84\xdb\x84\x4c\xb5\xd9\xc6\xdc\xcd\xbe\x63\x51\xe2\x34\xce\xbb\x2b\x28\x0f\x07\x62\xfb\xa4\x49\xd6\x85\xd0\x9f\x10\x4c" \
"\x94\x16\x89\x9d\xbd\x2b\x9d\xf4\xf4\xf0\xf7\x25\xd2\xf4\xf4\x69\x92\x14\xe4\xad\x01\xb3\xb2\xec\xc5\x30\x65\x28\x83\x31\x0b\x70" \
"\xf1\x6e\x36\x96\xa1\x43\x5c\xdd\x79\xb5\x35\x83\x8f\x53\x90\x66\x41\xb0\xb8\xb8\xfc\xfa\x01\xb4\xc4\x1c\x02\xed\xb9\xbc\x8f\x5d" \
"\x3d\x43\x02\xee\xe5\x77\x85\xb0\x26\xbd\x60\xcd\x70\x77\x86\xce\xed\x29\x3e\xf7\x62\x89\xa9\x85\xaf\xc5\x4d\x0c\x43\x20\x20\x31" \
"\x11\xe6\x19\x12\x0a\x4d\xc1\xb4\xbb\xd3\x55\xd2\x8f\x28\xe5\x6b\x3e\x72\x02\xf7\x14\x58\x23\xa9\xfc\x8e\xc6\xbc\x8f\xf7\xc6\x48" \
"\x52\xba\xcf\x95\x54\x20\xf9\xf9\x53\x0d\xa1\xdb\xfc\xa9\xa6\x26\xd7\xea\xdb\x21\x85\x63\x0c\x4a\xbc\x9c\xd5\x9d\x31\x2f\x0c\x4f" \
"\x7f\x85\x74\x05\x39\xd9\x0b\xbc\x8e\x23\x53\x25\xae\x29\x68\xd5\x89\x6a\x3c\x18\xfa\x40\xe1\xf3\x47\x28\xa9\x0b\xd9\xd3\xb5\x1e" \
"\x1b\xa3\x6c\xdb\x5f\x8a\xc7\x29\xdf\x91\xde\x35\xf6\x80\xa6\x37\x1f\x95\xee\xc6\x10\x1c\xdb\x26\x13\x3b\x29\xd0\x88\x35\xcf\x93" \
"\xb7\xc8\x30\x12\x57\x0b\xda\x01\x9b\x2e\x1c\x71\xb0\xfc\xbb\x7b\x5c\xe0\x31\xd8\xb0\x66\x92\xa1\xe6\xb7\x18\xb7\x2c\xaf\x45\xab"
/*! Diffie-Hellman key exchange context. */
typedef struct _dh_ctxt
{
/*! Prime p. */
bn_t *p;
/*! Primitive root modulo p \in [2, p - 2]. */
bn_t *g;
/*! Private random number \in [1, p - 2]. */
bn_t *c;
/*! Public constant to exchange. */
bn_t *C;
} dh_ctxt_t;
/*!
* \brief Initialize Diffie-Hellman key exchange context.
* \param p Prime p.
* \param g Primitive root modulo p \in [2, p - 2] (not readonly).
* \return NULL on error.
*/
dh_ctxt_t *dh_init(bn_t *p, bn_t *g);
/*!
* \brief Free context.
*/
void dh_free(dh_ctxt_t *ctxt);
/*!
* \brief Calculate shared secret.
* \param K Shared secret dest.
* \param ctxt DiffieHellman key exchange context.
* \param D Exchanged constant.
* \return Shared secret K.
*/
bn_t *dh_step(bn_t *K, dh_ctxt_t *ctxt, bn_t *D);
#endif