keyctl.2: Improvements to KEYCTL_DH_COMPUTE text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-11-03 14:32:51 +01:00
parent ec5fa8a7c4
commit 152d5aab8a
1 changed files with 9 additions and 6 deletions

View File

@ -1397,7 +1397,9 @@ Compute a Diffie-Hellman shared secret or public key.
The
.I arg2
argument is a pointer to a set of parameters containing
serial numbers for three keys used in the Diffie-Hellman calculation,
serial numbers for three
.IR """user"""
keys used in the Diffie-Hellman calculation,
packaged in a structure of the following form:
.nf
@ -1411,11 +1413,11 @@ struct keyctl_dh_params {
.in
.fi
The
.IR private ", " prime " and " base
fields are IDs of the keys, payload of which would be used for DH values
calculation.
The result is calculated as:
Each of the three keys specified in this structure must grant the caller
.I read
permission.
The payloads of these keys are used to calculate the Diffie-Hellman
result as:
base ^ private mod prime
@ -1437,6 +1439,7 @@ otherwise an error is returned.
If
.I arg4
is specified zero,
in which case the buffer is not used and
the operation returns the minimum required buffer size
(i.e., the length of the prime).