From 34d9284dd365375b4e398bcb4cced326feb1febc Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Thu, 23 Aug 2001 07:03:56 +0000 Subject: [PATCH] Add ppgen 1.0, a program to generate random passphrases from dictionary words, with a desired amount of entropy. Obtained from: OpenBSD --- security/Makefile | 1 + security/ppgen/Makefile | 25 +++++++++++++++++++++++++ security/ppgen/distinfo | 2 ++ security/ppgen/files/patch-ppg_random_c | 11 +++++++++++ security/ppgen/files/patch-ppgen_c | 10 ++++++++++ security/ppgen/pkg-comment | 1 + security/ppgen/pkg-descr | 14 ++++++++++++++ security/ppgen/pkg-plist | 3 +++ 8 files changed, 67 insertions(+) create mode 100644 security/ppgen/Makefile create mode 100644 security/ppgen/distinfo create mode 100644 security/ppgen/files/patch-ppg_random_c create mode 100644 security/ppgen/files/patch-ppgen_c create mode 100644 security/ppgen/pkg-comment create mode 100644 security/ppgen/pkg-descr create mode 100644 security/ppgen/pkg-plist diff --git a/security/Makefile b/security/Makefile index e7c4fb8adb5e..5a8810441d56 100644 --- a/security/Makefile +++ b/security/Makefile @@ -140,6 +140,7 @@ SUBDIR += pktsuckers SUBDIR += portscanner SUBDIR += portsentry + SUBDIR += ppgen SUBDIR += pscan SUBDIR += py-amkCrypto SUBDIR += py-fchksum diff --git a/security/ppgen/Makefile b/security/ppgen/Makefile new file mode 100644 index 000000000000..4aed1ea82492 --- /dev/null +++ b/security/ppgen/Makefile @@ -0,0 +1,25 @@ +# Ports collection makefile for: ppgen +# Date created: 22 Aug 2001 +# Whom: Kris Kennaway +# +# $FreeBSD$ +# + +PORTNAME= ppgen +PORTVERSION= 1.0 +CATEGORIES= security +MASTER_SITES= ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/ppgen/ +DISTFILES= ${DISTNAME}.tar.gz en.gz +EXTRACT_ONLY= ${DISTNAME}.tar.gz + +MAINTAINER= kris@FreeBSD.org + +GNU_CONFIGURE= yes + +MAN1= ppgen.1 + +post-install: + ${MKDIR} ${PREFIX}/share/ppgen + ${GZIP_CMD} -dc ${DISTDIR}/en.gz > ${PREFIX}/share/ppgen/en + +.include diff --git a/security/ppgen/distinfo b/security/ppgen/distinfo new file mode 100644 index 000000000000..00f0780ea3f3 --- /dev/null +++ b/security/ppgen/distinfo @@ -0,0 +1,2 @@ +MD5 (en.gz) = 2a84c2d569c334dee1770e49de14455b +MD5 (ppgen-1.0.tar.gz) = 7544cda944428cfc2d17432adda25dc3 diff --git a/security/ppgen/files/patch-ppg_random_c b/security/ppgen/files/patch-ppg_random_c new file mode 100644 index 000000000000..517f94d07b96 --- /dev/null +++ b/security/ppgen/files/patch-ppg_random_c @@ -0,0 +1,11 @@ +--- ppg_random.c.orig Tue Aug 29 04:19:01 1995 ++++ ppg_random.c Sat Aug 12 20:14:39 2000 +@@ -109,7 +109,7 @@ pgp_rand_really_init() + + int i; + +- SRAND(time(NULL)^getpid()); ++ srandomdev(); + + for (i = 0; i < cachesize; i++) { + /* Conservatively, take what RAND() returns and fold it down diff --git a/security/ppgen/files/patch-ppgen_c b/security/ppgen/files/patch-ppgen_c new file mode 100644 index 000000000000..e282f1fc7c35 --- /dev/null +++ b/security/ppgen/files/patch-ppgen_c @@ -0,0 +1,10 @@ +--- ppgen.c.orig Tue Aug 29 05:10:45 1995 ++++ ppgen.c Sat Aug 12 19:55:51 2000 +@@ -29,6 +29,7 @@ + #else + char *optarg; + #endif ++#include + + #include "ppg_random.h" + diff --git a/security/ppgen/pkg-comment b/security/ppgen/pkg-comment new file mode 100644 index 000000000000..e6c745e33b12 --- /dev/null +++ b/security/ppgen/pkg-comment @@ -0,0 +1 @@ +Secure passphrase generator diff --git a/security/ppgen/pkg-descr b/security/ppgen/pkg-descr new file mode 100644 index 000000000000..0285d4c9879b --- /dev/null +++ b/security/ppgen/pkg-descr @@ -0,0 +1,14 @@ +From the author (Michael Shields ): + +ppgen generates passphrases using strings of words, long enough to have +an arbitrary level of entropy. It can use any dictionary and the best +available source of randomness, including PGP's cryptographic RNG if you +have version 2.6.2. It is written in portable C, and it is fairly fast. + +You can use ppgen to generate passphrases whenever you have a program that +accepts long passwords. I use it for Kerberos and for local passwords +(I use the FreeBSD MD5-based crypt(3), not the standard limited Unix one), +and for my PGP keyring. + +Because ppgen is so simple, it can also easily be used by passwd(1) +or adduser(1) programs to choose passwords for users. diff --git a/security/ppgen/pkg-plist b/security/ppgen/pkg-plist new file mode 100644 index 000000000000..cbbd7627cda0 --- /dev/null +++ b/security/ppgen/pkg-plist @@ -0,0 +1,3 @@ +bin/ppgen +share/ppgen/en +@dirrm share/ppgen