Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

beecrypt/elgamal.c File Reference

ElGamal signature scheme, code. More...

#include "system.h"
#include "elgamal.h"
#include "dldp.h"
#include "mp32.h"
#include "debug.h"

Go to the source code of this file.

Functions

int elgv1sign (const mp32barrett *p, const mp32barrett *n, const mp32number *g, randomGeneratorContext *rgc, const mp32number *hm, const mp32number *x, mp32number *r, mp32number *s)
int elgv1vrfy (const mp32barrett *p, const mp32barrett *n, const mp32number *g, const mp32number *hm, const mp32number *y, const mp32number *r, const mp32number *s)
int elgv3sign (const mp32barrett *p, const mp32barrett *n, const mp32number *g, randomGeneratorContext *rgc, const mp32number *hm, const mp32number *x, mp32number *r, mp32number *s)
int elgv3vrfy (const mp32barrett *p, const mp32barrett *n, const mp32number *g, const mp32number *hm, const mp32number *y, const mp32number *r, const mp32number *s)


Detailed Description

ElGamal signature scheme, code.

This code implements two of the six variants described:

For more information on this algorithm, see: "Handbook of Applied Cryptography" 11.5.2 "The ElGamal signature scheme", p. 454-459

Definition in file elgamal.c.


Function Documentation

int elgv1sign const mp32barrett   p,
const mp32barrett   n,
const mp32number   g,
randomGeneratorContext  ,
const mp32number   hm,
const mp32number   x,
mp32number   r,
mp32number   s
 

Definition at line 63 of file elgamal.c.

References mp32number::data, mp32barrett::modl, mp32add, mp32baddmod_w, mp32bmulmod_w, mp32bpowmod_w, mp32brndinv_w, mp32neg, mp32nfree, mp32nsize, mp32number::size, mp32barrett::size, and uint32.

int elgv1vrfy const mp32barrett   p,
const mp32barrett   n,
const mp32number   g,
const mp32number   hm,
const mp32number   y,
const mp32number   r,
const mp32number   s
 

Definition at line 100 of file elgamal.c.

References mp32number::data, mp32barrett::modl, mp32bmulmod_w, mp32bpowmod_w, mp32eq, mp32gex, mp32z, mp32number::size, mp32barrett::size, and uint32.

int elgv3sign const mp32barrett   p,
const mp32barrett   n,
const mp32number   g,
randomGeneratorContext  ,
const mp32number   hm,
const mp32number   x,
mp32number   r,
mp32number   s
 

Definition at line 144 of file elgamal.c.

References mp32number::data, mp32baddmod_w, mp32bmulmod_w, mp32bpowmod_w, mp32brnd_w, mp32nfree, mp32nsize, mp32number::size, mp32barrett::size, and uint32.

int elgv3vrfy const mp32barrett   p,
const mp32barrett   n,
const mp32number   g,
const mp32number   hm,
const mp32number   y,
const mp32number   r,
const mp32number   s
 

Definition at line 177 of file elgamal.c.

References mp32number::data, mp32barrett::modl, mp32bmulmod_w, mp32bpowmod_w, mp32eq, mp32gex, mp32z, mp32number::size, mp32barrett::size, and uint32.


Generated on Tue Sep 17 15:56:47 2002 for rpm by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002