comparison libtomcrypt/src/pk/ecc/ecc_make_key.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
3 * LibTomCrypt is a library that provides various cryptographic 3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 *
9 * Tom St Denis, [email protected], http://libtom.org
10 */ 8 */
11 9
12 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b 10 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b
13 * 11 *
14 * All curves taken from NIST recommendation paper of July 1999 12 * All curves taken from NIST recommendation paper of July 1999
17 #include "tomcrypt.h" 15 #include "tomcrypt.h"
18 16
19 /** 17 /**
20 @file ecc_make_key.c 18 @file ecc_make_key.c
21 ECC Crypto, Tom St Denis 19 ECC Crypto, Tom St Denis
22 */ 20 */
23 21
24 #ifdef LTC_MECC 22 #ifdef LTC_MECC
25 23
26 /** 24 /**
27 Make a new ECC key 25 Make a new ECC key
28 @param prng An active PRNG state 26 @param prng An active PRNG state
29 @param wprng The index of the PRNG you wish to use 27 @param wprng The index of the PRNG you wish to use
30 @param keysize The keysize for the new key (in octets from 20 to 65 bytes) 28 @param keysize The keysize for the new key (in octets from 20 to 65 bytes)
31 @param key [out] Destination of the newly created key 29 @param key [out] Destination of the newly created key
32 @return CRYPT_OK if successful, upon error all allocated memory will be freed 30 @return CRYPT_OK if successful, upon error all allocated memory will be freed
122 XFREE(buf); 120 XFREE(buf);
123 return err; 121 return err;
124 } 122 }
125 123
126 #endif 124 #endif
127 /* $Source$ */ 125 /* ref: $Format:%D$ */
128 /* $Revision$ */ 126 /* git commit: $Format:%H$ */
129 /* $Date$ */ 127 /* commit time: $Format:%ai$ */
130 128