|
void | dhm_init (dhm_context *ctx) |
| Initialize DHM context. More...
|
|
int | dhm_read_params (dhm_context *ctx, unsigned char **p, const unsigned char *end) |
| Parse the ServerKeyExchange parameters. More...
|
|
int | dhm_make_params (dhm_context *ctx, int x_size, unsigned char *output, size_t *olen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Setup and write the ServerKeyExchange parameters. More...
|
|
int | dhm_read_public (dhm_context *ctx, const unsigned char *input, size_t ilen) |
| Import the peer's public value G^Y. More...
|
|
int | dhm_make_public (dhm_context *ctx, int x_size, unsigned char *output, size_t olen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Create own private value X and export G^X. More...
|
|
int | dhm_calc_secret (dhm_context *ctx, unsigned char *output, size_t *olen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Derive and export the shared secret (G^Y)^X mod P. More...
|
|
void | dhm_free (dhm_context *ctx) |
| Free and clear the components of a DHM key. More...
|
|
int | dhm_parse_dhm (dhm_context *dhm, const unsigned char *dhmin, size_t dhminlen) |
| Parse DHM parameters. More...
|
|
int | dhm_parse_dhmfile (dhm_context *dhm, const char *path) |
| Load and parse DHM parameters. More...
|
|
int | dhm_self_test (int verbose) |
| Checkup routine. More...
|
|
Diffie-Hellman-Merkle key exchange.
Copyright (C) 2006-2013, Brainspark B.V.
This file is part of PolarSSL (http://www.polarssl.org) Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
All rights reserved.
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.
Definition in file dhm.h.
#define POLARSSL_DHM_RFC2409_MODP_1024_P |
Value:"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \
"29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \
"EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \
"E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \
"EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381" \
"FFFFFFFFFFFFFFFF"
RFC 2409 defines a number of standardized Diffie-Hellman groups that can be used.
RFC 3526 defines a number of standardized Diffie-Hellman groups for IKE. RFC 5114 defines a number of standardized Diffie-Hellman groups that can be used.
Some are included here for convenience.
Included are: RFC 2409 6.2. 1024-bit MODP Group (Second Oakley Group) RFC 3526 3. 2048-bit MODP Group RFC 3526 4. 3072-bit MODP Group RFC 5114 2.1. 1024-bit MODP Group with 160-bit Prime Order Subgroup RFC 5114 2.2. 2048-bit MODP Group with 224-bit Prime Order Subgroup
Definition at line 62 of file dhm.h.