MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


OpenSL                                              dh(3openssl)



NAME
     dh - Diffie-Hellman key agreement

SYNOPSIS
      #include 
      #include 

      DH *   DHnew(void);
      void   DHfree(DH *dh);

      int    DHsize(const DH *dh);

      DH *   DHgenerateparameters(int primelen, int generator,
                     void (*callback)(int, int, void *), void *cbarg);
      int    DHcheck(const DH *dh, int *codes);

      int    DHgeneratekey(DH *dh);
      int    DHcomputekey(unsigned char *key, BIGNUM *pubkey, DH *dh);

      void DHsetdefaultmethod(const DHMETHOD *meth);
      const DHMETHOD *DHgetdefaultmethod(void);
      int DHsetmethod(DH *dh, const DHMETHOD *meth);
      DH *DHnewmethod(ENGINE *engine);
      const DHMETHOD *DHOpenSL(void);

      int DHgetexnewindex(long argl, char *argp, int (*newfunc)(),
                  int (*dupfunc)(), void (*freefunc)());
      int DHsetexdata(DH *d, int idx, char *arg);
      char *DHgetexdata(DH *d, int idx);

      DH *   d2iDHparams(DH **a, unsigned char **pp, long length);
      int    i2dDHparams(const DH *a, unsigned char **pp);

      int    DHparamsprintfp(FILE *fp, const DH *x);
      int    DHparamsprint(BIO *bp, const DH *x);

DESCRIPTION
     These functions implement the Diffie-Hellman key agreement
     protocol.  The generation of shared DH parameters is
     described in DHgenerateparameters(3); DHgeneratekey(3)
     describes how to perform a key agreement.

     The DH structure consists of several BIGNUM components.












OpenSL-0.9.8       Last change: Oct 11 2005                    1






OpenSL                                              dh(3openssl)



      struct
             {
             BIGNUM *p;              / prime number (shared)
             BIGNUM *g;              / generator of Zp (shared)
             BIGNUM *privkey;       / private DH value x
             BIGNUM *pubkey;        / public DH value g^x
             / ...
             };
      DH

     Note that DH keys may use non-standard DHMETHOD
     implementations, either directly or by the use of ENGINE
     modules. In some cases (eg. an ENGINE providing support for
     hardware-embedded keys), these BIGNUM values will not be
     used by the implementation or may be used for alternative
     data storage. For this reason, applications should generally
     avoid using DH structure elements directly and instead use
     API functions to query or modify keys.

SEE ALSO
     dhparam(1), bn(3), dsa(3), err(3), rand(3), rsa(3),
     engine(3), DHsetmethod(3), DHnew(3),
     DHgetexnewindex(3), DHgenerateparameters(3),
     DHcomputekey(3), d2iDHparams(3), RSAprint(3)































OpenSL-0.9.8       Last change: Oct 11 2005                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™