00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _DLDP_H
00031 #define _DLDP_H
00032
00033 #include "beecrypt.h"
00034 #include "mp32barrett.h"
00035
00051 typedef struct
00052 {
00053 mp32barrett p;
00054 mp32barrett q;
00055 mp32number r;
00056 mp32number g;
00057 mp32barrett n;
00058 } dldp_p;
00059
00060 #ifdef __cplusplus
00061 extern "C" {
00062 #endif
00063
00066 BEECRYPTAPI
00067 int dldp_pInit(dldp_p* dp)
00068 ;
00069
00072 BEECRYPTAPI
00073 int dldp_pFree( dldp_p* dp)
00074
00075 ;
00076
00079 BEECRYPTAPI
00080 int dldp_pCopy(dldp_p* dst, const dldp_p* src)
00081 ;
00082
00083
00084
00085
00086
00089 BEECRYPTAPI
00090 int dldp_pPrivate(const dldp_p* dp, randomGeneratorContext* rgc, mp32number* x)
00091 ;
00092
00095 BEECRYPTAPI
00096 int dldp_pPublic(const dldp_p* dp, const mp32number* x, mp32number* y)
00097 ;
00098
00101 BEECRYPTAPI
00102 int dldp_pPair(const dldp_p* dp, randomGeneratorContext* rgc, mp32number* x, mp32number* y)
00103 ;
00104
00105
00106
00107
00108
00109
00112 BEECRYPTAPI
00113 int dldp_pEqual(const dldp_p* a, const dldp_p* b)
00114 ;
00115
00116
00117
00118
00119
00120
00123 BEECRYPTAPI
00124 int dldp_pgoqMake(dldp_p* dp, randomGeneratorContext* rgc, uint32 psize, uint32 qsize, int cofactor)
00125 ;
00126
00129 BEECRYPTAPI
00130 int dldp_pgoqMakeSafe(dldp_p* dp, randomGeneratorContext* rgc, uint32 psize)
00131 ;
00132
00135 BEECRYPTAPI
00136 int dldp_pgoqGenerator(dldp_p* dp, randomGeneratorContext* rgc)
00137 ;
00138
00141 BEECRYPTAPI
00142 int dldp_pgoqValidate(const dldp_p*, randomGeneratorContext* rgc, int cofactor)
00143 ;
00144
00145
00146
00147
00148
00151 BEECRYPTAPI
00152 int dldp_pgonMake(dldp_p* dp, randomGeneratorContext* rgc, uint32 psize, uint32 qsize)
00153 ;
00154
00157 BEECRYPTAPI
00158 int dldp_pgonMakeSafe(dldp_p* dp, randomGeneratorContext* rgc, uint32 psize)
00159 ;
00160
00163 BEECRYPTAPI
00164 int dldp_pgonGenerator(dldp_p* dp, randomGeneratorContext* rgc)
00165 ;
00166
00169 BEECRYPTAPI
00170 int dldp_pgonValidate(const dldp_p* dp, randomGeneratorContext* rgc)
00171 ;
00172
00173 #ifdef __cplusplus
00174 }
00175 #endif
00176
00177 #endif