• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * \file dhm.h
3  *
4  * \brief   This file contains Diffie-Hellman-Merkle (DHM) key exchange
5  *          definitions and functions.
6  *
7  * Diffie-Hellman-Merkle (DHM) key exchange is defined in
8  * <em>RFC-2631: Diffie-Hellman Key Agreement Method</em> and
9  * <em>Public-Key Cryptography Standards (PKCS) #3: Diffie
10  * Hellman Key Agreement Standard</em>.
11  *
12  * <em>RFC-3526: More Modular Exponential (MODP) Diffie-Hellman groups for
13  * Internet Key Exchange (IKE)</em> defines a number of standardized
14  * Diffie-Hellman groups for IKE.
15  *
16  * <em>RFC-5114: Additional Diffie-Hellman Groups for Use with IETF
17  * Standards</em> defines a number of standardized Diffie-Hellman
18  * groups that can be used.
19  *
20  * \warning  The security of the DHM key exchange relies on the proper choice
21  *           of prime modulus - optimally, it should be a safe prime. The usage
22  *           of non-safe primes both decreases the difficulty of the underlying
23  *           discrete logarithm problem and can lead to small subgroup attacks
24  *           leaking private exponent bits when invalid public keys are used
25  *           and not detected. This is especially relevant if the same DHM
26  *           parameters are reused for multiple key exchanges as in static DHM,
27  *           while the criticality of small-subgroup attacks is lower for
28  *           ephemeral DHM.
29  *
30  * \warning  For performance reasons, the code does neither perform primality
31  *           nor safe primality tests, nor the expensive checks for invalid
32  *           subgroups. Moreover, even if these were performed, non-standardized
33  *           primes cannot be trusted because of the possibility of backdoors
34  *           that can't be effectively checked for.
35  *
36  * \warning  Diffie-Hellman-Merkle is therefore a security risk when not using
37  *           standardized primes generated using a trustworthy ("nothing up
38  *           my sleeve") method, such as the RFC 3526 / 7919 primes. In the TLS
39  *           protocol, DH parameters need to be negotiated, so using the default
40  *           primes systematically is not always an option. If possible, use
41  *           Elliptic Curve Diffie-Hellman (ECDH), which has better performance,
42  *           and for which the TLS protocol mandates the use of standard
43  *           parameters.
44  *
45  */
46 /*
47  *  Copyright The Mbed TLS Contributors
48  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
49  */
50 
51 #ifndef MBEDTLS_DHM_H
52 #define MBEDTLS_DHM_H
53 
54 #if !defined(MBEDTLS_CONFIG_FILE)
55 #include "mbedtls/config.h"
56 #else
57 #include MBEDTLS_CONFIG_FILE
58 #endif
59 #include "mbedtls/bignum.h"
60 
61 /*
62  * DHM Error codes
63  */
64 /** Bad input parameters. */
65 #define MBEDTLS_ERR_DHM_BAD_INPUT_DATA                    -0x3080
66 /** Reading of the DHM parameters failed. */
67 #define MBEDTLS_ERR_DHM_READ_PARAMS_FAILED                -0x3100
68 /** Making of the DHM parameters failed. */
69 #define MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED                -0x3180
70 /** Reading of the public values failed. */
71 #define MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED                -0x3200
72 /** Making of the public value failed. */
73 #define MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED                -0x3280
74 /** Calculation of the DHM secret failed. */
75 #define MBEDTLS_ERR_DHM_CALC_SECRET_FAILED                -0x3300
76 /** The ASN.1 data is not formatted correctly. */
77 #define MBEDTLS_ERR_DHM_INVALID_FORMAT                    -0x3380
78 /** Allocation of memory failed. */
79 #define MBEDTLS_ERR_DHM_ALLOC_FAILED                      -0x3400
80 /** Read or write of file failed. */
81 #define MBEDTLS_ERR_DHM_FILE_IO_ERROR                     -0x3480
82 
83 /* MBEDTLS_ERR_DHM_HW_ACCEL_FAILED is deprecated and should not be used. */
84 /** DHM hardware accelerator failed. */
85 #define MBEDTLS_ERR_DHM_HW_ACCEL_FAILED                   -0x3500
86 
87 /** Setting the modulus and generator failed. */
88 #define MBEDTLS_ERR_DHM_SET_GROUP_FAILED                  -0x3580
89 
90 #ifdef __cplusplus
91 extern "C" {
92 #endif
93 
94 #if !defined(MBEDTLS_DHM_ALT)
95 
96 /**
97  * \brief          The DHM context structure.
98  */
99 typedef struct mbedtls_dhm_context {
100     size_t len;         /*!<  The size of \p P in Bytes. */
101     mbedtls_mpi P;      /*!<  The prime modulus. */
102     mbedtls_mpi G;      /*!<  The generator. */
103     mbedtls_mpi X;      /*!<  Our secret value. */
104     mbedtls_mpi GX;     /*!<  Our public key = \c G^X mod \c P. */
105     mbedtls_mpi GY;     /*!<  The public key of the peer = \c G^Y mod \c P. */
106     mbedtls_mpi K;      /*!<  The shared secret = \c G^(XY) mod \c P. */
107     mbedtls_mpi RP;     /*!<  The cached value = \c R^2 mod \c P. */
108     mbedtls_mpi Vi;     /*!<  The blinding value. */
109     mbedtls_mpi Vf;     /*!<  The unblinding value. */
110     mbedtls_mpi pX;     /*!<  The previous \c X. */
111 }
112 mbedtls_dhm_context;
113 
114 #else /* MBEDTLS_DHM_ALT */
115 #include "dhm_alt.h"
116 #endif /* MBEDTLS_DHM_ALT */
117 
118 /**
119  * \brief          This function initializes the DHM context.
120  *
121  * \param ctx      The DHM context to initialize.
122  */
123 void mbedtls_dhm_init(mbedtls_dhm_context *ctx);
124 
125 /**
126  * \brief          This function parses the DHM parameters in a
127  *                 TLS ServerKeyExchange handshake message
128  *                 (DHM modulus, generator, and public key).
129  *
130  * \note           In a TLS handshake, this is the how the client
131  *                 sets up its DHM context from the server's public
132  *                 DHM key material.
133  *
134  * \param ctx      The DHM context to use. This must be initialized.
135  * \param p        On input, *p must be the start of the input buffer.
136  *                 On output, *p is updated to point to the end of the data
137  *                 that has been read. On success, this is the first byte
138  *                 past the end of the ServerKeyExchange parameters.
139  *                 On error, this is the point at which an error has been
140  *                 detected, which is usually not useful except to debug
141  *                 failures.
142  * \param end      The end of the input buffer.
143  *
144  * \return         \c 0 on success.
145  * \return         An \c MBEDTLS_ERR_DHM_XXX error code on failure.
146  */
147 int mbedtls_dhm_read_params(mbedtls_dhm_context *ctx,
148                             unsigned char **p,
149                             const unsigned char *end);
150 
151 /**
152  * \brief          This function generates a DHM key pair and exports its
153  *                 public part together with the DHM parameters in the format
154  *                 used in a TLS ServerKeyExchange handshake message.
155  *
156  * \note           This function assumes that the DHM parameters \c ctx->P
157  *                 and \c ctx->G have already been properly set. For that, use
158  *                 mbedtls_dhm_set_group() below in conjunction with
159  *                 mbedtls_mpi_read_binary() and mbedtls_mpi_read_string().
160  *
161  * \note           In a TLS handshake, this is the how the server generates
162  *                 and exports its DHM key material.
163  *
164  * \param ctx      The DHM context to use. This must be initialized
165  *                 and have the DHM parameters set. It may or may not
166  *                 already have imported the peer's public key.
167  * \param x_size   The private key size in Bytes.
168  * \param olen     The address at which to store the number of Bytes
169  *                 written on success. This must not be \c NULL.
170  * \param output   The destination buffer. This must be a writable buffer of
171  *                 sufficient size to hold the reduced binary presentation of
172  *                 the modulus, the generator and the public key, each wrapped
173  *                 with a 2-byte length field. It is the responsibility of the
174  *                 caller to ensure that enough space is available. Refer to
175  *                 mbedtls_mpi_size() to computing the byte-size of an MPI.
176  * \param f_rng    The RNG function. Must not be \c NULL.
177  * \param p_rng    The RNG context to be passed to \p f_rng. This may be
178  *                 \c NULL if \p f_rng doesn't need a context parameter.
179  *
180  * \return         \c 0 on success.
181  * \return         An \c MBEDTLS_ERR_DHM_XXX error code on failure.
182  */
183 int mbedtls_dhm_make_params(mbedtls_dhm_context *ctx, int x_size,
184                             unsigned char *output, size_t *olen,
185                             int (*f_rng)(void *, unsigned char *, size_t),
186                             void *p_rng);
187 
188 /**
189  * \brief          This function sets the prime modulus and generator.
190  *
191  * \note           This function can be used to set \c ctx->P, \c ctx->G
192  *                 in preparation for mbedtls_dhm_make_params().
193  *
194  * \param ctx      The DHM context to configure. This must be initialized.
195  * \param P        The MPI holding the DHM prime modulus. This must be
196  *                 an initialized MPI.
197  * \param G        The MPI holding the DHM generator. This must be an
198  *                 initialized MPI.
199  *
200  * \return         \c 0 if successful.
201  * \return         An \c MBEDTLS_ERR_DHM_XXX error code on failure.
202  */
203 int mbedtls_dhm_set_group(mbedtls_dhm_context *ctx,
204                           const mbedtls_mpi *P,
205                           const mbedtls_mpi *G);
206 
207 /**
208  * \brief          This function imports the raw public value of the peer.
209  *
210  * \note           In a TLS handshake, this is the how the server imports
211  *                 the Client's public DHM key.
212  *
213  * \param ctx      The DHM context to use. This must be initialized and have
214  *                 its DHM parameters set, e.g. via mbedtls_dhm_set_group().
215  *                 It may or may not already have generated its own private key.
216  * \param input    The input buffer containing the \c G^Y value of the peer.
217  *                 This must be a readable buffer of size \p ilen Bytes.
218  * \param ilen     The size of the input buffer \p input in Bytes.
219  *
220  * \return         \c 0 on success.
221  * \return         An \c MBEDTLS_ERR_DHM_XXX error code on failure.
222  */
223 int mbedtls_dhm_read_public(mbedtls_dhm_context *ctx,
224                             const unsigned char *input, size_t ilen);
225 
226 /**
227  * \brief          This function creates a DHM key pair and exports
228  *                 the raw public key in big-endian format.
229  *
230  * \note           The destination buffer is always fully written
231  *                 so as to contain a big-endian representation of G^X mod P.
232  *                 If it is larger than \c ctx->len, it is padded accordingly
233  *                 with zero-bytes at the beginning.
234  *
235  * \param ctx      The DHM context to use. This must be initialized and
236  *                 have the DHM parameters set. It may or may not already
237  *                 have imported the peer's public key.
238  * \param x_size   The private key size in Bytes.
239  * \param output   The destination buffer. This must be a writable buffer of
240  *                 size \p olen Bytes.
241  * \param olen     The length of the destination buffer. This must be at least
242  *                 equal to `ctx->len` (the size of \c P).
243  * \param f_rng    The RNG function. This must not be \c NULL.
244  * \param p_rng    The RNG context to be passed to \p f_rng. This may be \c NULL
245  *                 if \p f_rng doesn't need a context argument.
246  *
247  * \return         \c 0 on success.
248  * \return         An \c MBEDTLS_ERR_DHM_XXX error code on failure.
249  */
250 int mbedtls_dhm_make_public(mbedtls_dhm_context *ctx, int x_size,
251                             unsigned char *output, size_t olen,
252                             int (*f_rng)(void *, unsigned char *, size_t),
253                             void *p_rng);
254 
255 /**
256  * \brief          This function derives and exports the shared secret
257  *                 \c (G^Y)^X mod \c P.
258  *
259  * \note           If \p f_rng is not \c NULL, it is used to blind the input as
260  *                 a countermeasure against timing attacks. Blinding is used
261  *                 only if our private key \c X is re-used, and not used
262  *                 otherwise. We recommend always passing a non-NULL
263  *                 \p f_rng argument.
264  *
265  * \param ctx           The DHM context to use. This must be initialized
266  *                      and have its own private key generated and the peer's
267  *                      public key imported.
268  * \param output        The buffer to write the generated shared key to. This
269  *                      must be a writable buffer of size \p output_size Bytes.
270  * \param output_size   The size of the destination buffer. This must be at
271  *                      least the size of \c ctx->len (the size of \c P).
272  * \param olen          On exit, holds the actual number of Bytes written.
273  * \param f_rng         The RNG function, for blinding purposes. This may
274  *                      b \c NULL if blinding isn't needed.
275  * \param p_rng         The RNG context. This may be \c NULL if \p f_rng
276  *                      doesn't need a context argument.
277  *
278  * \return              \c 0 on success.
279  * \return              An \c MBEDTLS_ERR_DHM_XXX error code on failure.
280  */
281 int mbedtls_dhm_calc_secret(mbedtls_dhm_context *ctx,
282                             unsigned char *output, size_t output_size, size_t *olen,
283                             int (*f_rng)(void *, unsigned char *, size_t),
284                             void *p_rng);
285 
286 /**
287  * \brief          This function frees and clears the components
288  *                 of a DHM context.
289  *
290  * \param ctx      The DHM context to free and clear. This may be \c NULL,
291  *                 in which case this function is a no-op. If it is not \c NULL,
292  *                 it must point to an initialized DHM context.
293  */
294 void mbedtls_dhm_free(mbedtls_dhm_context *ctx);
295 
296 #if defined(MBEDTLS_ASN1_PARSE_C)
297 /**
298  * \brief             This function parses DHM parameters in PEM or DER format.
299  *
300  * \param dhm         The DHM context to import the DHM parameters into.
301  *                    This must be initialized.
302  * \param dhmin       The input buffer. This must be a readable buffer of
303  *                    length \p dhminlen Bytes.
304  * \param dhminlen    The size of the input buffer \p dhmin, including the
305  *                    terminating \c NULL Byte for PEM data.
306  *
307  * \return            \c 0 on success.
308  * \return            An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error
309  *                    code on failure.
310  */
311 int mbedtls_dhm_parse_dhm(mbedtls_dhm_context *dhm, const unsigned char *dhmin,
312                           size_t dhminlen);
313 
314 #if defined(MBEDTLS_FS_IO)
315 /**
316  * \brief          This function loads and parses DHM parameters from a file.
317  *
318  * \param dhm      The DHM context to load the parameters to.
319  *                 This must be initialized.
320  * \param path     The filename to read the DHM parameters from.
321  *                 This must not be \c NULL.
322  *
323  * \return         \c 0 on success.
324  * \return         An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX
325  *                 error code on failure.
326  */
327 int mbedtls_dhm_parse_dhmfile(mbedtls_dhm_context *dhm, const char *path);
328 #endif /* MBEDTLS_FS_IO */
329 #endif /* MBEDTLS_ASN1_PARSE_C */
330 
331 #if defined(MBEDTLS_SELF_TEST)
332 
333 /**
334  * \brief          The DMH checkup routine.
335  *
336  * \return         \c 0 on success.
337  * \return         \c 1 on failure.
338  */
339 int mbedtls_dhm_self_test(int verbose);
340 
341 #endif /* MBEDTLS_SELF_TEST */
342 #ifdef __cplusplus
343 }
344 #endif
345 
346 /**
347  * RFC 3526, RFC 5114 and RFC 7919 standardize a number of
348  * Diffie-Hellman groups, some of which are included here
349  * for use within the SSL/TLS module and the user's convenience
350  * when configuring the Diffie-Hellman parameters by hand
351  * through \c mbedtls_ssl_conf_dh_param.
352  *
353  * The following lists the source of the above groups in the standards:
354  * - RFC 5114 section 2.2:  2048-bit MODP Group with 224-bit Prime Order Subgroup
355  * - RFC 3526 section 3:    2048-bit MODP Group
356  * - RFC 3526 section 4:    3072-bit MODP Group
357  * - RFC 3526 section 5:    4096-bit MODP Group
358  * - RFC 7919 section A.1:  ffdhe2048
359  * - RFC 7919 section A.2:  ffdhe3072
360  * - RFC 7919 section A.3:  ffdhe4096
361  * - RFC 7919 section A.4:  ffdhe6144
362  * - RFC 7919 section A.5:  ffdhe8192
363  *
364  * The constants with suffix "_p" denote the chosen prime moduli, while
365  * the constants with suffix "_g" denote the chosen generator
366  * of the associated prime field.
367  *
368  * The constants further suffixed with "_bin" are provided in binary format,
369  * while all other constants represent null-terminated strings holding the
370  * hexadecimal presentation of the respective numbers.
371  *
372  * The primes from RFC 3526 and RFC 7919 have been generating by the following
373  * trust-worthy procedure:
374  * - Fix N in { 2048, 3072, 4096, 6144, 8192 } and consider the N-bit number
375  *   the first and last 64 bits are all 1, and the remaining N - 128 bits of
376  *   which are 0x7ff...ff.
377  * - Add the smallest multiple of the first N - 129 bits of the binary expansion
378  *   of pi (for RFC 5236) or e (for RFC 7919) to this intermediate bit-string
379  *   such that the resulting integer is a safe-prime.
380  * - The result is the respective RFC 3526 / 7919 prime, and the corresponding
381  *   generator is always chosen to be 2 (which is a square for these prime,
382  *   hence the corresponding subgroup has order (p-1)/2 and avoids leaking a
383  *   bit in the private exponent).
384  *
385  */
386 
387 #if !defined(MBEDTLS_DEPRECATED_REMOVED)
388 
389 /**
390  * \warning The origin of the primes in RFC 5114 is not documented and
391  *          their use therefore constitutes a security risk!
392  *
393  * \deprecated The hex-encoded primes from RFC 5114 are deprecated and are
394  *             likely to be removed in a future version of the library without
395  *             replacement.
396  */
397 
398 /**
399  * The hexadecimal presentation of the prime underlying the
400  * 2048-bit MODP Group with 224-bit Prime Order Subgroup, as defined
401  * in <em>RFC-5114: Additional Diffie-Hellman Groups for Use with
402  * IETF Standards</em>.
403  */
404 #define MBEDTLS_DHM_RFC5114_MODP_2048_P                         \
405     MBEDTLS_DEPRECATED_STRING_CONSTANT(                         \
406         "AD107E1E9123A9D0D660FAA79559C51FA20D64E5683B9FD1"      \
407         "B54B1597B61D0A75E6FA141DF95A56DBAF9A3C407BA1DF15"      \
408         "EB3D688A309C180E1DE6B85A1274A0A66D3F8152AD6AC212"      \
409         "9037C9EDEFDA4DF8D91E8FEF55B7394B7AD5B7D0B6C12207"      \
410         "C9F98D11ED34DBF6C6BA0B2C8BBC27BE6A00E0A0B9C49708"      \
411         "B3BF8A317091883681286130BC8985DB1602E714415D9330"      \
412         "278273C7DE31EFDC7310F7121FD5A07415987D9ADC0A486D"      \
413         "CDF93ACC44328387315D75E198C641A480CD86A1B9E587E8"      \
414         "BE60E69CC928B2B9C52172E413042E9B23F10B0E16E79763"      \
415         "C9B53DCF4BA80A29E3FB73C16B8E75B97EF363E2FFA31F71"      \
416         "CF9DE5384E71B81C0AC4DFFE0C10E64F")
417 
418 /**
419  * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
420  * Group with 224-bit Prime Order Subgroup, as defined in <em>RFC-5114:
421  * Additional Diffie-Hellman Groups for Use with IETF Standards</em>.
422  */
423 #define MBEDTLS_DHM_RFC5114_MODP_2048_G                         \
424     MBEDTLS_DEPRECATED_STRING_CONSTANT(                         \
425         "AC4032EF4F2D9AE39DF30B5C8FFDAC506CDEBE7B89998CAF"      \
426         "74866A08CFE4FFE3A6824A4E10B9A6F0DD921F01A70C4AFA"      \
427         "AB739D7700C29F52C57DB17C620A8652BE5E9001A8D66AD7"      \
428         "C17669101999024AF4D027275AC1348BB8A762D0521BC98A"      \
429         "E247150422EA1ED409939D54DA7460CDB5F6C6B250717CBE"      \
430         "F180EB34118E98D119529A45D6F834566E3025E316A330EF"      \
431         "BB77A86F0C1AB15B051AE3D428C8F8ACB70A8137150B8EEB"      \
432         "10E183EDD19963DDD9E263E4770589EF6AA21E7F5F2FF381"      \
433         "B539CCE3409D13CD566AFBB48D6C019181E1BCFE94B30269"      \
434         "EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179"      \
435         "81BC087F2A7065B384B890D3191F2BFA")
436 
437 /**
438  * The hexadecimal presentation of the prime underlying the 2048-bit MODP
439  * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
440  * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
441  *
442  * \deprecated The hex-encoded primes from RFC 3625 are deprecated and
443  *             superseded by the corresponding macros providing them as
444  *             binary constants. Their hex-encoded constants are likely
445  *             to be removed in a future version of the library.
446  *
447  */
448 #define MBEDTLS_DHM_RFC3526_MODP_2048_P                         \
449     MBEDTLS_DEPRECATED_STRING_CONSTANT(                         \
450         "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"      \
451         "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"      \
452         "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"      \
453         "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"      \
454         "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"      \
455         "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"      \
456         "83655D23DCA3AD961C62F356208552BB9ED529077096966D"      \
457         "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"      \
458         "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"      \
459         "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"      \
460         "15728E5A8AACAA68FFFFFFFFFFFFFFFF")
461 
462 /**
463  * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
464  * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
465  * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
466  */
467 #define MBEDTLS_DHM_RFC3526_MODP_2048_G                         \
468     MBEDTLS_DEPRECATED_STRING_CONSTANT("02")
469 
470 /**
471  * The hexadecimal presentation of the prime underlying the 3072-bit MODP
472  * Group, as defined in <em>RFC-3072: More Modular Exponential (MODP)
473  * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
474  */
475 #define MBEDTLS_DHM_RFC3526_MODP_3072_P                         \
476     MBEDTLS_DEPRECATED_STRING_CONSTANT(                         \
477         "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"      \
478         "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"      \
479         "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"      \
480         "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"      \
481         "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"      \
482         "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"      \
483         "83655D23DCA3AD961C62F356208552BB9ED529077096966D"      \
484         "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"      \
485         "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"      \
486         "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"      \
487         "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64"      \
488         "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7"      \
489         "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B"      \
490         "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C"      \
491         "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31"      \
492         "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF")
493 
494 /**
495  * The hexadecimal presentation of the chosen generator of the 3072-bit MODP
496  * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
497  * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
498  */
499 #define MBEDTLS_DHM_RFC3526_MODP_3072_G                      \
500     MBEDTLS_DEPRECATED_STRING_CONSTANT("02")
501 
502 /**
503  * The hexadecimal presentation of the prime underlying the 4096-bit MODP
504  * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
505  * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
506  */
507 #define MBEDTLS_DHM_RFC3526_MODP_4096_P                      \
508     MBEDTLS_DEPRECATED_STRING_CONSTANT(                      \
509         "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"   \
510         "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"   \
511         "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"   \
512         "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"   \
513         "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"   \
514         "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"   \
515         "83655D23DCA3AD961C62F356208552BB9ED529077096966D"   \
516         "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"   \
517         "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"   \
518         "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"   \
519         "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64"   \
520         "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7"   \
521         "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B"   \
522         "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C"   \
523         "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31"   \
524         "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7"   \
525         "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA"   \
526         "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6"   \
527         "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED"   \
528         "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9"   \
529         "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199"   \
530         "FFFFFFFFFFFFFFFF")
531 
532 /**
533  * The hexadecimal presentation of the chosen generator of the 4096-bit MODP
534  * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
535  * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
536  */
537 #define MBEDTLS_DHM_RFC3526_MODP_4096_G                      \
538     MBEDTLS_DEPRECATED_STRING_CONSTANT("02")
539 
540 #endif /* MBEDTLS_DEPRECATED_REMOVED */
541 
542 /*
543  * Trustworthy DHM parameters in binary form
544  */
545 
546 #define MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN {        \
547         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
548         0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
549         0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
550         0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
551         0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
552         0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
553         0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
554         0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
555         0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
556         0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
557         0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
558         0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
559         0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
560         0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
561         0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
562         0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
563         0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
564         0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
565         0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
566         0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
567         0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
568         0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
569         0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
570         0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
571         0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
572         0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
573         0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
574         0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
575         0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
576         0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
577         0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, \
578         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
579 
580 #define MBEDTLS_DHM_RFC3526_MODP_2048_G_BIN { 0x02 }
581 
582 #define MBEDTLS_DHM_RFC3526_MODP_3072_P_BIN {       \
583         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
584         0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
585         0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
586         0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
587         0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
588         0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
589         0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
590         0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
591         0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
592         0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
593         0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
594         0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
595         0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
596         0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
597         0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
598         0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
599         0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
600         0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
601         0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
602         0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
603         0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
604         0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
605         0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
606         0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
607         0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
608         0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
609         0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
610         0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
611         0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
612         0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
613         0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
614         0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
615         0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
616         0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
617         0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
618         0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
619         0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
620         0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
621         0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
622         0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
623         0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
624         0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
625         0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
626         0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
627         0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
628         0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
629         0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x3A, 0xD2, 0xCA, \
630         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
631 
632 #define MBEDTLS_DHM_RFC3526_MODP_3072_G_BIN { 0x02 }
633 
634 #define MBEDTLS_DHM_RFC3526_MODP_4096_P_BIN  {       \
635         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,  \
636         0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34,  \
637         0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1,  \
638         0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74,  \
639         0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22,  \
640         0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD,  \
641         0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B,  \
642         0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37,  \
643         0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45,  \
644         0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6,  \
645         0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B,  \
646         0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED,  \
647         0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5,  \
648         0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6,  \
649         0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D,  \
650         0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05,  \
651         0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A,  \
652         0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F,  \
653         0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96,  \
654         0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB,  \
655         0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D,  \
656         0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04,  \
657         0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C,  \
658         0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B,  \
659         0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03,  \
660         0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F,  \
661         0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9,  \
662         0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18,  \
663         0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5,  \
664         0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10,  \
665         0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D,  \
666         0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33,  \
667         0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64,  \
668         0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A,  \
669         0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D,  \
670         0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7,  \
671         0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7,  \
672         0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D,  \
673         0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B,  \
674         0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64,  \
675         0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64,  \
676         0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C,  \
677         0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C,  \
678         0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2,  \
679         0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31,  \
680         0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E,  \
681         0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x21, 0x08, 0x01,  \
682         0x1A, 0x72, 0x3C, 0x12, 0xA7, 0x87, 0xE6, 0xD7,  \
683         0x88, 0x71, 0x9A, 0x10, 0xBD, 0xBA, 0x5B, 0x26,  \
684         0x99, 0xC3, 0x27, 0x18, 0x6A, 0xF4, 0xE2, 0x3C,  \
685         0x1A, 0x94, 0x68, 0x34, 0xB6, 0x15, 0x0B, 0xDA,  \
686         0x25, 0x83, 0xE9, 0xCA, 0x2A, 0xD4, 0x4C, 0xE8,  \
687         0xDB, 0xBB, 0xC2, 0xDB, 0x04, 0xDE, 0x8E, 0xF9,  \
688         0x2E, 0x8E, 0xFC, 0x14, 0x1F, 0xBE, 0xCA, 0xA6,  \
689         0x28, 0x7C, 0x59, 0x47, 0x4E, 0x6B, 0xC0, 0x5D,  \
690         0x99, 0xB2, 0x96, 0x4F, 0xA0, 0x90, 0xC3, 0xA2,  \
691         0x23, 0x3B, 0xA1, 0x86, 0x51, 0x5B, 0xE7, 0xED,  \
692         0x1F, 0x61, 0x29, 0x70, 0xCE, 0xE2, 0xD7, 0xAF,  \
693         0xB8, 0x1B, 0xDD, 0x76, 0x21, 0x70, 0x48, 0x1C,  \
694         0xD0, 0x06, 0x91, 0x27, 0xD5, 0xB0, 0x5A, 0xA9,  \
695         0x93, 0xB4, 0xEA, 0x98, 0x8D, 0x8F, 0xDD, 0xC1,  \
696         0x86, 0xFF, 0xB7, 0xDC, 0x90, 0xA6, 0xC0, 0x8F,  \
697         0x4D, 0xF4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99,  \
698         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
699 
700 #define MBEDTLS_DHM_RFC3526_MODP_4096_G_BIN { 0x02 }
701 
702 #define MBEDTLS_DHM_RFC7919_FFDHE2048_P_BIN {        \
703         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
704         0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
705         0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
706         0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
707         0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
708         0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
709         0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
710         0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
711         0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
712         0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
713         0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
714         0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
715         0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
716         0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
717         0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
718         0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
719         0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
720         0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
721         0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
722         0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
723         0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
724         0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
725         0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
726         0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
727         0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
728         0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
729         0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
730         0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
731         0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
732         0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
733         0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, \
734         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }
735 
736 #define MBEDTLS_DHM_RFC7919_FFDHE2048_G_BIN { 0x02 }
737 
738 #define MBEDTLS_DHM_RFC7919_FFDHE3072_P_BIN { \
739         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
740         0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
741         0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
742         0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
743         0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
744         0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
745         0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
746         0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
747         0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
748         0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
749         0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
750         0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
751         0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
752         0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
753         0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
754         0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
755         0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
756         0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
757         0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
758         0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
759         0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
760         0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
761         0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
762         0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
763         0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
764         0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
765         0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
766         0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
767         0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
768         0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
769         0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
770         0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
771         0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
772         0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
773         0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
774         0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
775         0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
776         0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
777         0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
778         0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
779         0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
780         0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
781         0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
782         0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
783         0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
784         0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
785         0x25, 0xE4, 0x1D, 0x2B, 0x66, 0xC6, 0x2E, 0x37, \
786         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
787 
788 #define MBEDTLS_DHM_RFC7919_FFDHE3072_G_BIN { 0x02 }
789 
790 #define MBEDTLS_DHM_RFC7919_FFDHE4096_P_BIN {        \
791         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
792         0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
793         0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
794         0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
795         0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
796         0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
797         0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
798         0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
799         0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
800         0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
801         0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
802         0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
803         0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
804         0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
805         0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
806         0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
807         0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
808         0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
809         0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
810         0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
811         0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
812         0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
813         0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
814         0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
815         0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
816         0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
817         0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
818         0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
819         0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
820         0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
821         0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
822         0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
823         0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
824         0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
825         0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
826         0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
827         0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
828         0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
829         0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
830         0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
831         0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
832         0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
833         0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
834         0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
835         0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
836         0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
837         0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
838         0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
839         0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
840         0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
841         0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
842         0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
843         0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
844         0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
845         0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
846         0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
847         0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
848         0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
849         0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
850         0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
851         0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
852         0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
853         0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x65, 0x5F, 0x6A, \
854         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
855 
856 #define MBEDTLS_DHM_RFC7919_FFDHE4096_G_BIN { 0x02 }
857 
858 #define MBEDTLS_DHM_RFC7919_FFDHE6144_P_BIN {        \
859         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
860         0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
861         0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
862         0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
863         0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
864         0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
865         0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
866         0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
867         0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
868         0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
869         0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
870         0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
871         0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
872         0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
873         0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
874         0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
875         0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
876         0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
877         0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
878         0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
879         0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
880         0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
881         0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
882         0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
883         0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
884         0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
885         0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
886         0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
887         0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
888         0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
889         0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
890         0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
891         0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
892         0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
893         0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
894         0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
895         0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
896         0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
897         0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
898         0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
899         0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
900         0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
901         0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
902         0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
903         0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
904         0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
905         0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
906         0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
907         0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
908         0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
909         0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
910         0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
911         0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
912         0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
913         0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
914         0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
915         0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
916         0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
917         0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
918         0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
919         0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
920         0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
921         0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
922         0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
923         0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
924         0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
925         0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
926         0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
927         0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
928         0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
929         0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
930         0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
931         0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
932         0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
933         0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
934         0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
935         0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
936         0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
937         0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
938         0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
939         0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
940         0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
941         0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
942         0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
943         0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
944         0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
945         0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
946         0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
947         0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
948         0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
949         0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
950         0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
951         0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
952         0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
953         0xA4, 0x0E, 0x32, 0x9C, 0xD0, 0xE4, 0x0E, 0x65, \
954         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
955 
956 #define MBEDTLS_DHM_RFC7919_FFDHE6144_G_BIN { 0x02 }
957 
958 #define MBEDTLS_DHM_RFC7919_FFDHE8192_P_BIN {        \
959         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
960         0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
961         0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
962         0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
963         0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
964         0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
965         0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
966         0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
967         0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
968         0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
969         0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
970         0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
971         0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
972         0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
973         0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
974         0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
975         0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
976         0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
977         0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
978         0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
979         0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
980         0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
981         0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
982         0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
983         0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
984         0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
985         0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
986         0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
987         0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
988         0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
989         0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
990         0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
991         0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
992         0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
993         0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
994         0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
995         0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
996         0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
997         0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
998         0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
999         0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
1000         0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
1001         0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
1002         0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
1003         0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
1004         0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
1005         0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
1006         0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
1007         0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
1008         0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
1009         0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
1010         0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
1011         0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
1012         0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
1013         0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
1014         0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
1015         0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
1016         0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
1017         0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
1018         0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
1019         0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
1020         0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
1021         0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
1022         0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
1023         0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
1024         0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
1025         0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
1026         0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
1027         0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
1028         0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
1029         0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
1030         0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
1031         0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
1032         0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
1033         0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
1034         0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
1035         0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
1036         0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
1037         0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
1038         0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
1039         0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
1040         0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
1041         0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
1042         0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
1043         0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
1044         0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
1045         0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
1046         0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
1047         0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
1048         0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
1049         0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
1050         0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
1051         0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
1052         0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
1053         0xA4, 0x0E, 0x32, 0x9C, 0xCF, 0xF4, 0x6A, 0xAA, \
1054         0x36, 0xAD, 0x00, 0x4C, 0xF6, 0x00, 0xC8, 0x38, \
1055         0x1E, 0x42, 0x5A, 0x31, 0xD9, 0x51, 0xAE, 0x64, \
1056         0xFD, 0xB2, 0x3F, 0xCE, 0xC9, 0x50, 0x9D, 0x43, \
1057         0x68, 0x7F, 0xEB, 0x69, 0xED, 0xD1, 0xCC, 0x5E, \
1058         0x0B, 0x8C, 0xC3, 0xBD, 0xF6, 0x4B, 0x10, 0xEF, \
1059         0x86, 0xB6, 0x31, 0x42, 0xA3, 0xAB, 0x88, 0x29, \
1060         0x55, 0x5B, 0x2F, 0x74, 0x7C, 0x93, 0x26, 0x65, \
1061         0xCB, 0x2C, 0x0F, 0x1C, 0xC0, 0x1B, 0xD7, 0x02, \
1062         0x29, 0x38, 0x88, 0x39, 0xD2, 0xAF, 0x05, 0xE4, \
1063         0x54, 0x50, 0x4A, 0xC7, 0x8B, 0x75, 0x82, 0x82, \
1064         0x28, 0x46, 0xC0, 0xBA, 0x35, 0xC3, 0x5F, 0x5C, \
1065         0x59, 0x16, 0x0C, 0xC0, 0x46, 0xFD, 0x82, 0x51, \
1066         0x54, 0x1F, 0xC6, 0x8C, 0x9C, 0x86, 0xB0, 0x22, \
1067         0xBB, 0x70, 0x99, 0x87, 0x6A, 0x46, 0x0E, 0x74, \
1068         0x51, 0xA8, 0xA9, 0x31, 0x09, 0x70, 0x3F, 0xEE, \
1069         0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C, \
1070         0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, \
1071         0x99, 0xE9, 0xE3, 0x16, 0x50, 0xC1, 0x21, 0x7B, \
1072         0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9, \
1073         0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, \
1074         0xA1, 0xFE, 0x30, 0x75, 0xA5, 0x77, 0xE2, 0x31, \
1075         0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57, \
1076         0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, \
1077         0xB6, 0x85, 0x5D, 0xFE, 0x72, 0xB0, 0xA6, 0x6E, \
1078         0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30, \
1079         0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, \
1080         0x2F, 0x74, 0x1E, 0xF8, 0xC1, 0xFE, 0x86, 0xFE, \
1081         0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D, \
1082         0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, \
1083         0x08, 0x22, 0xE5, 0x06, 0xA9, 0xF4, 0x61, 0x4E, \
1084         0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C, \
1085         0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, \
1086         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
1087 
1088 #define MBEDTLS_DHM_RFC7919_FFDHE8192_G_BIN { 0x02 }
1089 
1090 #endif /* dhm.h */
1091