blob: 3ddbf3f735f1319fb5c86149413089a3e58cd986 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file dhm.h
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00003 *
Darryl Green11999bb2018-03-13 15:22:58 +00004 * \brief This file contains Diffie-Hellman-Merkle (DHM) key exchange
Rose Zadikee963592018-04-18 09:46:12 +01005 * definitions and functions.
Rose Zadikf763f2b2018-04-17 11:00:40 +01006 *
7 * Diffie-Hellman-Merkle (DHM) key exchange is defined in
Darryl Green11999bb2018-03-13 15:22:58 +00008 * <em>RFC-2631: Diffie-Hellman Key Agreement Method</em> and
9 * <em>Public-Key Cryptography Standards (PKCS) #3: Diffie
Rose Zadikf763f2b2018-04-17 11:00:40 +010010 * Hellman Key Agreement Standard</em>.
Rose Zadik41ad0822018-01-26 10:54:57 +000011 *
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.
Paul Bakker37ca75d2011-01-06 12:28:03 +000019 *
Jaeden Amero784de592018-01-26 17:52:01 +000020 * \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 *
Darryl Greena40a1012018-01-05 15:33:17 +000045 */
46/*
Bence Szépkútia2947ac2020-08-19 16:37:36 +020047 * Copyright The Mbed TLS Contributors
Bence Szépkútif744bd72020-06-05 13:02:18 +020048 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
49 *
50 * This file is provided under the Apache License 2.0, or the
51 * GNU General Public License v2.0 or later.
52 *
53 * **********
54 * Apache License 2.0:
Manuel Pégourié-Gonnard37ff1402015-09-04 14:21:07 +020055 *
56 * Licensed under the Apache License, Version 2.0 (the "License"); you may
57 * not use this file except in compliance with the License.
58 * You may obtain a copy of the License at
59 *
60 * http://www.apache.org/licenses/LICENSE-2.0
61 *
62 * Unless required by applicable law or agreed to in writing, software
63 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
64 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
65 * See the License for the specific language governing permissions and
66 * limitations under the License.
Paul Bakkerb96f1542010-07-18 20:36:00 +000067 *
Bence Szépkútif744bd72020-06-05 13:02:18 +020068 * **********
69 *
70 * **********
71 * GNU General Public License v2.0 or later:
72 *
73 * This program is free software; you can redistribute it and/or modify
74 * it under the terms of the GNU General Public License as published by
75 * the Free Software Foundation; either version 2 of the License, or
76 * (at your option) any later version.
77 *
78 * This program is distributed in the hope that it will be useful,
79 * but WITHOUT ANY WARRANTY; without even the implied warranty of
80 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81 * GNU General Public License for more details.
82 *
83 * You should have received a copy of the GNU General Public License along
84 * with this program; if not, write to the Free Software Foundation, Inc.,
85 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
86 *
87 * **********
Paul Bakker5121ce52009-01-03 21:22:43 +000088 */
Rose Zadik41ad0822018-01-26 10:54:57 +000089
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020090#ifndef MBEDTLS_DHM_H
91#define MBEDTLS_DHM_H
Paul Bakker5121ce52009-01-03 21:22:43 +000092
Reuven Levin1f35ca92017-12-07 10:09:32 +000093#if !defined(MBEDTLS_CONFIG_FILE)
94#include "config.h"
95#else
96#include MBEDTLS_CONFIG_FILE
97#endif
Paul Bakker314052f2011-08-15 09:07:52 +000098#include "bignum.h"
Reuven Levin1f35ca92017-12-07 10:09:32 +000099
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000100/*
101 * DHM Error codes
102 */
Gilles Peskine1990fab2021-07-26 18:48:10 +0200103/** Bad input parameters. */
104#define MBEDTLS_ERR_DHM_BAD_INPUT_DATA -0x3080
105/** Reading of the DHM parameters failed. */
106#define MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -0x3100
107/** Making of the DHM parameters failed. */
108#define MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -0x3180
109/** Reading of the public values failed. */
110#define MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -0x3200
111/** Making of the public value failed. */
112#define MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280
113/** Calculation of the DHM secret failed. */
114#define MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -0x3300
115/** The ASN.1 data is not formatted correctly. */
116#define MBEDTLS_ERR_DHM_INVALID_FORMAT -0x3380
117/** Allocation of memory failed. */
118#define MBEDTLS_ERR_DHM_ALLOC_FAILED -0x3400
119/** Read or write of file failed. */
120#define MBEDTLS_ERR_DHM_FILE_IO_ERROR -0x3480
Ron Eldor9924bdc2018-10-04 10:59:13 +0300121
122/* MBEDTLS_ERR_DHM_HW_ACCEL_FAILED is deprecated and should not be used. */
Gilles Peskine1990fab2021-07-26 18:48:10 +0200123/** DHM hardware accelerator failed. */
124#define MBEDTLS_ERR_DHM_HW_ACCEL_FAILED -0x3500
Ron Eldor9924bdc2018-10-04 10:59:13 +0300125
Gilles Peskine1990fab2021-07-26 18:48:10 +0200126/** Setting the modulus and generator failed. */
127#define MBEDTLS_ERR_DHM_SET_GROUP_FAILED -0x3580
Paul Bakker29b64762012-09-25 09:36:44 +0000128
Paul Bakker407a0da2013-06-27 14:29:21 +0200129#ifdef __cplusplus
130extern "C" {
131#endif
132
Ron Eldor4e6d55d2018-02-07 16:36:15 +0200133#if !defined(MBEDTLS_DHM_ALT)
134
Paul Bakker29b64762012-09-25 09:36:44 +0000135/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000136 * \brief The DHM context structure.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000137 */
Dawid Drozd428cc522018-07-24 10:02:47 +0200138typedef struct mbedtls_dhm_context
Paul Bakker5121ce52009-01-03 21:22:43 +0000139{
Rose Zadik41ad0822018-01-26 10:54:57 +0000140 size_t len; /*!< The size of \p P in Bytes. */
141 mbedtls_mpi P; /*!< The prime modulus. */
142 mbedtls_mpi G; /*!< The generator. */
143 mbedtls_mpi X; /*!< Our secret value. */
144 mbedtls_mpi GX; /*!< Our public key = \c G^X mod \c P. */
145 mbedtls_mpi GY; /*!< The public key of the peer = \c G^Y mod \c P. */
146 mbedtls_mpi K; /*!< The shared secret = \c G^(XY) mod \c P. */
147 mbedtls_mpi RP; /*!< The cached value = \c R^2 mod \c P. */
148 mbedtls_mpi Vi; /*!< The blinding value. */
149 mbedtls_mpi Vf; /*!< The unblinding value. */
150 mbedtls_mpi pX; /*!< The previous \c X. */
Paul Bakker5121ce52009-01-03 21:22:43 +0000151}
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200152mbedtls_dhm_context;
Paul Bakker5121ce52009-01-03 21:22:43 +0000153
Ron Eldor4e6d55d2018-02-07 16:36:15 +0200154#else /* MBEDTLS_DHM_ALT */
155#include "dhm_alt.h"
156#endif /* MBEDTLS_DHM_ALT */
157
Paul Bakker5121ce52009-01-03 21:22:43 +0000158/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000159 * \brief This function initializes the DHM context.
Paul Bakker8f870b02014-06-20 13:32:38 +0200160 *
Rose Zadik41ad0822018-01-26 10:54:57 +0000161 * \param ctx The DHM context to initialize.
Paul Bakker8f870b02014-06-20 13:32:38 +0200162 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200163void mbedtls_dhm_init( mbedtls_dhm_context *ctx );
Paul Bakker8f870b02014-06-20 13:32:38 +0200164
165/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000166 * \brief This function parses the DHM parameters in a
167 * TLS ServerKeyExchange handshake message
168 * (DHM modulus, generator, and public key).
Paul Bakker5121ce52009-01-03 21:22:43 +0000169 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000170 * \note In a TLS handshake, this is the how the client
171 * sets up its DHM context from the server's public
172 * DHM key material.
173 *
174 * \param ctx The DHM context to use. This must be initialized.
Hanno Beckerf240ea02017-10-02 15:09:14 +0100175 * \param p On input, *p must be the start of the input buffer.
176 * On output, *p is updated to point to the end of the data
177 * that has been read. On success, this is the first byte
178 * past the end of the ServerKeyExchange parameters.
179 * On error, this is the point at which an error has been
180 * detected, which is usually not useful except to debug
181 * failures.
Rose Zadik41ad0822018-01-26 10:54:57 +0000182 * \param end The end of the input buffer.
Paul Bakker5121ce52009-01-03 21:22:43 +0000183 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100184 * \return \c 0 on success.
185 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000186 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200187int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx,
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000188 unsigned char **p,
189 const unsigned char *end );
Paul Bakker5121ce52009-01-03 21:22:43 +0000190
191/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000192 * \brief This function generates a DHM key pair and exports its
193 * public part together with the DHM parameters in the format
194 * used in a TLS ServerKeyExchange handshake message.
Paul Bakker5121ce52009-01-03 21:22:43 +0000195 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000196 * \note This function assumes that the DHM parameters \c ctx->P
197 * and \c ctx->G have already been properly set. For that, use
Jaeden Amero9564e972018-01-30 16:56:13 +0000198 * mbedtls_dhm_set_group() below in conjunction with
199 * mbedtls_mpi_read_binary() and mbedtls_mpi_read_string().
Paul Bakker5121ce52009-01-03 21:22:43 +0000200 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000201 * \note In a TLS handshake, this is the how the server generates
202 * and exports its DHM key material.
203 *
204 * \param ctx The DHM context to use. This must be initialized
205 * and have the DHM parameters set. It may or may not
206 * already have imported the peer's public key.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100207 * \param x_size The private key size in Bytes.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000208 * \param olen The address at which to store the number of Bytes
209 * written on success. This must not be \c NULL.
210 * \param output The destination buffer. This must be a writable buffer of
211 * sufficient size to hold the reduced binary presentation of
212 * the modulus, the generator and the public key, each wrapped
213 * with a 2-byte length field. It is the responsibility of the
214 * caller to ensure that enough space is available. Refer to
215 * mbedtls_mpi_size() to computing the byte-size of an MPI.
216 * \param f_rng The RNG function. Must not be \c NULL.
217 * \param p_rng The RNG context to be passed to \p f_rng. This may be
218 * \c NULL if \p f_rng doesn't need a context parameter.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100219 *
220 * \return \c 0 on success.
221 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000222 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200223int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size,
Paul Bakker23986e52011-04-24 08:57:21 +0000224 unsigned char *output, size_t *olen,
Paul Bakkera3d195c2011-11-27 21:07:34 +0000225 int (*f_rng)(void *, unsigned char *, size_t),
226 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000227
228/**
Rose Zadikf763f2b2018-04-17 11:00:40 +0100229 * \brief This function sets the prime modulus and generator.
230 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000231 * \note This function can be used to set \c ctx->P, \c ctx->G
Rose Zadikf763f2b2018-04-17 11:00:40 +0100232 * in preparation for mbedtls_dhm_make_params().
Hanno Becker8880e752017-10-04 13:15:08 +0100233 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000234 * \param ctx The DHM context to configure. This must be initialized.
235 * \param P The MPI holding the DHM prime modulus. This must be
236 * an initialized MPI.
237 * \param G The MPI holding the DHM generator. This must be an
238 * initialized MPI.
Hanno Becker8880e752017-10-04 13:15:08 +0100239 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100240 * \return \c 0 if successful.
241 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Hanno Becker8880e752017-10-04 13:15:08 +0100242 */
243int mbedtls_dhm_set_group( mbedtls_dhm_context *ctx,
244 const mbedtls_mpi *P,
245 const mbedtls_mpi *G );
246
247/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000248 * \brief This function imports the raw public value of the peer.
Paul Bakker5121ce52009-01-03 21:22:43 +0000249 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000250 * \note In a TLS handshake, this is the how the server imports
251 * the Client's public DHM key.
252 *
253 * \param ctx The DHM context to use. This must be initialized and have
254 * its DHM parameters set, e.g. via mbedtls_dhm_set_group().
255 * It may or may not already have generated its own private key.
256 * \param input The input buffer containing the \c G^Y value of the peer.
257 * This must be a readable buffer of size \p ilen Bytes.
258 * \param ilen The size of the input buffer \p input in Bytes.
Paul Bakker5121ce52009-01-03 21:22:43 +0000259 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100260 * \return \c 0 on success.
261 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000262 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200263int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx,
Paul Bakker23986e52011-04-24 08:57:21 +0000264 const unsigned char *input, size_t ilen );
Paul Bakker5121ce52009-01-03 21:22:43 +0000265
266/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000267 * \brief This function creates a DHM key pair and exports
268 * the raw public key in big-endian format.
Paul Bakker5121ce52009-01-03 21:22:43 +0000269 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100270 * \note The destination buffer is always fully written
271 * so as to contain a big-endian representation of G^X mod P.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000272 * If it is larger than \c ctx->len, it is padded accordingly
Rose Zadikf763f2b2018-04-17 11:00:40 +0100273 * with zero-bytes at the beginning.
274 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000275 * \param ctx The DHM context to use. This must be initialized and
276 * have the DHM parameters set. It may or may not already
277 * have imported the peer's public key.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100278 * \param x_size The private key size in Bytes.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000279 * \param output The destination buffer. This must be a writable buffer of
280 * size \p olen Bytes.
281 * \param olen The length of the destination buffer. This must be at least
282 * equal to `ctx->len` (the size of \c P).
283 * \param f_rng The RNG function. This must not be \c NULL.
284 * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
285 * if \p f_rng doesn't need a context argument.
Paul Bakker5121ce52009-01-03 21:22:43 +0000286 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100287 * \return \c 0 on success.
288 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000289 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200290int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size,
Paul Bakker23986e52011-04-24 08:57:21 +0000291 unsigned char *output, size_t olen,
Paul Bakkera3d195c2011-11-27 21:07:34 +0000292 int (*f_rng)(void *, unsigned char *, size_t),
293 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000294
295/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000296 * \brief This function derives and exports the shared secret
297 * \c (G^Y)^X mod \c P.
Paul Bakker5121ce52009-01-03 21:22:43 +0000298 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000299 * \note If \p f_rng is not \c NULL, it is used to blind the input as
300 * a countermeasure against timing attacks. Blinding is used
301 * only if our private key \c X is re-used, and not used
302 * otherwise. We recommend always passing a non-NULL
303 * \p f_rng argument.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100304 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000305 * \param ctx The DHM context to use. This must be initialized
306 * and have its own private key generated and the peer's
307 * public key imported.
308 * \param output The buffer to write the generated shared key to. This
309 * must be a writable buffer of size \p output_size Bytes.
310 * \param output_size The size of the destination buffer. This must be at
311 * least the size of \c ctx->len (the size of \c P).
Rose Zadik41ad0822018-01-26 10:54:57 +0000312 * \param olen On exit, holds the actual number of Bytes written.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000313 * \param f_rng The RNG function, for blinding purposes. This may
314 * b \c NULL if blinding isn't needed.
315 * \param p_rng The RNG context. This may be \c NULL if \p f_rng
316 * doesn't need a context argument.
Paul Bakker5121ce52009-01-03 21:22:43 +0000317 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100318 * \return \c 0 on success.
319 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000320 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200321int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx,
Manuel Pégourié-Gonnard33352052015-06-02 16:17:08 +0100322 unsigned char *output, size_t output_size, size_t *olen,
Manuel Pégourié-Gonnard2d627642013-09-04 14:22:07 +0200323 int (*f_rng)(void *, unsigned char *, size_t),
324 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000325
Paul Bakker9a736322012-11-14 12:39:52 +0000326/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000327 * \brief This function frees and clears the components
328 * of a DHM context.
Paul Bakker8f870b02014-06-20 13:32:38 +0200329 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000330 * \param ctx The DHM context to free and clear. This may be \c NULL,
331 * in which case this function is a no-op. If it is not \c NULL,
332 * it must point to an initialized DHM context.
Paul Bakker5121ce52009-01-03 21:22:43 +0000333 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200334void mbedtls_dhm_free( mbedtls_dhm_context *ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000335
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200336#if defined(MBEDTLS_ASN1_PARSE_C)
Paul Bakker40ce79f2013-09-15 17:43:54 +0200337/** \ingroup x509_module */
338/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000339 * \brief This function parses DHM parameters in PEM or DER format.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200340 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000341 * \param dhm The DHM context to import the DHM parameters into.
342 * This must be initialized.
343 * \param dhmin The input buffer. This must be a readable buffer of
344 * length \p dhminlen Bytes.
345 * \param dhminlen The size of the input buffer \p dhmin, including the
346 * terminating \c NULL Byte for PEM data.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200347 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100348 * \return \c 0 on success.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000349 * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error
350 * code on failure.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200351 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200352int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin,
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000353 size_t dhminlen );
Paul Bakker40ce79f2013-09-15 17:43:54 +0200354
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200355#if defined(MBEDTLS_FS_IO)
Paul Bakker40ce79f2013-09-15 17:43:54 +0200356/** \ingroup x509_module */
357/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000358 * \brief This function loads and parses DHM parameters from a file.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200359 *
Rose Zadik41ad0822018-01-26 10:54:57 +0000360 * \param dhm The DHM context to load the parameters to.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000361 * This must be initialized.
Rose Zadik41ad0822018-01-26 10:54:57 +0000362 * \param path The filename to read the DHM parameters from.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000363 * This must not be \c NULL.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200364 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100365 * \return \c 0 on success.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000366 * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX
367 * error code on failure.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200368 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200369int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path );
370#endif /* MBEDTLS_FS_IO */
371#endif /* MBEDTLS_ASN1_PARSE_C */
nirekh01d569ecf2018-01-09 16:43:21 +0000372
Ron Eldorfa8f6352017-06-20 15:48:46 +0300373#if defined(MBEDTLS_SELF_TEST)
374
Paul Bakker5121ce52009-01-03 21:22:43 +0000375/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000376 * \brief The DMH checkup routine.
Paul Bakker5121ce52009-01-03 21:22:43 +0000377 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100378 * \return \c 0 on success.
379 * \return \c 1 on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000380 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200381int mbedtls_dhm_self_test( int verbose );
Paul Bakker5121ce52009-01-03 21:22:43 +0000382
Ron Eldorfa8f6352017-06-20 15:48:46 +0300383#endif /* MBEDTLS_SELF_TEST */
Paul Bakker5121ce52009-01-03 21:22:43 +0000384#ifdef __cplusplus
385}
386#endif
387
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100388/**
389 * RFC 3526, RFC 5114 and RFC 7919 standardize a number of
390 * Diffie-Hellman groups, some of which are included here
391 * for use within the SSL/TLS module and the user's convenience
392 * when configuring the Diffie-Hellman parameters by hand
393 * through \c mbedtls_ssl_conf_dh_param.
394 *
Jaeden Amero9564e972018-01-30 16:56:13 +0000395 * The following lists the source of the above groups in the standards:
396 * - RFC 5114 section 2.2: 2048-bit MODP Group with 224-bit Prime Order Subgroup
397 * - RFC 3526 section 3: 2048-bit MODP Group
398 * - RFC 3526 section 4: 3072-bit MODP Group
399 * - RFC 3526 section 5: 4096-bit MODP Group
400 * - RFC 7919 section A.1: ffdhe2048
401 * - RFC 7919 section A.2: ffdhe3072
402 * - RFC 7919 section A.3: ffdhe4096
403 * - RFC 7919 section A.4: ffdhe6144
404 * - RFC 7919 section A.5: ffdhe8192
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100405 *
406 * The constants with suffix "_p" denote the chosen prime moduli, while
407 * the constants with suffix "_g" denote the chosen generator
408 * of the associated prime field.
409 *
410 * The constants further suffixed with "_bin" are provided in binary format,
411 * while all other constants represent null-terminated strings holding the
412 * hexadecimal presentation of the respective numbers.
413 *
414 * The primes from RFC 3526 and RFC 7919 have been generating by the following
415 * trust-worthy procedure:
416 * - Fix N in { 2048, 3072, 4096, 6144, 8192 } and consider the N-bit number
417 * the first and last 64 bits are all 1, and the remaining N - 128 bits of
418 * which are 0x7ff...ff.
419 * - Add the smallest multiple of the first N - 129 bits of the binary expansion
420 * of pi (for RFC 5236) or e (for RFC 7919) to this intermediate bit-string
421 * such that the resulting integer is a safe-prime.
422 * - The result is the respective RFC 3526 / 7919 prime, and the corresponding
423 * generator is always chosen to be 2 (which is a square for these prime,
424 * hence the corresponding subgroup has order (p-1)/2 and avoids leaking a
425 * bit in the private exponent).
426 *
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100427 */
428
429#if !defined(MBEDTLS_DEPRECATED_REMOVED)
430
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100431/**
432 * \warning The origin of the primes in RFC 5114 is not documented and
433 * their use therefore constitutes a security risk!
434 *
435 * \deprecated The hex-encoded primes from RFC 5114 are deprecated and are
436 * likely to be removed in a future version of the library without
437 * replacement.
438 */
439
Jaeden Amero9564e972018-01-30 16:56:13 +0000440/**
441 * The hexadecimal presentation of the prime underlying the
442 * 2048-bit MODP Group with 224-bit Prime Order Subgroup, as defined
443 * in <em>RFC-5114: Additional Diffie-Hellman Groups for Use with
444 * IETF Standards</em>.
445 */
Jaeden Amero129f5082018-02-08 14:25:36 +0000446#define MBEDTLS_DHM_RFC5114_MODP_2048_P \
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100447 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
448 "AD107E1E9123A9D0D660FAA79559C51FA20D64E5683B9FD1" \
449 "B54B1597B61D0A75E6FA141DF95A56DBAF9A3C407BA1DF15" \
450 "EB3D688A309C180E1DE6B85A1274A0A66D3F8152AD6AC212" \
451 "9037C9EDEFDA4DF8D91E8FEF55B7394B7AD5B7D0B6C12207" \
452 "C9F98D11ED34DBF6C6BA0B2C8BBC27BE6A00E0A0B9C49708" \
453 "B3BF8A317091883681286130BC8985DB1602E714415D9330" \
454 "278273C7DE31EFDC7310F7121FD5A07415987D9ADC0A486D" \
455 "CDF93ACC44328387315D75E198C641A480CD86A1B9E587E8" \
456 "BE60E69CC928B2B9C52172E413042E9B23F10B0E16E79763" \
457 "C9B53DCF4BA80A29E3FB73C16B8E75B97EF363E2FFA31F71" \
458 "CF9DE5384E71B81C0AC4DFFE0C10E64F" )
459
Jaeden Amero9564e972018-01-30 16:56:13 +0000460/**
461 * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
462 * Group with 224-bit Prime Order Subgroup, as defined in <em>RFC-5114:
463 * Additional Diffie-Hellman Groups for Use with IETF Standards</em>.
464 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100465#define MBEDTLS_DHM_RFC5114_MODP_2048_G \
466 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
467 "AC4032EF4F2D9AE39DF30B5C8FFDAC506CDEBE7B89998CAF" \
468 "74866A08CFE4FFE3A6824A4E10B9A6F0DD921F01A70C4AFA" \
469 "AB739D7700C29F52C57DB17C620A8652BE5E9001A8D66AD7" \
470 "C17669101999024AF4D027275AC1348BB8A762D0521BC98A" \
471 "E247150422EA1ED409939D54DA7460CDB5F6C6B250717CBE" \
472 "F180EB34118E98D119529A45D6F834566E3025E316A330EF" \
473 "BB77A86F0C1AB15B051AE3D428C8F8ACB70A8137150B8EEB" \
474 "10E183EDD19963DDD9E263E4770589EF6AA21E7F5F2FF381" \
475 "B539CCE3409D13CD566AFBB48D6C019181E1BCFE94B30269" \
476 "EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179" \
477 "81BC087F2A7065B384B890D3191F2BFA" )
478
479/**
Jaeden Amero9564e972018-01-30 16:56:13 +0000480 * The hexadecimal presentation of the prime underlying the 2048-bit MODP
481 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
482 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
483 *
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100484 * \deprecated The hex-encoded primes from RFC 3625 are deprecated and
485 * superseded by the corresponding macros providing them as
486 * binary constants. Their hex-encoded constants are likely
487 * to be removed in a future version of the library.
488 *
489 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100490#define MBEDTLS_DHM_RFC3526_MODP_2048_P \
491 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
492 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
493 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
494 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
495 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
496 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
497 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
498 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
499 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
500 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
501 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
502 "15728E5A8AACAA68FFFFFFFFFFFFFFFF" )
503
Jaeden Amero9564e972018-01-30 16:56:13 +0000504/**
505 * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
506 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
507 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
508 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100509#define MBEDTLS_DHM_RFC3526_MODP_2048_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100510 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100511
Jaeden Amero9564e972018-01-30 16:56:13 +0000512/**
513 * The hexadecimal presentation of the prime underlying the 3072-bit MODP
514 * Group, as defined in <em>RFC-3072: More Modular Exponential (MODP)
515 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
516 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100517#define MBEDTLS_DHM_RFC3526_MODP_3072_P \
518 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
519 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
520 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
521 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
522 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
523 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
524 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
525 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
526 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
527 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
528 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
529 "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \
530 "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \
531 "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \
532 "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \
533 "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \
534 "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF" )
535
Jaeden Amero9564e972018-01-30 16:56:13 +0000536/**
537 * The hexadecimal presentation of the chosen generator of the 3072-bit MODP
538 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
539 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
540 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100541#define MBEDTLS_DHM_RFC3526_MODP_3072_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100542 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100543
Jaeden Amero9564e972018-01-30 16:56:13 +0000544/**
545 * The hexadecimal presentation of the prime underlying the 4096-bit MODP
546 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
547 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
548 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100549#define MBEDTLS_DHM_RFC3526_MODP_4096_P \
550 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
551 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
552 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
553 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
554 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
555 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
556 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
557 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
558 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
559 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
560 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
561 "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \
562 "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \
563 "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \
564 "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \
565 "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \
566 "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \
567 "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \
568 "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \
569 "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \
570 "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \
571 "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199" \
572 "FFFFFFFFFFFFFFFF" )
573
Jaeden Amero9564e972018-01-30 16:56:13 +0000574/**
575 * The hexadecimal presentation of the chosen generator of the 4096-bit MODP
576 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
577 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
578 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100579#define MBEDTLS_DHM_RFC3526_MODP_4096_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100580 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100581
582#endif /* MBEDTLS_DEPRECATED_REMOVED */
583
584/*
585 * Trustworthy DHM parameters in binary form
586 */
587
588#define MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN { \
589 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
590 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
591 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
592 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
593 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
594 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
595 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
596 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
597 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
598 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
599 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
600 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
601 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
602 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
603 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
604 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
605 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
606 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
607 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
608 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
609 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
610 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
611 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
612 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
613 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
614 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
615 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
616 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
617 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
618 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
619 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, \
620 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
621
622#define MBEDTLS_DHM_RFC3526_MODP_2048_G_BIN { 0x02 }
623
624#define MBEDTLS_DHM_RFC3526_MODP_3072_P_BIN { \
625 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
626 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
627 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
628 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
629 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
630 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
631 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
632 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
633 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
634 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
635 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
636 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
637 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
638 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
639 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
640 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
641 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
642 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
643 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
644 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
645 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
646 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
647 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
648 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
649 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
650 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
651 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
652 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
653 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
654 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
655 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
656 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
657 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
658 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
659 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
660 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
661 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
662 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
663 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
664 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
665 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
666 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
667 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
668 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
669 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
670 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
671 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x3A, 0xD2, 0xCA, \
672 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
673
674#define MBEDTLS_DHM_RFC3526_MODP_3072_G_BIN { 0x02 }
675
676#define MBEDTLS_DHM_RFC3526_MODP_4096_P_BIN { \
677 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
678 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
679 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
680 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
681 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
682 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
683 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
684 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
685 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
686 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
687 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
688 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
689 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
690 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
691 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
692 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
693 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
694 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
695 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
696 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
697 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
698 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
699 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
700 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
701 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
702 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
703 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
704 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
705 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
706 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
707 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
708 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
709 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
710 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
711 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
712 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
713 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
714 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
715 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
716 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
717 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
718 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
719 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
720 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
721 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
722 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
723 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x21, 0x08, 0x01, \
724 0x1A, 0x72, 0x3C, 0x12, 0xA7, 0x87, 0xE6, 0xD7, \
725 0x88, 0x71, 0x9A, 0x10, 0xBD, 0xBA, 0x5B, 0x26, \
726 0x99, 0xC3, 0x27, 0x18, 0x6A, 0xF4, 0xE2, 0x3C, \
727 0x1A, 0x94, 0x68, 0x34, 0xB6, 0x15, 0x0B, 0xDA, \
728 0x25, 0x83, 0xE9, 0xCA, 0x2A, 0xD4, 0x4C, 0xE8, \
729 0xDB, 0xBB, 0xC2, 0xDB, 0x04, 0xDE, 0x8E, 0xF9, \
730 0x2E, 0x8E, 0xFC, 0x14, 0x1F, 0xBE, 0xCA, 0xA6, \
731 0x28, 0x7C, 0x59, 0x47, 0x4E, 0x6B, 0xC0, 0x5D, \
732 0x99, 0xB2, 0x96, 0x4F, 0xA0, 0x90, 0xC3, 0xA2, \
733 0x23, 0x3B, 0xA1, 0x86, 0x51, 0x5B, 0xE7, 0xED, \
734 0x1F, 0x61, 0x29, 0x70, 0xCE, 0xE2, 0xD7, 0xAF, \
735 0xB8, 0x1B, 0xDD, 0x76, 0x21, 0x70, 0x48, 0x1C, \
736 0xD0, 0x06, 0x91, 0x27, 0xD5, 0xB0, 0x5A, 0xA9, \
737 0x93, 0xB4, 0xEA, 0x98, 0x8D, 0x8F, 0xDD, 0xC1, \
738 0x86, 0xFF, 0xB7, 0xDC, 0x90, 0xA6, 0xC0, 0x8F, \
739 0x4D, 0xF4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99, \
740 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
741
742#define MBEDTLS_DHM_RFC3526_MODP_4096_G_BIN { 0x02 }
743
744#define MBEDTLS_DHM_RFC7919_FFDHE2048_P_BIN { \
745 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
746 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
747 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
748 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
749 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
750 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
751 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
752 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
753 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
754 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
755 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
756 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
757 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
758 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
759 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
760 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
761 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
762 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
763 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
764 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
765 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
766 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
767 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
768 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
769 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
770 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
771 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
772 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
773 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
774 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
775 0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, \
776 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }
777
778#define MBEDTLS_DHM_RFC7919_FFDHE2048_G_BIN { 0x02 }
779
780#define MBEDTLS_DHM_RFC7919_FFDHE3072_P_BIN { \
781 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
782 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
783 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
784 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
785 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
786 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
787 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
788 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
789 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
790 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
791 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
792 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
793 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
794 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
795 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
796 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
797 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
798 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
799 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
800 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
801 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
802 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
803 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
804 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
805 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
806 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
807 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
808 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
809 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
810 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
811 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
812 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
813 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
814 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
815 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
816 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
817 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
818 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
819 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
820 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
821 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
822 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
823 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
824 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
825 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
826 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
827 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0xC6, 0x2E, 0x37, \
828 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
829
830#define MBEDTLS_DHM_RFC7919_FFDHE3072_G_BIN { 0x02 }
831
832#define MBEDTLS_DHM_RFC7919_FFDHE4096_P_BIN { \
833 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
834 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
835 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
836 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
837 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
838 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
839 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
840 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
841 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
842 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
843 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
844 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
845 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
846 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
847 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
848 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
849 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
850 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
851 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
852 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
853 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
854 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
855 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
856 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
857 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
858 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
859 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
860 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
861 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
862 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
863 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
864 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
865 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
866 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
867 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
868 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
869 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
870 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
871 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
872 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
873 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
874 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
875 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
876 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
877 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
878 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
879 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
880 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
881 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
882 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
883 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
884 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
885 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
886 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
887 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
888 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
889 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
890 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
891 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
892 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
893 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
894 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
895 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x65, 0x5F, 0x6A, \
896 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
897
898#define MBEDTLS_DHM_RFC7919_FFDHE4096_G_BIN { 0x02 }
899
900#define MBEDTLS_DHM_RFC7919_FFDHE6144_P_BIN { \
901 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
902 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
903 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
904 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
905 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
906 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
907 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
908 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
909 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
910 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
911 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
912 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
913 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
914 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
915 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
916 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
917 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
918 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
919 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
920 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
921 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
922 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
923 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
924 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
925 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
926 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
927 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
928 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
929 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
930 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
931 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
932 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
933 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
934 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
935 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
936 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
937 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
938 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
939 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
940 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
941 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
942 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
943 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
944 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
945 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
946 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
947 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
948 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
949 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
950 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
951 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
952 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
953 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
954 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
955 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
956 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
957 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
958 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
959 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
960 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
961 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
962 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
963 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
964 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
965 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
966 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
967 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
968 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
969 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
970 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
971 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
972 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
973 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
974 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
975 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
976 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
977 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
978 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
979 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
980 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
981 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
982 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
983 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
984 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
985 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
986 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
987 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
988 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
989 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
990 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
991 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
992 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
993 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
994 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
995 0xA4, 0x0E, 0x32, 0x9C, 0xD0, 0xE4, 0x0E, 0x65, \
996 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
997
998#define MBEDTLS_DHM_RFC7919_FFDHE6144_G_BIN { 0x02 }
999
1000#define MBEDTLS_DHM_RFC7919_FFDHE8192_P_BIN { \
1001 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
1002 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
1003 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
1004 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
1005 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
1006 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
1007 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
1008 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
1009 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
1010 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
1011 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
1012 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
1013 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
1014 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
1015 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
1016 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
1017 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
1018 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
1019 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
1020 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
1021 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
1022 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
1023 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
1024 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
1025 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
1026 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
1027 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
1028 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
1029 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
1030 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
1031 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
1032 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
1033 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
1034 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
1035 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
1036 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
1037 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
1038 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
1039 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
1040 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
1041 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
1042 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
1043 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
1044 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
1045 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
1046 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
1047 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
1048 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
1049 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
1050 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
1051 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
1052 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
1053 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
1054 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
1055 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
1056 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
1057 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
1058 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
1059 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
1060 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
1061 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
1062 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
1063 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
1064 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
1065 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
1066 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
1067 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
1068 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
1069 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
1070 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
1071 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
1072 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
1073 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
1074 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
1075 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
1076 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
1077 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
1078 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
1079 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
1080 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
1081 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
1082 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
1083 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
1084 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
1085 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
1086 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
1087 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
1088 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
1089 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
1090 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
1091 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
1092 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
1093 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
1094 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
1095 0xA4, 0x0E, 0x32, 0x9C, 0xCF, 0xF4, 0x6A, 0xAA, \
1096 0x36, 0xAD, 0x00, 0x4C, 0xF6, 0x00, 0xC8, 0x38, \
1097 0x1E, 0x42, 0x5A, 0x31, 0xD9, 0x51, 0xAE, 0x64, \
1098 0xFD, 0xB2, 0x3F, 0xCE, 0xC9, 0x50, 0x9D, 0x43, \
1099 0x68, 0x7F, 0xEB, 0x69, 0xED, 0xD1, 0xCC, 0x5E, \
1100 0x0B, 0x8C, 0xC3, 0xBD, 0xF6, 0x4B, 0x10, 0xEF, \
1101 0x86, 0xB6, 0x31, 0x42, 0xA3, 0xAB, 0x88, 0x29, \
1102 0x55, 0x5B, 0x2F, 0x74, 0x7C, 0x93, 0x26, 0x65, \
1103 0xCB, 0x2C, 0x0F, 0x1C, 0xC0, 0x1B, 0xD7, 0x02, \
1104 0x29, 0x38, 0x88, 0x39, 0xD2, 0xAF, 0x05, 0xE4, \
1105 0x54, 0x50, 0x4A, 0xC7, 0x8B, 0x75, 0x82, 0x82, \
1106 0x28, 0x46, 0xC0, 0xBA, 0x35, 0xC3, 0x5F, 0x5C, \
1107 0x59, 0x16, 0x0C, 0xC0, 0x46, 0xFD, 0x82, 0x51, \
1108 0x54, 0x1F, 0xC6, 0x8C, 0x9C, 0x86, 0xB0, 0x22, \
1109 0xBB, 0x70, 0x99, 0x87, 0x6A, 0x46, 0x0E, 0x74, \
1110 0x51, 0xA8, 0xA9, 0x31, 0x09, 0x70, 0x3F, 0xEE, \
1111 0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C, \
1112 0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, \
1113 0x99, 0xE9, 0xE3, 0x16, 0x50, 0xC1, 0x21, 0x7B, \
1114 0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9, \
1115 0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, \
1116 0xA1, 0xFE, 0x30, 0x75, 0xA5, 0x77, 0xE2, 0x31, \
1117 0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57, \
1118 0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, \
1119 0xB6, 0x85, 0x5D, 0xFE, 0x72, 0xB0, 0xA6, 0x6E, \
1120 0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30, \
1121 0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, \
1122 0x2F, 0x74, 0x1E, 0xF8, 0xC1, 0xFE, 0x86, 0xFE, \
1123 0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D, \
1124 0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, \
1125 0x08, 0x22, 0xE5, 0x06, 0xA9, 0xF4, 0x61, 0x4E, \
1126 0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C, \
1127 0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, \
1128 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
1129
1130#define MBEDTLS_DHM_RFC7919_FFDHE8192_G_BIN { 0x02 }
1131
Paul Bakker9af723c2014-05-01 13:03:14 +02001132#endif /* dhm.h */