tls_ffdhe.c File Reference

FFDHE key exchange. More...

#include "tls.h"
#include "tls_ffdhe.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   TLS_TRACE_LEVEL
 

Functions

error_t tlsSelectFfdheGroup (TlsContext *context, const TlsSupportedGroupList *groupList)
 Select the named group to be used when performing FFDHE key exchange. More...
 
const TlsFfdheGrouptlsGetFfdheGroup (TlsContext *context, uint16_t namedGroup)
 Get the FFDHE parameters that match the specified named group. More...
 
error_t tlsLoadFfdheParameters (DhParameters *params, const TlsFfdheGroup *ffdheGroup)
 Load FFDHE parameters. More...
 

Variables

const TlsFfdheGroup ffdhe2048Group
 ffdhe2048 group More...
 
const TlsFfdheGroup ffdhe3072Group
 ffdhe3072 group More...
 
const TlsFfdheGroup ffdhe4096Group
 ffdhe4096 group More...
 

Detailed Description

FFDHE key exchange.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneSSL Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file tls_ffdhe.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   TLS_TRACE_LEVEL

Definition at line 32 of file tls_ffdhe.c.

Function Documentation

◆ tlsGetFfdheGroup()

const TlsFfdheGroup* tlsGetFfdheGroup ( TlsContext context,
uint16_t  namedGroup 
)

Get the FFDHE parameters that match the specified named group.

Parameters
[in]contextPointer to the TLS context
[in]namedGroupNamed group
Returns
FFDHE parameters

Definition at line 314 of file tls_ffdhe.c.

◆ tlsLoadFfdheParameters()

error_t tlsLoadFfdheParameters ( DhParameters params,
const TlsFfdheGroup ffdheGroup 
)

Load FFDHE parameters.

Parameters
[out]paramsPointer to the structure to be initialized
[in]ffdheGroupFFDHE parameters
Returns
Error code

Definition at line 374 of file tls_ffdhe.c.

◆ tlsSelectFfdheGroup()

error_t tlsSelectFfdheGroup ( TlsContext context,
const TlsSupportedGroupList groupList 
)

Select the named group to be used when performing FFDHE key exchange.

Parameters
[in]contextPointer to the TLS context
[in]groupListList of named groups supported by the peer
Returns
Error code

Definition at line 174 of file tls_ffdhe.c.

Variable Documentation

◆ ffdhe2048Group

const TlsFfdheGroup ffdhe2048Group
Initial value:
=
{
"ffdhe2048",
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A,
0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95,
0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9,
0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A,
0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0,
0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35,
0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72,
0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A,
0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB,
0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4,
0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70,
0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61,
0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83,
0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05,
0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA,
0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
256,
2
}

ffdhe2048 group

Definition at line 48 of file tls_ffdhe.c.

◆ ffdhe3072Group

const TlsFfdheGroup ffdhe3072Group

ffdhe3072 group

Definition at line 81 of file tls_ffdhe.c.

◆ ffdhe4096Group

const TlsFfdheGroup ffdhe4096Group

ffdhe4096 group

Definition at line 122 of file tls_ffdhe.c.