Manual Pages for UNIX Darwin command on man DSA_OpenSSL
MyWebUniversity

Manual Pages for UNIX Darwin command on man DSA_OpenSSL

DSAsetmethod(3) OpenSSL DSAsetmethod(3)

NAME

DSAsetdefaultmethod, DSAgetdefaultmethod, DSAsetmethod,

DSAnewmethod, DSAOpenSSL - select DSA method

SYNOPSIS

#include

#include

void DSAsetdefaultmethod(const DSAMETHOD *meth); const DSAMETHOD *DSAgetdefaultmethod(void); int DSAsetmethod(DSA *dsa, const DSAMETHOD *meth); DSA *DSAnewmethod(ENGINE *engine); DSAMETHOD *DSAOpenSSL(void);

DESCRIPTION

A DDSSAAMMEETTHHOODD specifies the functions that OpenSSL uses for DSA operations. By modifying the method, alternative implementations such

as hardware accelerators may be used. IMPORTANT: See the NOTES section

for important information about how these DSA API functions are affected by the use of EENNGGIINNEE API calls. Initially, the default DSAMETHOD is the OpenSSL internal implementation, as returned by DSAOpenSSL(). DSAsetdefaultmethod() makes mmeetthh the default method for all DSA structures created later. NNBB: This is true only whilst no ENGINE has been set as a default for DSA, so this function is no longer recommended. DSAgetdefaultmethod() returns a pointer to the current default DSAMETHOD. However, the meaningfulness of this result is dependant on whether the ENGINE API is being used, so this function is no longer recommended. DSAsetmethod() selects mmeetthh to perform all operations using the key rrssaa. This will replace the DSAMETHOD used by the DSA key and if the previous method was supplied by an ENGINE, the handle to that ENGINE will be released during the change. It is possible to have DSA keys that only work with certain DSAMETHOD implementations (eg. from an

ENGINE module that supports embedded hardware-protected keys), and in

such cases attempting to change the DSAMETHOD for the key can have unexpected results. DSAnewmethod() allocates and initializes a DSA structure so that eennggiinnee will be used for the DSA operations. If eennggiinnee is NULL, the default engine for DSA operations is used, and if no default ENGINE is set, the DSAMETHOD controlled by DSAsetdefaultmethod() is used. TTHHEE DDSSAAMMEETTHHOODD SSTTRRUUCCTTUURREE struct { /* name of the implementation */ const char *name; /* sign */ DSASIG *(*dsadosign)(const unsigned char *dgst, int dlen, DSA *dsa);

/* pre-compute k^-1 and r */

int (*dsasignsetup)(DSA *dsa, BNCTX *ctxin, BIGNUM **kinvp, BIGNUM **rp); /* verify */ int (*dsadoverify)(const unsigned char *dgst, int dgstlen, DSASIG *sig, DSA *dsa); /* compute rr = a1^p1 * a2^p2 mod m (May be NULL for some implementations) */ int (*dsamodexp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BNCTX *ctx, BNMONTCTX *inmont); /* compute r = a ^ p mod m (May be NULL for some implementations) */ int (*bnmodexp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BNCTX *ctx, BNMONTCTX *mctx); /* called at DSAnew */ int (*init)(DSA *DSA); /* called at DSAfree */ int (*finish)(DSA *DSA); int flags; char *appdata; /* ?? */ } DSAMETHOD;

RETURN VALUES

DSAOpenSSL() and DSAgetdefaultmethod() return pointers to the respective DDSSAAMMEETTHHOODDs. DSAsetdefaultmethod() returns no value.

DSAsetmethod() returns non-zero if the provided mmeetthh was successfully

set as the method for ddssaa (including unloading the ENGINE handle if the previous method was supplied by an ENGINE). DSAnewmethod() returns NULL and sets an error code that can be obtained by ERRgeterror(3) if the allocation fails. Otherwise it returns a pointer to the newly allocated structure. NNOOTTEESS As of version 0.9.7, DSAMETHOD implementations are grouped together with other algorithmic APIs (eg. RSAMETHOD, EVPCIPHER, etc) in EENNGGIINNEE modules. If a default ENGINE is specified for DSA functionality using an ENGINE API function, that will override any DSA defaults set using the DSA API (ie. DSAsetdefaultmethod()). For this reason, the ENGINE API is the recommended way to control default implementations for use in DSA and other cryptographic algorithms.

SEE ALSO

dsa(3), DSAnew(3) HISTORY DSAsetdefaultmethod(), DSAgetdefaultmethod(), DSAsetmethod(), DSAnewmethod() and DSAOpenSSL() were added in OpenSSL 0.9.4. DSAsetdefaultopensslmethod() and DSAgetdefaultopensslmethod() replaced DSAsetdefaultmethod() and DSAgetdefaultmethod() respectively, and DSAsetmethod() and DSAnewmethod() were altered to use EENNGGIINNEEs rather than DDSSAAMMEETTHHOODDs during development of the engine version of OpenSSL 0.9.6. For 0.9.7, the handling of defaults in the ENGINE API was restructured so that this change was reversed, and behaviour of the other functions resembled more closely the previous behaviour. The behaviour of defaults in the ENGINE API now transparently overrides the behaviour of defaults in the DSA API without requiring changing these function prototypes.

0.9.7l 2002-10-28 DSAsetmethod(3)




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