From a46d41ba1b3664c9c5cd99b14a4e5beba9ba4f98 Mon Sep 17 00:00:00 2001 From: jmc <> Date: Wed, 13 Oct 2010 19:16:37 +0000 Subject: document "openssl prime"; --- src/usr.sbin/openssl/openssl.1 | 48 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1 index 688df9d8c5..1c8639846e 100644 --- a/src/usr.sbin/openssl/openssl.1 +++ b/src/usr.sbin/openssl/openssl.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: openssl.1,v 1.76 2010/10/13 15:38:56 jmc Exp $ +.\" $OpenBSD: openssl.1,v 1.77 2010/10/13 19:16:37 jmc Exp $ .\" ==================================================================== .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. .\" @@ -322,6 +322,8 @@ Public and private key management. Public key algorithm parameter management. .It Cm pkeyutl Public key algorithm cryptographic operation utility. +.It Cm prime +Generate prime numbers or test numbers for primality. .It Cm rand Generate pseudo-random bytes. .It Cm req @@ -5402,6 +5404,50 @@ $ openssl pkeyutl -derive -inkey key.pem \e -peerkey pubkey.pem -out secret .Ed .\" +.\" PRIME +.\" +.Sh PRIME +.Cm openssl prime +.Op Fl generate +.Op Fl hex +.Op Fl safe +.Op Fl bits Ar n +.Op Fl checks Ar n +.Ar p +.Pp +The +.Nm prime +command is used to generate prime numbers, +or to check numbers for primality. +.Pp +The options are as follows: +.Bl -tag -width ds +.It Fl bits Ar n +Specify the number of bits in the generated prime number. +Must be used in conjunction with +.Fl generate . +.It Fl checks Ar n +Perform a Miller-Rabin probabilistic primality test with +.Ar n +iterations. +The default is 20. +.It Fl generate +Generate a pseudo-random prime number. +Must be used in conjunction with +.Fl bits . +.It Fl hex +Output in hex format. +.It Fl safe +Generate only +.Qq safe +prime numbers +(i.e. a prime p so that (p-1)/2 is also prime). +.It Ar p +Test if number +.Ar p +is prime. +.El +.\" .\" RAND .\" .Sh RAND -- cgit v1.2.3-55-g6feb