XTR cryptosystem

ecesena@libero.it ecesena at libero.it
Mon Feb 24 12:03:01 CET 2003


I'm studying XTR cryptosystem (www.ecstr.com) for my thesis and I'd like to implement XTR support for GPG as an "exercise".

"XTR is not a new crypto system; it is just a particularly efficient and compact implementation of the classical Diffie-Hellman scheme", so with XTR we could rewrite everything: DH, ElGamal, DSA...

Well, let talk for instance about ElGamal... how to implement it? I'm looking the source (elgamal.h, .c)
For "induction", I think I need to write a file xtrelgamal.h as

--- start xtrelgamal.h ---
#ifndef G10_XTR_ELGAMAL_H
#define G10_XTR_ELGAMAL_H

int xtr_elg_generate( int algo, unsigned nbits, MPI *skey, MPI **retfactors );
int xtr_elg_check_secret_key( int algo, MPI *skey );
int xtr_elg_encrypt( int algo, MPI *resarr, MPI data, MPI *pkey );
int xtr_elg_decrypt( int algo, MPI *result, MPI *data, MPI *skey );
int xtr_elg_sign( int algo, MPI *resarr, MPI data, MPI *skey );
int xtr_elg_verify( int algo, MPI hash, MPI *data, MPI *pkey,
		    int (*cmp)(void *, MPI), void *opaquev );
unsigned xtr_elg_get_nbits( int algo, MPI *pkey );
const char *xtr_elg_get_info( int algo, int *npkey, int *nskey,
				    int *nenc, int *nsig, int *use );

#endif /*G10_XTR_ELGAMAL_H*/
--- end xtrelgamal.h ---

Then I'll implement the code in xtrelgamal.c... 
but then?

Thanks. bye!
Emanuele Cesena
<ecesena at libero.it>

Il corpo non ha ideali

More information about the Gnupg-devel mailing list