gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNU Crypto] proposed API for Key Agreements


From: Raif S. Naffah
Subject: [GNU Crypto] proposed API for Key Agreements
Date: Mon, 25 Aug 2003 19:50:01 +1000
User-agent: KMail/1.5.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hello all,

here is a proposal for adding an API to gnu.crypto to handle 
implementations of key agreement protocols.

the API is inspired from the work i did with Keith Burdis on 
implementing the SASL mechanisms, since those are also based on a 
challenge / request exchange between a client and a server.  the 
proposed API also emulates the formal descriptions of various Key 
Agreement Protocols (Chapter 12) in The Handbook of Applied 
Cryptography, Menezes & al.

at the heart of a key agreement protocol handler is the 
IKeyAgreementParty interface.  this interface is to be implemented by 
the (two or more) parties that engage in a key agreement exchange:

the visible methods are:

   String name();

   void init(Map attributes)
   throws KeyAgreementException;

   OutgoignMessage processMessage(IncomingMessage in)
   throws KeyAgreementException;

   boolean isComplete();

   void reset();

the main method is the processMessage().  it takes an optionally null 
IncomingMessage and generates an OutgoingMessage that is optionally 
null.  concrete implementations, depending on the number of 
intermediate steps, would invoke an appropriate method based on the 
current state of the automaton.  a base class (BaseKeyAgreementParty) 
implements a stateful object using a protected 'step' field.

IncomingMessage and OutgoingMessage are classes that can read and write, 
respectively, MPIs (BigIntegers), as well as public and private keys.  
i didnt see the value of having them as interfaces since i dont think 
we need more than one implementation.  methods to construct 
IncomingMessages from byte arrays and OutgoingMessages are supplied (in 
IncomingMessage) so are methods to obtain the contents of an 
OutgoingMessage as a byte array.

the API although simple, is IMO enough to handle (a) multi-party 
protocols, as well as (b) two-party protocols with multi-step/pass 
exchanges.

so far i was thinking of having a toplevel sub-package 'ka' for the key 
agreement implementations, but after i move the keypair generator to 
the 'keys' subpackage i might include the key agreements there too 
- --the rationale being that all key agreements i have or can think of 
implementing are based on asymetric techniques involving ... keypairs.


comments?


i'll be checking in with the API, two implementations: Diffie-Hellman 
(RFC-2631) and SRP-6.  other implementations can be added later such as 
ElGamal.

 
cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE/SdvJ+e1AKnsTRiERAxdIAKDtEcv1iouZwVAMMbOo58+9kOba2gCghh1b
7q5K6e5AcBsfTazMopS7F2o=
=WII5
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]