Windows PowerShell command on Get-command DH_compute_key
MyWebUniversity

Manual Pages for UNIX Operating System command usage for man DH_compute_key

OpenSSL DH_generate_key(3openssl)

NNNNAAAAMMMMEEEE

DH_generate_key, DH_compute_key - perform Diffie-Hellman key

exchange SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS

#include

int DH_generate_key(DH *dh);

int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN

DH_generate_key() performs the first step of a Diffie-

Hellman key exchange by generating private and public DH

values. By calling DH_compute_key(), these are combined with

the other party's public value to compute the shared key.

DH_generate_key() expects ddddhhhh to contain the shared

parameters ddddhhhh---->>>>pppp and ddddhhhh---->>>>gggg. It generates a random private DH

value unless ddddhhhh---->>>>pppprrrriiiivvvv_kkkkeeeeyyyy is already set, and computes the

corresponding public value ddddhhhh---->>>>ppppuuuubbbb_kkkkeeeeyyyy, which can then be

published.

DH_compute_key() computes the shared secret from the private

DH value in ddddhhhh and the other party's public value in ppppuuuubbbb_kkkkeeeeyyyy

and stores it in kkkkeeeeyyyy. kkkkeeeeyyyy must point to DDDDHHHH_ssssiiiizzzzeeee((((ddddhhhh)))) bytes of

memory. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS

DH_generate_key() returns 1 on success, 0 otherwise.

DH_compute_key() returns the size of the shared secret on

success, -1 on error.

The error codes can be obtained by ERR_get_error(3).

SSSSEEEEEEEE AAAALLLLSSSSOOOO

dh(3), ERR_get_error(3), rand(3), DH_size(3)

HHHHIIIISSSSTTTTOOOORRRRYYYY

DH_generate_key() and DH_compute_key() are available in all

versions of SSLeay and OpenSSL.

25/Sep/2002 Last change: 0.9.8o 1




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