blob: 5c04ed19fb47041de0b40458930b88b94450d3f2 [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/*
Rose Zadik41ad0822018-01-26 10:54:57 +000047 * Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
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 * **********
88 *
Rose Zadik41ad0822018-01-26 10:54:57 +000089 * This file is part of Mbed TLS (https://tls.mbed.org)
Paul Bakker5121ce52009-01-03 21:22:43 +000090 */
Rose Zadik41ad0822018-01-26 10:54:57 +000091
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020092#ifndef MBEDTLS_DHM_H
93#define MBEDTLS_DHM_H
Paul Bakker5121ce52009-01-03 21:22:43 +000094
Reuven Levin1f35ca92017-12-07 10:09:32 +000095#if !defined(MBEDTLS_CONFIG_FILE)
96#include "config.h"
97#else
98#include MBEDTLS_CONFIG_FILE
99#endif
Paul Bakker314052f2011-08-15 09:07:52 +0000100#include "bignum.h"
Reuven Levin1f35ca92017-12-07 10:09:32 +0000101
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000102/*
103 * DHM Error codes
104 */
Rose Zadik41ad0822018-01-26 10:54:57 +0000105#define MBEDTLS_ERR_DHM_BAD_INPUT_DATA -0x3080 /**< Bad input parameters. */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200106#define MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -0x3100 /**< Reading of the DHM parameters failed. */
107#define MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -0x3180 /**< Making of the DHM parameters failed. */
108#define MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -0x3200 /**< Reading of the public values failed. */
109#define MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Making of the public value failed. */
110#define MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -0x3300 /**< Calculation of the DHM secret failed. */
111#define MBEDTLS_ERR_DHM_INVALID_FORMAT -0x3380 /**< The ASN.1 data is not formatted correctly. */
Manuel Pégourié-Gonnard6a8ca332015-05-28 09:33:39 +0200112#define MBEDTLS_ERR_DHM_ALLOC_FAILED -0x3400 /**< Allocation of memory failed. */
Rose Zadik41ad0822018-01-26 10:54:57 +0000113#define MBEDTLS_ERR_DHM_FILE_IO_ERROR -0x3480 /**< Read or write of file failed. */
Ron Eldor9924bdc2018-10-04 10:59:13 +0300114
115/* MBEDTLS_ERR_DHM_HW_ACCEL_FAILED is deprecated and should not be used. */
Gilles Peskine7ecab3d2018-01-26 17:56:38 +0100116#define MBEDTLS_ERR_DHM_HW_ACCEL_FAILED -0x3500 /**< DHM hardware accelerator failed. */
Ron Eldor9924bdc2018-10-04 10:59:13 +0300117
Jaeden Amero2acbf172018-01-26 20:57:38 +0000118#define MBEDTLS_ERR_DHM_SET_GROUP_FAILED -0x3580 /**< Setting the modulus and generator failed. */
Paul Bakker29b64762012-09-25 09:36:44 +0000119
Paul Bakker407a0da2013-06-27 14:29:21 +0200120#ifdef __cplusplus
121extern "C" {
122#endif
123
Ron Eldor4e6d55d2018-02-07 16:36:15 +0200124#if !defined(MBEDTLS_DHM_ALT)
125
Paul Bakker29b64762012-09-25 09:36:44 +0000126/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000127 * \brief The DHM context structure.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000128 */
Dawid Drozd428cc522018-07-24 10:02:47 +0200129typedef struct mbedtls_dhm_context
Paul Bakker5121ce52009-01-03 21:22:43 +0000130{
Rose Zadik41ad0822018-01-26 10:54:57 +0000131 size_t len; /*!< The size of \p P in Bytes. */
132 mbedtls_mpi P; /*!< The prime modulus. */
133 mbedtls_mpi G; /*!< The generator. */
134 mbedtls_mpi X; /*!< Our secret value. */
135 mbedtls_mpi GX; /*!< Our public key = \c G^X mod \c P. */
136 mbedtls_mpi GY; /*!< The public key of the peer = \c G^Y mod \c P. */
137 mbedtls_mpi K; /*!< The shared secret = \c G^(XY) mod \c P. */
138 mbedtls_mpi RP; /*!< The cached value = \c R^2 mod \c P. */
139 mbedtls_mpi Vi; /*!< The blinding value. */
140 mbedtls_mpi Vf; /*!< The unblinding value. */
141 mbedtls_mpi pX; /*!< The previous \c X. */
Paul Bakker5121ce52009-01-03 21:22:43 +0000142}
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200143mbedtls_dhm_context;
Paul Bakker5121ce52009-01-03 21:22:43 +0000144
Ron Eldor4e6d55d2018-02-07 16:36:15 +0200145#else /* MBEDTLS_DHM_ALT */
146#include "dhm_alt.h"
147#endif /* MBEDTLS_DHM_ALT */
148
Paul Bakker5121ce52009-01-03 21:22:43 +0000149/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000150 * \brief This function initializes the DHM context.
Paul Bakker8f870b02014-06-20 13:32:38 +0200151 *
Rose Zadik41ad0822018-01-26 10:54:57 +0000152 * \param ctx The DHM context to initialize.
Paul Bakker8f870b02014-06-20 13:32:38 +0200153 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200154void mbedtls_dhm_init( mbedtls_dhm_context *ctx );
Paul Bakker8f870b02014-06-20 13:32:38 +0200155
156/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000157 * \brief This function parses the DHM parameters in a
158 * TLS ServerKeyExchange handshake message
159 * (DHM modulus, generator, and public key).
Paul Bakker5121ce52009-01-03 21:22:43 +0000160 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000161 * \note In a TLS handshake, this is the how the client
162 * sets up its DHM context from the server's public
163 * DHM key material.
164 *
165 * \param ctx The DHM context to use. This must be initialized.
Hanno Beckerf240ea02017-10-02 15:09:14 +0100166 * \param p On input, *p must be the start of the input buffer.
167 * On output, *p is updated to point to the end of the data
168 * that has been read. On success, this is the first byte
169 * past the end of the ServerKeyExchange parameters.
170 * On error, this is the point at which an error has been
171 * detected, which is usually not useful except to debug
172 * failures.
Rose Zadik41ad0822018-01-26 10:54:57 +0000173 * \param end The end of the input buffer.
Paul Bakker5121ce52009-01-03 21:22:43 +0000174 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100175 * \return \c 0 on success.
176 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000177 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200178int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx,
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000179 unsigned char **p,
180 const unsigned char *end );
Paul Bakker5121ce52009-01-03 21:22:43 +0000181
182/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000183 * \brief This function generates a DHM key pair and exports its
184 * public part together with the DHM parameters in the format
185 * used in a TLS ServerKeyExchange handshake message.
Paul Bakker5121ce52009-01-03 21:22:43 +0000186 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000187 * \note This function assumes that the DHM parameters \c ctx->P
188 * and \c ctx->G have already been properly set. For that, use
Jaeden Amero9564e972018-01-30 16:56:13 +0000189 * mbedtls_dhm_set_group() below in conjunction with
190 * mbedtls_mpi_read_binary() and mbedtls_mpi_read_string().
Paul Bakker5121ce52009-01-03 21:22:43 +0000191 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000192 * \note In a TLS handshake, this is the how the server generates
193 * and exports its DHM key material.
194 *
195 * \param ctx The DHM context to use. This must be initialized
196 * and have the DHM parameters set. It may or may not
197 * already have imported the peer's public key.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100198 * \param x_size The private key size in Bytes.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000199 * \param olen The address at which to store the number of Bytes
200 * written on success. This must not be \c NULL.
201 * \param output The destination buffer. This must be a writable buffer of
202 * sufficient size to hold the reduced binary presentation of
203 * the modulus, the generator and the public key, each wrapped
204 * with a 2-byte length field. It is the responsibility of the
205 * caller to ensure that enough space is available. Refer to
206 * mbedtls_mpi_size() to computing the byte-size of an MPI.
207 * \param f_rng The RNG function. Must not be \c NULL.
208 * \param p_rng The RNG context to be passed to \p f_rng. This may be
209 * \c NULL if \p f_rng doesn't need a context parameter.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100210 *
211 * \return \c 0 on success.
212 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000213 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200214int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size,
Paul Bakker23986e52011-04-24 08:57:21 +0000215 unsigned char *output, size_t *olen,
Paul Bakkera3d195c2011-11-27 21:07:34 +0000216 int (*f_rng)(void *, unsigned char *, size_t),
217 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000218
219/**
Rose Zadikf763f2b2018-04-17 11:00:40 +0100220 * \brief This function sets the prime modulus and generator.
221 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000222 * \note This function can be used to set \c ctx->P, \c ctx->G
Rose Zadikf763f2b2018-04-17 11:00:40 +0100223 * in preparation for mbedtls_dhm_make_params().
Hanno Becker8880e752017-10-04 13:15:08 +0100224 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000225 * \param ctx The DHM context to configure. This must be initialized.
226 * \param P The MPI holding the DHM prime modulus. This must be
227 * an initialized MPI.
228 * \param G The MPI holding the DHM generator. This must be an
229 * initialized MPI.
Hanno Becker8880e752017-10-04 13:15:08 +0100230 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100231 * \return \c 0 if successful.
232 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Hanno Becker8880e752017-10-04 13:15:08 +0100233 */
234int mbedtls_dhm_set_group( mbedtls_dhm_context *ctx,
235 const mbedtls_mpi *P,
236 const mbedtls_mpi *G );
237
238/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000239 * \brief This function imports the raw public value of the peer.
Paul Bakker5121ce52009-01-03 21:22:43 +0000240 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000241 * \note In a TLS handshake, this is the how the server imports
242 * the Client's public DHM key.
243 *
244 * \param ctx The DHM context to use. This must be initialized and have
245 * its DHM parameters set, e.g. via mbedtls_dhm_set_group().
246 * It may or may not already have generated its own private key.
247 * \param input The input buffer containing the \c G^Y value of the peer.
248 * This must be a readable buffer of size \p ilen Bytes.
249 * \param ilen The size of the input buffer \p input in Bytes.
Paul Bakker5121ce52009-01-03 21:22:43 +0000250 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100251 * \return \c 0 on success.
252 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000253 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200254int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx,
Paul Bakker23986e52011-04-24 08:57:21 +0000255 const unsigned char *input, size_t ilen );
Paul Bakker5121ce52009-01-03 21:22:43 +0000256
257/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000258 * \brief This function creates a DHM key pair and exports
259 * the raw public key in big-endian format.
Paul Bakker5121ce52009-01-03 21:22:43 +0000260 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100261 * \note The destination buffer is always fully written
262 * so as to contain a big-endian representation of G^X mod P.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000263 * If it is larger than \c ctx->len, it is padded accordingly
Rose Zadikf763f2b2018-04-17 11:00:40 +0100264 * with zero-bytes at the beginning.
265 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000266 * \param ctx The DHM context to use. This must be initialized and
267 * have the DHM parameters set. It may or may not already
268 * have imported the peer's public key.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100269 * \param x_size The private key size in Bytes.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000270 * \param output The destination buffer. This must be a writable buffer of
271 * size \p olen Bytes.
272 * \param olen The length of the destination buffer. This must be at least
273 * equal to `ctx->len` (the size of \c P).
274 * \param f_rng The RNG function. This must not be \c NULL.
275 * \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL
276 * if \p f_rng doesn't need a context argument.
Paul Bakker5121ce52009-01-03 21:22:43 +0000277 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100278 * \return \c 0 on success.
279 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000280 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200281int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size,
Paul Bakker23986e52011-04-24 08:57:21 +0000282 unsigned char *output, size_t olen,
Paul Bakkera3d195c2011-11-27 21:07:34 +0000283 int (*f_rng)(void *, unsigned char *, size_t),
284 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000285
286/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000287 * \brief This function derives and exports the shared secret
288 * \c (G^Y)^X mod \c P.
Paul Bakker5121ce52009-01-03 21:22:43 +0000289 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000290 * \note If \p f_rng is not \c NULL, it is used to blind the input as
291 * a countermeasure against timing attacks. Blinding is used
292 * only if our private key \c X is re-used, and not used
293 * otherwise. We recommend always passing a non-NULL
294 * \p f_rng argument.
Rose Zadikf763f2b2018-04-17 11:00:40 +0100295 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000296 * \param ctx The DHM context to use. This must be initialized
297 * and have its own private key generated and the peer's
298 * public key imported.
299 * \param output The buffer to write the generated shared key to. This
300 * must be a writable buffer of size \p output_size Bytes.
301 * \param output_size The size of the destination buffer. This must be at
302 * least the size of \c ctx->len (the size of \c P).
Rose Zadik41ad0822018-01-26 10:54:57 +0000303 * \param olen On exit, holds the actual number of Bytes written.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000304 * \param f_rng The RNG function, for blinding purposes. This may
305 * b \c NULL if blinding isn't needed.
306 * \param p_rng The RNG context. This may be \c NULL if \p f_rng
307 * doesn't need a context argument.
Paul Bakker5121ce52009-01-03 21:22:43 +0000308 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100309 * \return \c 0 on success.
310 * \return An \c MBEDTLS_ERR_DHM_XXX error code on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000311 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200312int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx,
Manuel Pégourié-Gonnard33352052015-06-02 16:17:08 +0100313 unsigned char *output, size_t output_size, size_t *olen,
Manuel Pégourié-Gonnard2d627642013-09-04 14:22:07 +0200314 int (*f_rng)(void *, unsigned char *, size_t),
315 void *p_rng );
Paul Bakker5121ce52009-01-03 21:22:43 +0000316
Paul Bakker9a736322012-11-14 12:39:52 +0000317/**
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000318 * \brief This function frees and clears the components
319 * of a DHM context.
Paul Bakker8f870b02014-06-20 13:32:38 +0200320 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000321 * \param ctx The DHM context to free and clear. This may be \c NULL,
322 * in which case this function is a no-op. If it is not \c NULL,
323 * it must point to an initialized DHM context.
Paul Bakker5121ce52009-01-03 21:22:43 +0000324 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200325void mbedtls_dhm_free( mbedtls_dhm_context *ctx );
Paul Bakker5121ce52009-01-03 21:22:43 +0000326
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200327#if defined(MBEDTLS_ASN1_PARSE_C)
Paul Bakker40ce79f2013-09-15 17:43:54 +0200328/** \ingroup x509_module */
329/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000330 * \brief This function parses DHM parameters in PEM or DER format.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200331 *
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000332 * \param dhm The DHM context to import the DHM parameters into.
333 * This must be initialized.
334 * \param dhmin The input buffer. This must be a readable buffer of
335 * length \p dhminlen Bytes.
336 * \param dhminlen The size of the input buffer \p dhmin, including the
337 * terminating \c NULL Byte for PEM data.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200338 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100339 * \return \c 0 on success.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000340 * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX error
341 * code on failure.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200342 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200343int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin,
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000344 size_t dhminlen );
Paul Bakker40ce79f2013-09-15 17:43:54 +0200345
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200346#if defined(MBEDTLS_FS_IO)
Paul Bakker40ce79f2013-09-15 17:43:54 +0200347/** \ingroup x509_module */
348/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000349 * \brief This function loads and parses DHM parameters from a file.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200350 *
Rose Zadik41ad0822018-01-26 10:54:57 +0000351 * \param dhm The DHM context to load the parameters to.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000352 * This must be initialized.
Rose Zadik41ad0822018-01-26 10:54:57 +0000353 * \param path The filename to read the DHM parameters from.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000354 * This must not be \c NULL.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200355 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100356 * \return \c 0 on success.
Hanno Becker6c5c45f2018-12-12 19:38:01 +0000357 * \return An \c MBEDTLS_ERR_DHM_XXX or \c MBEDTLS_ERR_PEM_XXX
358 * error code on failure.
Paul Bakker40ce79f2013-09-15 17:43:54 +0200359 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200360int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path );
361#endif /* MBEDTLS_FS_IO */
362#endif /* MBEDTLS_ASN1_PARSE_C */
nirekh01d569ecf2018-01-09 16:43:21 +0000363
Ron Eldorfa8f6352017-06-20 15:48:46 +0300364#if defined(MBEDTLS_SELF_TEST)
365
Paul Bakker5121ce52009-01-03 21:22:43 +0000366/**
Rose Zadik41ad0822018-01-26 10:54:57 +0000367 * \brief The DMH checkup routine.
Paul Bakker5121ce52009-01-03 21:22:43 +0000368 *
Rose Zadikf763f2b2018-04-17 11:00:40 +0100369 * \return \c 0 on success.
370 * \return \c 1 on failure.
Paul Bakker5121ce52009-01-03 21:22:43 +0000371 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200372int mbedtls_dhm_self_test( int verbose );
Paul Bakker5121ce52009-01-03 21:22:43 +0000373
Ron Eldorfa8f6352017-06-20 15:48:46 +0300374#endif /* MBEDTLS_SELF_TEST */
Paul Bakker5121ce52009-01-03 21:22:43 +0000375#ifdef __cplusplus
376}
377#endif
378
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100379/**
380 * RFC 3526, RFC 5114 and RFC 7919 standardize a number of
381 * Diffie-Hellman groups, some of which are included here
382 * for use within the SSL/TLS module and the user's convenience
383 * when configuring the Diffie-Hellman parameters by hand
384 * through \c mbedtls_ssl_conf_dh_param.
385 *
Jaeden Amero9564e972018-01-30 16:56:13 +0000386 * The following lists the source of the above groups in the standards:
387 * - RFC 5114 section 2.2: 2048-bit MODP Group with 224-bit Prime Order Subgroup
388 * - RFC 3526 section 3: 2048-bit MODP Group
389 * - RFC 3526 section 4: 3072-bit MODP Group
390 * - RFC 3526 section 5: 4096-bit MODP Group
391 * - RFC 7919 section A.1: ffdhe2048
392 * - RFC 7919 section A.2: ffdhe3072
393 * - RFC 7919 section A.3: ffdhe4096
394 * - RFC 7919 section A.4: ffdhe6144
395 * - RFC 7919 section A.5: ffdhe8192
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100396 *
397 * The constants with suffix "_p" denote the chosen prime moduli, while
398 * the constants with suffix "_g" denote the chosen generator
399 * of the associated prime field.
400 *
401 * The constants further suffixed with "_bin" are provided in binary format,
402 * while all other constants represent null-terminated strings holding the
403 * hexadecimal presentation of the respective numbers.
404 *
405 * The primes from RFC 3526 and RFC 7919 have been generating by the following
406 * trust-worthy procedure:
407 * - Fix N in { 2048, 3072, 4096, 6144, 8192 } and consider the N-bit number
408 * the first and last 64 bits are all 1, and the remaining N - 128 bits of
409 * which are 0x7ff...ff.
410 * - Add the smallest multiple of the first N - 129 bits of the binary expansion
411 * of pi (for RFC 5236) or e (for RFC 7919) to this intermediate bit-string
412 * such that the resulting integer is a safe-prime.
413 * - The result is the respective RFC 3526 / 7919 prime, and the corresponding
414 * generator is always chosen to be 2 (which is a square for these prime,
415 * hence the corresponding subgroup has order (p-1)/2 and avoids leaking a
416 * bit in the private exponent).
417 *
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100418 */
419
420#if !defined(MBEDTLS_DEPRECATED_REMOVED)
421
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100422/**
423 * \warning The origin of the primes in RFC 5114 is not documented and
424 * their use therefore constitutes a security risk!
425 *
426 * \deprecated The hex-encoded primes from RFC 5114 are deprecated and are
427 * likely to be removed in a future version of the library without
428 * replacement.
429 */
430
Jaeden Amero9564e972018-01-30 16:56:13 +0000431/**
432 * The hexadecimal presentation of the prime underlying the
433 * 2048-bit MODP Group with 224-bit Prime Order Subgroup, as defined
434 * in <em>RFC-5114: Additional Diffie-Hellman Groups for Use with
435 * IETF Standards</em>.
436 */
Jaeden Amero129f5082018-02-08 14:25:36 +0000437#define MBEDTLS_DHM_RFC5114_MODP_2048_P \
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100438 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
439 "AD107E1E9123A9D0D660FAA79559C51FA20D64E5683B9FD1" \
440 "B54B1597B61D0A75E6FA141DF95A56DBAF9A3C407BA1DF15" \
441 "EB3D688A309C180E1DE6B85A1274A0A66D3F8152AD6AC212" \
442 "9037C9EDEFDA4DF8D91E8FEF55B7394B7AD5B7D0B6C12207" \
443 "C9F98D11ED34DBF6C6BA0B2C8BBC27BE6A00E0A0B9C49708" \
444 "B3BF8A317091883681286130BC8985DB1602E714415D9330" \
445 "278273C7DE31EFDC7310F7121FD5A07415987D9ADC0A486D" \
446 "CDF93ACC44328387315D75E198C641A480CD86A1B9E587E8" \
447 "BE60E69CC928B2B9C52172E413042E9B23F10B0E16E79763" \
448 "C9B53DCF4BA80A29E3FB73C16B8E75B97EF363E2FFA31F71" \
449 "CF9DE5384E71B81C0AC4DFFE0C10E64F" )
450
Jaeden Amero9564e972018-01-30 16:56:13 +0000451/**
452 * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
453 * Group with 224-bit Prime Order Subgroup, as defined in <em>RFC-5114:
454 * Additional Diffie-Hellman Groups for Use with IETF Standards</em>.
455 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100456#define MBEDTLS_DHM_RFC5114_MODP_2048_G \
457 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
458 "AC4032EF4F2D9AE39DF30B5C8FFDAC506CDEBE7B89998CAF" \
459 "74866A08CFE4FFE3A6824A4E10B9A6F0DD921F01A70C4AFA" \
460 "AB739D7700C29F52C57DB17C620A8652BE5E9001A8D66AD7" \
461 "C17669101999024AF4D027275AC1348BB8A762D0521BC98A" \
462 "E247150422EA1ED409939D54DA7460CDB5F6C6B250717CBE" \
463 "F180EB34118E98D119529A45D6F834566E3025E316A330EF" \
464 "BB77A86F0C1AB15B051AE3D428C8F8ACB70A8137150B8EEB" \
465 "10E183EDD19963DDD9E263E4770589EF6AA21E7F5F2FF381" \
466 "B539CCE3409D13CD566AFBB48D6C019181E1BCFE94B30269" \
467 "EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179" \
468 "81BC087F2A7065B384B890D3191F2BFA" )
469
470/**
Jaeden Amero9564e972018-01-30 16:56:13 +0000471 * The hexadecimal presentation of the prime underlying the 2048-bit MODP
472 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
473 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
474 *
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100475 * \deprecated The hex-encoded primes from RFC 3625 are deprecated and
476 * superseded by the corresponding macros providing them as
477 * binary constants. Their hex-encoded constants are likely
478 * to be removed in a future version of the library.
479 *
480 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100481#define MBEDTLS_DHM_RFC3526_MODP_2048_P \
482 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
483 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
484 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
485 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
486 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
487 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
488 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
489 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
490 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
491 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
492 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
493 "15728E5A8AACAA68FFFFFFFFFFFFFFFF" )
494
Jaeden Amero9564e972018-01-30 16:56:13 +0000495/**
496 * The hexadecimal presentation of the chosen generator of the 2048-bit MODP
497 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
498 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
499 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100500#define MBEDTLS_DHM_RFC3526_MODP_2048_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100501 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100502
Jaeden Amero9564e972018-01-30 16:56:13 +0000503/**
504 * The hexadecimal presentation of the prime underlying the 3072-bit MODP
505 * Group, as defined in <em>RFC-3072: More Modular Exponential (MODP)
506 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
507 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100508#define MBEDTLS_DHM_RFC3526_MODP_3072_P \
509 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
510 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
511 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
512 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
513 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
514 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
515 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
516 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
517 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
518 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
519 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
520 "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \
521 "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \
522 "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \
523 "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \
524 "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \
525 "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF" )
526
Jaeden Amero9564e972018-01-30 16:56:13 +0000527/**
528 * The hexadecimal presentation of the chosen generator of the 3072-bit MODP
529 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
530 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
531 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100532#define MBEDTLS_DHM_RFC3526_MODP_3072_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100533 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100534
Jaeden Amero9564e972018-01-30 16:56:13 +0000535/**
536 * The hexadecimal presentation of the prime underlying the 4096-bit MODP
537 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
538 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
539 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100540#define MBEDTLS_DHM_RFC3526_MODP_4096_P \
541 MBEDTLS_DEPRECATED_STRING_CONSTANT( \
542 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
543 "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
544 "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
545 "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
546 "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \
547 "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \
548 "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \
549 "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \
550 "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \
551 "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \
552 "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \
553 "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \
554 "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \
555 "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \
556 "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \
557 "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \
558 "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \
559 "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \
560 "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \
561 "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \
562 "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199" \
563 "FFFFFFFFFFFFFFFF" )
564
Jaeden Amero9564e972018-01-30 16:56:13 +0000565/**
566 * The hexadecimal presentation of the chosen generator of the 4096-bit MODP
567 * Group, as defined in <em>RFC-3526: More Modular Exponential (MODP)
568 * Diffie-Hellman groups for Internet Key Exchange (IKE)</em>.
569 */
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100570#define MBEDTLS_DHM_RFC3526_MODP_4096_G \
Hanno Becker5e6b8d72017-10-04 13:41:36 +0100571 MBEDTLS_DEPRECATED_STRING_CONSTANT( "02" )
Hanno Beckere2fcfa82017-10-04 13:12:15 +0100572
573#endif /* MBEDTLS_DEPRECATED_REMOVED */
574
575/*
576 * Trustworthy DHM parameters in binary form
577 */
578
579#define MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN { \
580 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
581 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
582 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
583 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
584 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
585 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
586 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
587 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
588 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
589 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
590 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
591 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
592 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
593 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
594 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
595 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
596 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
597 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
598 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
599 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
600 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
601 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
602 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
603 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
604 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
605 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
606 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
607 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
608 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
609 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
610 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, \
611 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
612
613#define MBEDTLS_DHM_RFC3526_MODP_2048_G_BIN { 0x02 }
614
615#define MBEDTLS_DHM_RFC3526_MODP_3072_P_BIN { \
616 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
617 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
618 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
619 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
620 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
621 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
622 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
623 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
624 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
625 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
626 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
627 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
628 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
629 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
630 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
631 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
632 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
633 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
634 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
635 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
636 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
637 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
638 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
639 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
640 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
641 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
642 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
643 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
644 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
645 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
646 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
647 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
648 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
649 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
650 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
651 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
652 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
653 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
654 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
655 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
656 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
657 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
658 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
659 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
660 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
661 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
662 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x3A, 0xD2, 0xCA, \
663 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
664
665#define MBEDTLS_DHM_RFC3526_MODP_3072_G_BIN { 0x02 }
666
667#define MBEDTLS_DHM_RFC3526_MODP_4096_P_BIN { \
668 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
669 0xC9, 0x0F, 0xDA, 0xA2, 0x21, 0x68, 0xC2, 0x34, \
670 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1, \
671 0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, \
672 0x02, 0x0B, 0xBE, 0xA6, 0x3B, 0x13, 0x9B, 0x22, \
673 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD, \
674 0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, \
675 0x30, 0x2B, 0x0A, 0x6D, 0xF2, 0x5F, 0x14, 0x37, \
676 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45, \
677 0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, \
678 0xF4, 0x4C, 0x42, 0xE9, 0xA6, 0x37, 0xED, 0x6B, \
679 0x0B, 0xFF, 0x5C, 0xB6, 0xF4, 0x06, 0xB7, 0xED, \
680 0xEE, 0x38, 0x6B, 0xFB, 0x5A, 0x89, 0x9F, 0xA5, \
681 0xAE, 0x9F, 0x24, 0x11, 0x7C, 0x4B, 0x1F, 0xE6, \
682 0x49, 0x28, 0x66, 0x51, 0xEC, 0xE4, 0x5B, 0x3D, \
683 0xC2, 0x00, 0x7C, 0xB8, 0xA1, 0x63, 0xBF, 0x05, \
684 0x98, 0xDA, 0x48, 0x36, 0x1C, 0x55, 0xD3, 0x9A, \
685 0x69, 0x16, 0x3F, 0xA8, 0xFD, 0x24, 0xCF, 0x5F, \
686 0x83, 0x65, 0x5D, 0x23, 0xDC, 0xA3, 0xAD, 0x96, \
687 0x1C, 0x62, 0xF3, 0x56, 0x20, 0x85, 0x52, 0xBB, \
688 0x9E, 0xD5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6D, \
689 0x67, 0x0C, 0x35, 0x4E, 0x4A, 0xBC, 0x98, 0x04, \
690 0xF1, 0x74, 0x6C, 0x08, 0xCA, 0x18, 0x21, 0x7C, \
691 0x32, 0x90, 0x5E, 0x46, 0x2E, 0x36, 0xCE, 0x3B, \
692 0xE3, 0x9E, 0x77, 0x2C, 0x18, 0x0E, 0x86, 0x03, \
693 0x9B, 0x27, 0x83, 0xA2, 0xEC, 0x07, 0xA2, 0x8F, \
694 0xB5, 0xC5, 0x5D, 0xF0, 0x6F, 0x4C, 0x52, 0xC9, \
695 0xDE, 0x2B, 0xCB, 0xF6, 0x95, 0x58, 0x17, 0x18, \
696 0x39, 0x95, 0x49, 0x7C, 0xEA, 0x95, 0x6A, 0xE5, \
697 0x15, 0xD2, 0x26, 0x18, 0x98, 0xFA, 0x05, 0x10, \
698 0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAA, 0xC4, 0x2D, \
699 0xAD, 0x33, 0x17, 0x0D, 0x04, 0x50, 0x7A, 0x33, \
700 0xA8, 0x55, 0x21, 0xAB, 0xDF, 0x1C, 0xBA, 0x64, \
701 0xEC, 0xFB, 0x85, 0x04, 0x58, 0xDB, 0xEF, 0x0A, \
702 0x8A, 0xEA, 0x71, 0x57, 0x5D, 0x06, 0x0C, 0x7D, \
703 0xB3, 0x97, 0x0F, 0x85, 0xA6, 0xE1, 0xE4, 0xC7, \
704 0xAB, 0xF5, 0xAE, 0x8C, 0xDB, 0x09, 0x33, 0xD7, \
705 0x1E, 0x8C, 0x94, 0xE0, 0x4A, 0x25, 0x61, 0x9D, \
706 0xCE, 0xE3, 0xD2, 0x26, 0x1A, 0xD2, 0xEE, 0x6B, \
707 0xF1, 0x2F, 0xFA, 0x06, 0xD9, 0x8A, 0x08, 0x64, \
708 0xD8, 0x76, 0x02, 0x73, 0x3E, 0xC8, 0x6A, 0x64, \
709 0x52, 0x1F, 0x2B, 0x18, 0x17, 0x7B, 0x20, 0x0C, \
710 0xBB, 0xE1, 0x17, 0x57, 0x7A, 0x61, 0x5D, 0x6C, \
711 0x77, 0x09, 0x88, 0xC0, 0xBA, 0xD9, 0x46, 0xE2, \
712 0x08, 0xE2, 0x4F, 0xA0, 0x74, 0xE5, 0xAB, 0x31, \
713 0x43, 0xDB, 0x5B, 0xFC, 0xE0, 0xFD, 0x10, 0x8E, \
714 0x4B, 0x82, 0xD1, 0x20, 0xA9, 0x21, 0x08, 0x01, \
715 0x1A, 0x72, 0x3C, 0x12, 0xA7, 0x87, 0xE6, 0xD7, \
716 0x88, 0x71, 0x9A, 0x10, 0xBD, 0xBA, 0x5B, 0x26, \
717 0x99, 0xC3, 0x27, 0x18, 0x6A, 0xF4, 0xE2, 0x3C, \
718 0x1A, 0x94, 0x68, 0x34, 0xB6, 0x15, 0x0B, 0xDA, \
719 0x25, 0x83, 0xE9, 0xCA, 0x2A, 0xD4, 0x4C, 0xE8, \
720 0xDB, 0xBB, 0xC2, 0xDB, 0x04, 0xDE, 0x8E, 0xF9, \
721 0x2E, 0x8E, 0xFC, 0x14, 0x1F, 0xBE, 0xCA, 0xA6, \
722 0x28, 0x7C, 0x59, 0x47, 0x4E, 0x6B, 0xC0, 0x5D, \
723 0x99, 0xB2, 0x96, 0x4F, 0xA0, 0x90, 0xC3, 0xA2, \
724 0x23, 0x3B, 0xA1, 0x86, 0x51, 0x5B, 0xE7, 0xED, \
725 0x1F, 0x61, 0x29, 0x70, 0xCE, 0xE2, 0xD7, 0xAF, \
726 0xB8, 0x1B, 0xDD, 0x76, 0x21, 0x70, 0x48, 0x1C, \
727 0xD0, 0x06, 0x91, 0x27, 0xD5, 0xB0, 0x5A, 0xA9, \
728 0x93, 0xB4, 0xEA, 0x98, 0x8D, 0x8F, 0xDD, 0xC1, \
729 0x86, 0xFF, 0xB7, 0xDC, 0x90, 0xA6, 0xC0, 0x8F, \
730 0x4D, 0xF4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99, \
731 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
732
733#define MBEDTLS_DHM_RFC3526_MODP_4096_G_BIN { 0x02 }
734
735#define MBEDTLS_DHM_RFC7919_FFDHE2048_P_BIN { \
736 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
737 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
738 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
739 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
740 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
741 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
742 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
743 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
744 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
745 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
746 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
747 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
748 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
749 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
750 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
751 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
752 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
753 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
754 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
755 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
756 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
757 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
758 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
759 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
760 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
761 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
762 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
763 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
764 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
765 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
766 0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, \
767 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }
768
769#define MBEDTLS_DHM_RFC7919_FFDHE2048_G_BIN { 0x02 }
770
771#define MBEDTLS_DHM_RFC7919_FFDHE3072_P_BIN { \
772 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
773 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
774 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
775 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
776 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
777 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
778 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
779 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
780 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
781 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
782 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
783 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
784 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
785 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
786 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
787 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
788 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
789 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
790 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
791 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
792 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
793 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
794 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
795 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
796 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
797 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
798 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
799 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
800 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
801 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
802 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
803 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
804 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
805 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
806 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
807 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
808 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
809 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
810 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
811 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
812 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
813 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
814 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
815 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
816 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
817 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
818 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0xC6, 0x2E, 0x37, \
819 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
820
821#define MBEDTLS_DHM_RFC7919_FFDHE3072_G_BIN { 0x02 }
822
823#define MBEDTLS_DHM_RFC7919_FFDHE4096_P_BIN { \
824 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
825 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
826 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
827 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
828 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
829 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
830 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
831 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
832 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
833 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
834 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
835 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
836 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
837 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
838 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
839 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
840 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
841 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
842 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
843 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
844 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
845 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
846 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
847 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
848 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
849 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
850 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
851 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
852 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
853 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
854 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
855 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
856 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
857 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
858 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
859 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
860 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
861 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
862 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
863 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
864 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
865 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
866 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
867 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
868 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
869 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
870 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
871 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
872 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
873 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
874 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
875 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
876 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
877 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
878 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
879 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
880 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
881 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
882 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
883 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
884 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
885 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
886 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x65, 0x5F, 0x6A, \
887 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
888
889#define MBEDTLS_DHM_RFC7919_FFDHE4096_G_BIN { 0x02 }
890
891#define MBEDTLS_DHM_RFC7919_FFDHE6144_P_BIN { \
892 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
893 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
894 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
895 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
896 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
897 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
898 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
899 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
900 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
901 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
902 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
903 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
904 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
905 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
906 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
907 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
908 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
909 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
910 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
911 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
912 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
913 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
914 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
915 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
916 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
917 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
918 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
919 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
920 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
921 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
922 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
923 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
924 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
925 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
926 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
927 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
928 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
929 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
930 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
931 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
932 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
933 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
934 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
935 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
936 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
937 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
938 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
939 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
940 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
941 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
942 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
943 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
944 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
945 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
946 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
947 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
948 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
949 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
950 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
951 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
952 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
953 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
954 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
955 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
956 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
957 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
958 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
959 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
960 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
961 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
962 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
963 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
964 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
965 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
966 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
967 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
968 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
969 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
970 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
971 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
972 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
973 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
974 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
975 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
976 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
977 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
978 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
979 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
980 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
981 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
982 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
983 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
984 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
985 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
986 0xA4, 0x0E, 0x32, 0x9C, 0xD0, 0xE4, 0x0E, 0x65, \
987 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
988
989#define MBEDTLS_DHM_RFC7919_FFDHE6144_G_BIN { 0x02 }
990
991#define MBEDTLS_DHM_RFC7919_FFDHE8192_P_BIN { \
992 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
993 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, \
994 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, \
995 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, \
996 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, \
997 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, \
998 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, \
999 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, \
1000 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, \
1001 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, \
1002 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, \
1003 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, \
1004 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, \
1005 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, \
1006 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, \
1007 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, \
1008 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, \
1009 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, \
1010 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, \
1011 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, \
1012 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, \
1013 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, \
1014 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, \
1015 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, \
1016 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, \
1017 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, \
1018 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, \
1019 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, \
1020 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, \
1021 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, \
1022 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, \
1023 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, \
1024 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, \
1025 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, \
1026 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, \
1027 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, \
1028 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, \
1029 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, \
1030 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, \
1031 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, \
1032 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, \
1033 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, \
1034 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, \
1035 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, \
1036 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, \
1037 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, \
1038 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, \
1039 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, \
1040 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, \
1041 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, \
1042 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, \
1043 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, \
1044 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, \
1045 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, \
1046 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, \
1047 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, \
1048 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, \
1049 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, \
1050 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, \
1051 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, \
1052 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, \
1053 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, \
1054 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, \
1055 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, \
1056 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, \
1057 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, \
1058 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, \
1059 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, \
1060 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, \
1061 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, \
1062 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, \
1063 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, \
1064 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, \
1065 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, \
1066 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, \
1067 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, \
1068 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, \
1069 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, \
1070 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, \
1071 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, \
1072 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, \
1073 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, \
1074 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, \
1075 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, \
1076 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, \
1077 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, \
1078 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, \
1079 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, \
1080 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, \
1081 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, \
1082 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, \
1083 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, \
1084 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, \
1085 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, \
1086 0xA4, 0x0E, 0x32, 0x9C, 0xCF, 0xF4, 0x6A, 0xAA, \
1087 0x36, 0xAD, 0x00, 0x4C, 0xF6, 0x00, 0xC8, 0x38, \
1088 0x1E, 0x42, 0x5A, 0x31, 0xD9, 0x51, 0xAE, 0x64, \
1089 0xFD, 0xB2, 0x3F, 0xCE, 0xC9, 0x50, 0x9D, 0x43, \
1090 0x68, 0x7F, 0xEB, 0x69, 0xED, 0xD1, 0xCC, 0x5E, \
1091 0x0B, 0x8C, 0xC3, 0xBD, 0xF6, 0x4B, 0x10, 0xEF, \
1092 0x86, 0xB6, 0x31, 0x42, 0xA3, 0xAB, 0x88, 0x29, \
1093 0x55, 0x5B, 0x2F, 0x74, 0x7C, 0x93, 0x26, 0x65, \
1094 0xCB, 0x2C, 0x0F, 0x1C, 0xC0, 0x1B, 0xD7, 0x02, \
1095 0x29, 0x38, 0x88, 0x39, 0xD2, 0xAF, 0x05, 0xE4, \
1096 0x54, 0x50, 0x4A, 0xC7, 0x8B, 0x75, 0x82, 0x82, \
1097 0x28, 0x46, 0xC0, 0xBA, 0x35, 0xC3, 0x5F, 0x5C, \
1098 0x59, 0x16, 0x0C, 0xC0, 0x46, 0xFD, 0x82, 0x51, \
1099 0x54, 0x1F, 0xC6, 0x8C, 0x9C, 0x86, 0xB0, 0x22, \
1100 0xBB, 0x70, 0x99, 0x87, 0x6A, 0x46, 0x0E, 0x74, \
1101 0x51, 0xA8, 0xA9, 0x31, 0x09, 0x70, 0x3F, 0xEE, \
1102 0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C, \
1103 0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, \
1104 0x99, 0xE9, 0xE3, 0x16, 0x50, 0xC1, 0x21, 0x7B, \
1105 0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9, \
1106 0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, \
1107 0xA1, 0xFE, 0x30, 0x75, 0xA5, 0x77, 0xE2, 0x31, \
1108 0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57, \
1109 0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, \
1110 0xB6, 0x85, 0x5D, 0xFE, 0x72, 0xB0, 0xA6, 0x6E, \
1111 0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30, \
1112 0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, \
1113 0x2F, 0x74, 0x1E, 0xF8, 0xC1, 0xFE, 0x86, 0xFE, \
1114 0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D, \
1115 0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, \
1116 0x08, 0x22, 0xE5, 0x06, 0xA9, 0xF4, 0x61, 0x4E, \
1117 0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C, \
1118 0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, \
1119 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
1120
1121#define MBEDTLS_DHM_RFC7919_FFDHE8192_G_BIN { 0x02 }
1122
Paul Bakker9af723c2014-05-01 13:03:14 +02001123#endif /* dhm.h */