X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/1ba83484ee5bb486da9aa958576de4bc29ef0c1d..7280f7f44cfae62f6d34761ac88aa19da7da5dd8:/ec-keys.h diff --git a/ec-keys.h b/ec-keys.h index 847bc6a..60db9ff 100644 --- a/ec-keys.h +++ b/ec-keys.h @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: ec-keys.h,v 1.1 2004/03/28 01:58:47 mdw Exp $ + * $Id: ec-keys.h,v 1.3 2004/04/08 01:36:15 mdw Exp $ * * Elliptic curve key-fetching * * (c) 2004 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,26 +15,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb 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 Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: ec-keys.h,v $ - * Revision 1.1 2004/03/28 01:58:47 mdw - * Generate, store and retreive elliptic curve keys. - * - */ - #ifndef CATACOMB_EC_KEYS_H #define CATACOMB_EC_KEYS_H @@ -72,7 +64,30 @@ typedef struct ec_priv { mp *x; /* Secret exponent */ } ec_priv; -extern const key_fetchdef ec_paramfetch[], ec_pubfetch[], ec_privfetch[]; +extern const key_fetchdef ec_paramfetch[]; +#define EC_PARAMFETCHSZ 3 + +extern const key_fetchdef ec_pubfetch[]; +#define EC_PUBFETCHSZ 4 + +extern const key_fetchdef ec_privfetch[]; +#define EC_PRIVFETCHSZ 7 + +/*----- Functions provided ------------------------------------------------*/ + +/* --- @ec_paramfree@, @ec_pubfree@, @ec_privfree@ --- * + * + * Arguments: @ec_param *ep@, @ec_pub *ep@, @ec_priv *ep@ = pointer to + * key block to free + * + * Returns: --- + * + * Use: Frees an elliptic curve key block + */ + +extern void ec_paramfree(ec_param */*ep*/); +extern void ec_pubfree(ec_pub */*ep*/); +extern void ec_privfree(ec_priv */*ep*/); /*----- That's all, folks -------------------------------------------------*/