.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "fr::crypto::dh 3SSL" .TH fr::crypto::dh 3SSL "2015-12-31" "1.0.2a 1.0.2c" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NOM" .IX Header "NOM" dh \- Échange de clés Diffie-Hellman .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& #include \& #include \& \& DH * DH_new(void); \& void DH_free(DH *dh); \& \& int DH_size(const DH *dh); \& \& DH * DH_generate_parameters(int prime_len, int generator, \& void (*callback)(int, int, void *), void *cb_arg); \& int DH_check(const DH *dh, int *codes); \& \& int DH_generate_key(DH *dh); \& int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); \& \& void DH_set_default_method(const DH_METHOD *meth); \& const DH_METHOD *DH_get_default_method(void); \& int DH_set_method(DH *dh, const DH_METHOD *meth); \& DH *DH_new_method(ENGINE *engine); \& const DH_METHOD *DH_OpenSSL(void); \& \& int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), \& int (*dup_func)(), void (*free_func)()); \& int DH_set_ex_data(DH *d, int idx, char *arg); \& char *DH_get_ex_data(DH *d, int idx); \& \& DH * d2i_DHparams(DH **a, unsigned char **pp, long length); \& int i2d_DHparams(const DH *a, unsigned char **pp); \& \& int DHparams_print_fp(FILE *fp, const DH *x); \& int DHparams_print(BIO *bp, const DH *x); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Ces fonctions implémentent le protocol d'échange de clés Diffie-Hellman. La génération de paramètres \s-1DH\s0 partagés est décrite dans \&\fIDH_generate_parameters\fR\|(3) ; \&\fIDH_generate_key\fR\|(3) décrit comment effectuer l'échange des clés. .PP La structure \fB\s-1DH\s0\fR consiste en plusieurs composants \s-1BIGNUM.\s0 .PP .Vb 9 \& struct \& { \& BIGNUM *p; // nombre premier (partagé) \& BIGNUM *g; // générateur de Z_p (partagé) \& BIGNUM *priv_key; // valeur DH privée x \& BIGNUM *pub_key; // valeur DH publique g^x \& // ... \& }; \& DH .Ve .PP Notez que les clés \s-1DH\s0 peuvent utiliser des implémentation \fB\s-1DH_METHOD\s0\fR non standard, soit directement, soit en utilisant des modules \fB\s-1ENGINE\s0\fR. Dans certains cas (par exemple un \s-1ENGINE\s0 fournissant la gestion de clés matérielle embarquées), ces valeurs \s-1BIGNUM\s0 ne seront pas utilisées par l'implémentation ou peuvent être utilisées pour le stockage de d'autres données. Pour cette raison, les applications devraient généralement éviter d'utiliser les éléments de la structure \s-1DH\s0 directement et devraient à la place utiliser les fonctions de l'\s-1API\s0 pour demander ou modifier les clés. .SH "VOIR AUSSI" .IX Header "VOIR AUSSI" \&\fIdhparam\fR\|(1), \fIbn\fR\|(3), \fIdsa\fR\|(3), \&\fIerr\fR\|(3), \fIrand\fR\|(3), \fIrsa\fR\|(3), \&\fIengine\fR\|(3), \fIDH_set_method\fR\|(3), \&\fIDH_new\fR\|(3), \fIDH_get_ex_new_index\fR\|(3), \&\fIDH_generate_parameters\fR\|(3), \&\fIDH_compute_key\fR\|(3), \fId2i_DHparams\fR\|(3), \&\fIRSA_print\fR\|(3) .SH "TRADUCTION" .IX Header "TRADUCTION" La traduction de cette page de manuel est maintenue par les membres de la liste . Veuillez signaler toute erreur de traduction par un rapport de bogue sur le paquet manpages-fr-extra.