Adding upstream version 1.9.14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ddf4b25f8f
commit
49fcf7364a
88 changed files with 62468 additions and 0 deletions
7
man/Makefile.am
Normal file
7
man/Makefile.am
Normal file
|
@ -0,0 +1,7 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
man_MANS = haveged.8 libhavege.3
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
564
man/Makefile.in
Normal file
564
man/Makefile.in
Normal file
|
@ -0,0 +1,564 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = man
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
depcomp =
|
||||
am__maybe_remake_depfiles =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man3dir = $(mandir)/man3
|
||||
am__installdirs = "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man8dir)"
|
||||
man8dir = $(mandir)/man8
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
man_MANS = haveged.8 libhavege.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps man/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps man/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man3: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man3dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.3[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man8: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man8dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.8[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man8:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.8[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man3 install-man8
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man3 uninstall-man8
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man3 install-man8 install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
||||
uninstall-am uninstall-man uninstall-man3 uninstall-man8
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
342
man/haveged.8
Normal file
342
man/haveged.8
Normal file
|
@ -0,0 +1,342 @@
|
|||
.TH haveged 8 "February 10, 2014" "version 1.9" "SYSTEM ADMINISTRATION COMMANDS"
|
||||
.SH NAME
|
||||
haveged \- Generate random numbers and feed Linux's random device.
|
||||
.SH SYNOPSIS
|
||||
.B haveged [options]
|
||||
.SH DESCRIPTION
|
||||
.B haveged
|
||||
generates an unpredictable stream of random numbers harvested from the indirect
|
||||
effects of hardware events on hidden processor state (caches, branch predictors,
|
||||
memory translation tables, etc) using the HAVEGE (HArdware Volatile Entropy
|
||||
Gathering and Expansion) algorithm. The algorithm operates in user space, no
|
||||
special privilege is required for file system access to the output stream.
|
||||
.P
|
||||
Linux pools randomness for distribution by the /dev/random and /dev/urandom
|
||||
device interfaces. The standard mechanisms of filling the /dev/random pool may
|
||||
not be sufficient to meet demand on systems with high needs or limited user
|
||||
interaction. In those circumstances,
|
||||
.B haveged
|
||||
may be run as a privileged daemon to fill the /dev/random pool whenever the
|
||||
supply of random bits in /dev/random falls below the low water mark of the
|
||||
device.
|
||||
.P
|
||||
.B haveged
|
||||
tunes itself to its environment and provides the same built-in test suite
|
||||
for the output stream as used on certified hardware security devices. See
|
||||
.B NOTES
|
||||
below for further information.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-b nnn, --buffer=nnn
|
||||
Set collection buffer size to nnn KW. Default is 128KW (or 512KB).
|
||||
.TP
|
||||
-c cmd, --command=cmd
|
||||
Switch to command mode and send a command to an already running
|
||||
.B haveged
|
||||
process or daemon. Currently the only known commands are
|
||||
.I close
|
||||
to close the current communication socket of the running
|
||||
.B haveged
|
||||
process as well as
|
||||
.IR root = <new_root>
|
||||
where
|
||||
.I <new_root>
|
||||
is a place holder for the path of the real new root directory which should
|
||||
provide a haveged installation. The
|
||||
.B haveged
|
||||
process or daemon will perform a
|
||||
.BR chroot (2)
|
||||
system call followed by a
|
||||
.BR execv (3)
|
||||
to become rebased
|
||||
.B within
|
||||
the new root directory.
|
||||
.TP
|
||||
-d nnn, --data=nnn
|
||||
Set data cache size to nnn KB. Default is 16 or as determined dynamically.
|
||||
.TP
|
||||
-f file, --file=file
|
||||
Set output file path for non-daemon use. Default is "sample",
|
||||
use "-" for stdout.
|
||||
.TP
|
||||
-F , --Foreground
|
||||
Run daemon in foreground. Do not fork and detach.
|
||||
.TP
|
||||
-i nnn, --inst=nnn
|
||||
Set instruction cache size to nnn KB. Default is 16 or as determined dynamically.
|
||||
.TP
|
||||
-n nnn, --number=nnn
|
||||
Set number of bytes written to the output file. The value may be specified using one
|
||||
of the suffixes k, m, g, or t. The upper bound of this value is "16t" (2^44 Bytes = 16TB).
|
||||
A value of 0 indicates unbounded output and forces output to stdout. This argument is
|
||||
required if the daemon interface is not present. If the daemon interface is present, this
|
||||
setting takes precedence over any --run value.
|
||||
.TP
|
||||
-o <spec>, --onlinetest=<spec>
|
||||
Specify online tests to run. The <spec> consists of optional "t"ot and
|
||||
"c"ontinuous groups, each group indicates the procedures to be run, using "a<n>"
|
||||
to indicate a AIS-31 procedure A variant, and "b" to indicate AIS procedure B.
|
||||
The specifications are order independent (procedure B always runs first in each
|
||||
group) and case insensitive. The a<n> variations exist to mitigate the a slow
|
||||
autocorrelation test (test5). Normally all procedure A tests, except the first
|
||||
are iterated 257 times. An a<n> option indicates test5 should only be executed
|
||||
every modulo <n> times during the procedure's 257 repetitions. The effect is so
|
||||
noticeable that A8 is the usual choice.
|
||||
|
||||
The "tot" tests run only at initialization - there are no negative performance
|
||||
consequences except for a slight increase in the time required to initialize.
|
||||
The "tot" tests guarantee haveged has initialized properly. The use of both test
|
||||
procedures in the "tot" test is highly recommended because the two test emphasize
|
||||
different aspects of RNG quality.
|
||||
|
||||
In continuous testing, the test sequence is cycled repeatedly. For example, the
|
||||
string "tbca8b" (suitable for an AIS NTG.1 device) would run procedure B for the
|
||||
"tot" test, then cycle between procedure A8 and procedure B continuously for all
|
||||
further output. Continuous testing does not come for free, impacting both
|
||||
throughput and resource consumption. Continual testing also opens up the possibility
|
||||
of a test failure. A strict retry procedure recovers from spurious failure in all but
|
||||
the most extreme circumstances. When the retry fails, operation will terminate unless
|
||||
a "w" has been appended to the test token to make the test advisory only. In our
|
||||
example above, the string "tbca8wbw" would make all continuous tests advisory. For
|
||||
more detailed information on AIS retries see
|
||||
.B NOTES
|
||||
below.
|
||||
|
||||
Complete control over the test configuration is provided for flexibility. The
|
||||
defaults (ta8bcb" if run as a daemon and "ta8b" otherwise) are suitable for most
|
||||
circumstances.
|
||||
|
||||
.TP
|
||||
-p file, --pidfile=file
|
||||
Set file path for the daemon pid file. Default is "/var/run/haveged.pid",
|
||||
.TP
|
||||
-r n, --run=n
|
||||
Set run level for daemon interface:
|
||||
|
||||
n = 0 Run as daemon - must be root. Fills /dev/random when the supply of random bits
|
||||
falls below the low water mark of the device.
|
||||
|
||||
n = 1 Display configuration info and terminate.
|
||||
|
||||
n > 1 Write <n> kb of output. Deprecated (use --number instead), only provided for backward
|
||||
compatibility.
|
||||
|
||||
If --number is specified, values other than 0,1 are ignored. Default is 0.
|
||||
.TP
|
||||
-v n, --verbose=n
|
||||
Set diagnostic bitmap as sum of following options:
|
||||
|
||||
1=Show build/tuning summary on termination, summary for online test retries.
|
||||
|
||||
2=Show online test retry details
|
||||
|
||||
4=Show timing for collections
|
||||
|
||||
8=Show collection loop layout
|
||||
|
||||
16=Show collection loop code offsets
|
||||
|
||||
32=Show all online test completion detail
|
||||
|
||||
Default is 0. Use -1 for all diagnostics.
|
||||
.TP
|
||||
-w nnn, --write=nnn
|
||||
Set write_wakeup_threshold of daemon interface to nnn bits. Applies only to run level 0.
|
||||
.TP
|
||||
-?, --help
|
||||
This summary of program options.
|
||||
|
||||
.SH NOTES
|
||||
.P
|
||||
haveged tunes the HAVEGE algorithm for maximum effectiveness using a hierarchy
|
||||
of defaults, command line options, virtual file system information, and cpuid
|
||||
information where available. Under most circumstances, user input is not
|
||||
required for excellent results.
|
||||
.P
|
||||
Run-time testing provides assurance of correct haveged operation. The run-time
|
||||
test suite is modeled upon the AIS-31 specification of the German Common
|
||||
Criteria body, BIS. This specification is typically applied to hardware devices,
|
||||
requiring formal certification and mandated start-up and continuous operational
|
||||
testing. Because haveged runs on many different hardware platforms, certification
|
||||
cannot be a goal, but the AIS-31 test suite provides the means to assess haveged
|
||||
output with the same operational tests applied to certified hardware devices.
|
||||
.P
|
||||
AIS test procedure A performs 6 tests to check for statistically inconspicuous
|
||||
behavior. AIS test procedure B performs more theoretical tests such as checking
|
||||
multi-step transition probabilities and making an empirical entropy estimate.
|
||||
Procedure A is the much more resource and compute intensive of the two but is
|
||||
still recommended for the haveged start-up tests. Procedure B is well suited to
|
||||
use of haveged as a daemon because the test entropy estimate confirms the
|
||||
entropy estimate haveged uses when adding entropy to the /dev/random device.
|
||||
.P
|
||||
No test is perfect. There is a 10e-4 probability that a perfect generator will
|
||||
fail either of the test procedures. AIS-31 mandates a strict retry policy to
|
||||
filter out false alarms and haveged always logs test procedure failures. Retries
|
||||
are expected but rarely observed except when large data sets are generated with
|
||||
continuous testing. See the
|
||||
.B libhavege(3)
|
||||
notes for more detailed information.
|
||||
|
||||
.SH FILES
|
||||
|
||||
If running as a daemon, access to the following files is required
|
||||
.RS
|
||||
.P
|
||||
.I /dev/random
|
||||
.P
|
||||
.I /proc/sys/kernel/osrelease
|
||||
.P
|
||||
.I /proc/sys/kernel/random/poolsize
|
||||
.P
|
||||
.I /proc/sys/kernel/random/write_wakeup_threshold
|
||||
.RE
|
||||
|
||||
.SH DIAGNOSTICS
|
||||
Haveged returns 0 for success and non-zero for failure. The failure return code is 1
|
||||
"general failure" unless execution is terminated by signal <n>, in which case
|
||||
the return code will be 128 + <n>. The following diagnostics are issued to stderr
|
||||
upon non-zero termination:
|
||||
|
||||
Cannot fork into the background
|
||||
.RS
|
||||
Call to daemon(3) failed.
|
||||
|
||||
.RE
|
||||
Cannot open file <s> for writing.
|
||||
.RS
|
||||
Could not open sample file <s> for writing.
|
||||
|
||||
.RE
|
||||
Cannot write data in file:
|
||||
.RS
|
||||
Could not write data to the sample file.
|
||||
|
||||
.RE
|
||||
Couldn't get pool size.
|
||||
.RS
|
||||
Unable to read /proc/sys/kernel/random/poolsize
|
||||
|
||||
.RE
|
||||
Couldn't initialize HAVEGE rng
|
||||
.RS
|
||||
Invalid data or instruction cache size.
|
||||
|
||||
.RE
|
||||
Couldn't open PID file <s> for writing
|
||||
.RS
|
||||
Unable to write daemon PID
|
||||
|
||||
.RE
|
||||
Couldn't open random device
|
||||
.RS
|
||||
Could not open /dev/random for read-write.
|
||||
|
||||
.RE
|
||||
Couldn't query entropy-level from kernel: error
|
||||
.RS
|
||||
Call to ioctl(2) failed.
|
||||
|
||||
.RE
|
||||
Couldn't open PID file <path> for writing
|
||||
.RS
|
||||
Error writing /var/run/haveged.pid
|
||||
|
||||
.RE
|
||||
Fail:set_watermark()
|
||||
.RS
|
||||
Unable to write to /proc/sys/kernel/random/write_wakeup_threshold
|
||||
|
||||
.RE
|
||||
RNDADDENTROPY failed!
|
||||
.RS
|
||||
Call to ioctl(2) to add entropy failed
|
||||
|
||||
.RE
|
||||
RNG failed
|
||||
.RS
|
||||
The random number generator failed self-test or encountered a fatal error.
|
||||
|
||||
.RE
|
||||
Select error
|
||||
.RS
|
||||
Call to select(2) failed.
|
||||
|
||||
.RE
|
||||
Stopping due to signal <n>
|
||||
.RS
|
||||
Signal <n> caught.
|
||||
|
||||
.RE
|
||||
Unable to setup online tests
|
||||
.RS
|
||||
Memory unavailable for online test resources.
|
||||
|
||||
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
Write 1.5MB of random data to the file /tmp/random
|
||||
haveged -n 1.5M -f /tmp/random
|
||||
.TP
|
||||
Generate a /tmp/keyfile for disk encryption with LUKS
|
||||
haveged -n 2048 -f /tmp/keyfile
|
||||
.TP
|
||||
Overwrite partition /dev/sda1 with random data. Be careful, all data on the partition will be lost!
|
||||
haveged -n 0 | dd of=/dev/sda1
|
||||
.TP
|
||||
Generate random ASCII passwords of the length 16 characters
|
||||
(haveged -n 1000 -f - 2>/dev/null | tr -cd '[:graph:]' | fold -w 16 && echo ) | head
|
||||
.TP
|
||||
Write endless stream of random bytes to the pipe. Utility pv measures the speed by which data are written to the pipe.
|
||||
haveged -n 0 | pv > /dev/null
|
||||
.TP
|
||||
Evaluate speed of haveged to generate 1GB of random data
|
||||
haveged -n 1g -f - | dd of=/dev/null
|
||||
.TP
|
||||
Create a random key file containing 65 random keys for the encryption program aespipe.
|
||||
haveged -n 3705 -f - 2>/dev/null | uuencode -m - | head -n 66 | tail -n 65
|
||||
.TP
|
||||
Test the randomness of the generated data with dieharder test suite
|
||||
haveged -n 0 | dieharder -g 200 -a
|
||||
.TP
|
||||
Generate 16k of data, testing with procedure A and B with detailed test results. No c result seen because a single buffer fill did not contain enough data to complete the test.
|
||||
haveged -n 16k -o tba8ca8 -v 33
|
||||
.TP
|
||||
Generate 16k of data as above with larger buffer. The c test now completes - enough data now generated to complete the test.
|
||||
haveged -n 16k -o tba8ca8 -v 33 -b 512
|
||||
.TP
|
||||
Generate 16m of data as above, observe many c test completions with default buffer size.
|
||||
haveged -n 16m -o tba8ca8 -v 33
|
||||
.TP
|
||||
Generate large amounts of data - in this case 16TB. Enable initialization test but made continuous tests advisory only to avoid a possible situation that program will terminate because of procedureB failing two times in a row. The probability of procedureB to fail two times in a row can be estimated as <TB to generate>/3000 which yields 0.5% for 16TB.
|
||||
haveged -n 16T -o tba8cbw -f - | pv > /dev/null
|
||||
.TP
|
||||
Generate large amounts of data (16TB). Disable continuous tests for the maximum throughput but run the online tests at the startup to make sure that generator for properly initialized:
|
||||
haveged -n 16T -o tba8c -f - | pv > /dev/null
|
||||
|
||||
.SH SEE ALSO
|
||||
.TP
|
||||
.BR libhavege(3),
|
||||
.BR cryptsetup(8),
|
||||
.BR aespipe(1),
|
||||
.BR pv(1),
|
||||
.BR openssl(1),
|
||||
.BR uuencode(1)
|
||||
|
||||
.SH REFERENCES
|
||||
|
||||
.I HArdware Volatile Entropy Gathering and Expansion: generating unpredictable random numbers at user level
|
||||
by A. Seznec, N. Sendrier, INRIA Research Report, RR-4592, October 2002
|
||||
|
||||
.I A proposal for: Functionality classes for random number generators
|
||||
by W. Killmann and W. Schindler, version 2.0, Bundesamt fur Sicherheit in der
|
||||
Informationstechnik (BSI), September, 2011
|
||||
|
||||
.I A Statistical Test Suite for the Validation of Random NUmber Generators and Pseudorandom Number Generators for Cryptographic Applications,
|
||||
special publication SP800-22, National Institute of Standards and Technology, revised April, 2010
|
||||
|
||||
Additional information can also be found at
|
||||
.B http://www.issihosts.com/haveged/
|
||||
|
||||
.SH AUTHORS
|
||||
Gary Wuertz <gary@issiweb.com> and Jirka Hladky <hladky jiri AT gmail DOT com>
|
414
man/libhavege.3
Normal file
414
man/libhavege.3
Normal file
|
@ -0,0 +1,414 @@
|
|||
.TH libhavege 3 "February 10, 2014" "version 1.1" "LIBRARY FUNCTIONS"
|
||||
.SH NAME
|
||||
libhavege, havege_create, havege_run, havege_rng, havege_destroy, havege_status, havege_status_dump, havege_version \- haveged RNG
|
||||
.SH SYNOPSIS
|
||||
.HP
|
||||
.P
|
||||
.nf
|
||||
#include <haveged/havege.h>
|
||||
H_PARAMS params = {0};
|
||||
h_status status;
|
||||
char status_buf[512];
|
||||
|
||||
if (NULL==havege_version(HAVEGE_PREP_VERSION)) exit(1);
|
||||
H_PTR handle = havege_create(¶ms);
|
||||
havege_status(handle, &status);
|
||||
havege_run(handle);
|
||||
rc = havege_rng(handle, handle->io_buf, handle->i_readSz/sizeof(H_UINT));
|
||||
havege_status_dump(handle, H_SD_TOPIC_BUILD, status_buf, sizeof(status_buf));
|
||||
havege_destroy(handle);
|
||||
.fi
|
||||
|
||||
.SH DESCRIPTION
|
||||
.P
|
||||
The libhavege library provides the haveged random number generator and it's
|
||||
associated tuning and testing facilities in a development sub-package. All
|
||||
haveged conditional build features are preserved and all haveged options not
|
||||
directly related to it's daemon or file system interfaces are available. This
|
||||
means that the same haveged tuning and testing components are present in the
|
||||
library with the equivalent controls provided by the haveged command line.
|
||||
|
||||
|
||||
.SH API METHODS
|
||||
.P
|
||||
The libhavege library uses the opaque handle technique to manage it's required
|
||||
resources. Errors are returned in the "error" member of the handle. The
|
||||
havege_destroy() method should be called to dispose of any resources
|
||||
claimed by havege_create().
|
||||
.P
|
||||
.BI "H_PTR havege_create(H_PARAMS " *params ");"
|
||||
|
||||
Create an anchor. Most members of the H_PARAMS input to this call correspond
|
||||
closely to haveged command line options (see
|
||||
.B haveged(8)
|
||||
for details). The caller
|
||||
should check for a non-null return value with a error value of H_NOERR. Any
|
||||
non-null return should be disposed of by a call to havege_destroy() to free any
|
||||
resources. Possible error values: H_NOERR, H_NOTESTSPEC, H_NOBUF, H_NOTESTMEM,
|
||||
H_NOINIT
|
||||
|
||||
.P
|
||||
.BI "void havege_destroy(H_PTR " hptr ");"
|
||||
|
||||
Free all allocated anchor resources. If the multi-core option is used, this
|
||||
method should be called from a signal handler to prevent zombie processes. If
|
||||
called by the process that called haveged_create(), hptr will be freed when all
|
||||
child processes (if any) have terminated. If called by a child process, H_EXIT
|
||||
will be set and all children awakened to exit.
|
||||
|
||||
.P
|
||||
.BI "int havege_rng(H_PTR " hptr ", H_UINT " *buf ", H_UINT " sz ");"
|
||||
|
||||
Read random bytes from an active anchor. The RNG must have been previously
|
||||
readied by a call to havege_run(). The read must take place within the allocated
|
||||
buffer, hptr->io_buf. The range specified is the number of H_UINT to read. If
|
||||
the multi-core option is used, this buffer is memory mapped between collectors.
|
||||
Possible error values: H_NOERR, H_NOTESRUN, H_NOPOST, H_NODONE, H_NORQST,
|
||||
H_NOCOMP, H_EXIT
|
||||
|
||||
.P
|
||||
.BI "int havege_run(H_PTR " hptr ");"
|
||||
|
||||
Warm up the RNG and run the start-up tests. The operation succeeded if the error
|
||||
member of the handle is H_NOERR. A failed handle should be disposed of by a call
|
||||
to havege_destroy(). Possible error values: H_NOERR, H_NOCOLLECT, H_NOWALK,
|
||||
H_NOTESTMEM, H_NOTASK, H_NOTESTTOT, H_NOWAIT, H_NOTIMER, and any havege_rng()
|
||||
error.
|
||||
|
||||
.P
|
||||
.BI "void havege_status(H_PTR " hptr ", H_STATUS " hsts ");"
|
||||
|
||||
Fills in the h_status structure with read-only information collected from the
|
||||
package build, run-time tuning, and test components.
|
||||
|
||||
.P
|
||||
.BI "int havege_status_dump(H_PTR " hptr ", H_SD_TOPIC " topic ", char " *buf ", size_t " len ");"
|
||||
|
||||
Calls havege_status() and formats standard presentations of havege status in the
|
||||
supplied buffer. The standard formats are:
|
||||
|
||||
.RS
|
||||
H_SD_TOPIC_BUILD
|
||||
|
||||
ver: %s; arch: %s; vend: %s; build: (%s); collect: %dK
|
||||
|
||||
H_SD_TOPIC_TUNE
|
||||
|
||||
cpu: (%s); data: %dK (%s); inst: %dK (%s); idx: %d/%d; sz: %d/%d
|
||||
|
||||
H_SD_TOPIC_TEST
|
||||
|
||||
[tot tests(%s): A:%d/%d B: %d/%d;][continuous tests(%s): A:%d/%d B: %d/%d;][last entropy estimate %g]
|
||||
|
||||
H_SD_TOPIC_SUM
|
||||
|
||||
fills: %d, generated: %.4g %c bytes
|
||||
.RE
|
||||
|
||||
.BI "const char *havege_version(const char *" version ");"
|
||||
|
||||
Return/check library prep version. The prep version is the package version used
|
||||
to build the library. A null argument returns the prep version unconditionally.
|
||||
Using the definition of the prep string in havege.h as input returns the
|
||||
prep version if the header file is compatible with the library, or NULL if
|
||||
it is not. Intended to be called before attempting any initialization.
|
||||
|
||||
.SH NOTES
|
||||
.P
|
||||
|
||||
The sizes of the processor level 1 instruction and data caches are used to tune
|
||||
the HAVEGE algorithm for maximum sensitivity. If these sizes not specified,
|
||||
haveged will attempt to determine the sizes dynamically from the Linux sysfs
|
||||
and/or cpuid instruction with a fallback to a compiled default if no better
|
||||
information is not available.
|
||||
|
||||
The haveged RNG includes a run time test facility based upon the test suite
|
||||
defined in the AIS-31 specification from the The German Federal Office for
|
||||
Information Security (Bundesamt für Sicherheit in der Informationstechnik). The
|
||||
test suite consists of 11 statistical tests packaged into two test suites ("A"
|
||||
and "B"). The tests can be run at initialization (a.k.a. a "tot" test), or
|
||||
continuously to monitor all output. Failure of a suite will abort operation
|
||||
unless the behavior is explicitly waived in the test setup options.
|
||||
.P
|
||||
|
||||
Procedure A contains 6 test procedures designed to ensure statistically
|
||||
inconspicuous behavior. The first test, "test0", checks the disjointedness of
|
||||
65k six-bit strings. The remainder of the procedure consists of 257 repetitions
|
||||
of the FIPS140-1 tests, "test1" through "test4", and an auto-correlation test,
|
||||
"test5". The fixed size of the Procedure A input makes it ideal for continuous
|
||||
use, but the procedure is slow and resource intensive. In particular, test5 is
|
||||
several orders of magnitude slower than any other individual AIS test. As an
|
||||
alternative for those who cannot tolerate this load, procedure A variants A<n>
|
||||
are provided that execute all included tests but execute test5 only every 2^n
|
||||
repetitions. Even with this accommodation, procedure A is much slower than
|
||||
procedure B.
|
||||
|
||||
.P
|
||||
|
||||
Procedure B contains 5 tests, "test6a", "test6b', "test7a", "test7b", and
|
||||
"test8". The first 4 tests verify the expected frequencies for samples 100,000
|
||||
one-step, two-step, three-step, and four-step bit transitions. The last test
|
||||
provides an empirical entropy estimate of the input. The input required to
|
||||
complete these tests is variable, resulting in an ever-shifting bit alignment
|
||||
that guards against buffering artifacts.
|
||||
|
||||
.P
|
||||
|
||||
Each test procedure requires more than 1MB of data. Test input is managed by a
|
||||
bit index into the collection buffer. An independent index manages where integer
|
||||
output is taken from the same buffer. A buffer fill is triggered when the output
|
||||
index indicates all data has been extracted from the buffer. Online testing
|
||||
takes place after the buffer has been refilled but before the output index
|
||||
update allows output to resume. If any online test fails while processing the
|
||||
buffer, the buffer will be refilled and reprocessed until any retry is complete
|
||||
and the buffer contains no failed online tests or the online test procedure has
|
||||
failed and the RNG is considered broken.
|
||||
|
||||
.P
|
||||
|
||||
It is recommend to run both AIS test procedures at start-up to ensure the RNG
|
||||
is properly initialized. If resources are in short supply, omitting procedure A
|
||||
will save memory and time, with little risk in circumstances where output is
|
||||
mixed with other sources in /dev/random or other csprng. Continuous testing is
|
||||
also recommended where the throughput penalty is acceptable. One recent
|
||||
assessment of testing throughput costs is shown below.
|
||||
|
||||
.RS
|
||||
.TP 40
|
||||
haveged -n0 -oc | pv > /dev/null
|
||||
400MiB/s
|
||||
.TP
|
||||
haveged -n0 -ocb | pv > /dev/null
|
||||
70MiB/s
|
||||
.TP
|
||||
haveged -n0 -oca8b | pv > /dev/null
|
||||
13MiB/s
|
||||
.TP
|
||||
haveged -n0 -oca8 | pv > /dev/null
|
||||
8MiB/s
|
||||
.TP
|
||||
haveged -n0 -oca | pv > /dev/null
|
||||
100kiB/s
|
||||
.RE
|
||||
.P
|
||||
|
||||
Continuous testing also exposes another possible pitfall. Even an ideal RNG has
|
||||
a 10e-4 chance of failing either test procedure. The strict retry policy of
|
||||
AIS-31 is designed to guarantee an ideal RNG will "almost never" fail a test
|
||||
procedure. A single retry is mandated only to recover from a previous attempt
|
||||
that experienced a single individual test failure. The haveged implementation
|
||||
logs all retries and terminates on test procedure failures unless the procedure
|
||||
has been flagged as advisory by the "w" argument (see --onlinetest in
|
||||
.B haveged(8)
|
||||
). Little evidence of the retry mechanism is seen unless large data sets are
|
||||
processed. Procedure A is too slow to be practical in these situations, so
|
||||
procedure B has been the best studied. Retries are observed at the approximate
|
||||
rate of 0.7-0.8 failures/GB, mostly in the test7 multi-step transition checks.
|
||||
.P
|
||||
The probability that procedureB will fail two times in a row (in which case the
|
||||
program will be terminated unless w option was specified) is 4e-7 which is
|
||||
expected to happen at an approximate rate of once per 3,000 TB. When producing
|
||||
large amounts of data in order of TBs it's recommended to use -w option to make
|
||||
sure that program will not prematurely terminate because of a failed retry
|
||||
and carefully examine the stderr output for any problems.
|
||||
|
||||
.P
|
||||
|
||||
.SH FILES
|
||||
|
||||
Tuning information may be extracted from the following virtual file paths if
|
||||
tuning is required and the path exists.
|
||||
.P
|
||||
.RS
|
||||
.I /proc/cpuinfo
|
||||
.P
|
||||
.I /proc/self/status
|
||||
.P
|
||||
.I /sys/devices/system/cpu/online
|
||||
.P
|
||||
.I /sys/devices/system/cpu/cpu%d/cache/index%d/level
|
||||
.RE
|
||||
|
||||
.SH DIAGNOSTICS
|
||||
|
||||
To enable diagnostic output, supply a msg_out callback when creating the handle. All
|
||||
possible errors are enumerated in havege.h and reproduced here for reference.
|
||||
.P
|
||||
.RE
|
||||
.B 01 H_NOHANDLE
|
||||
.RS
|
||||
No memory for handle
|
||||
.P
|
||||
.RE
|
||||
.B 02 H_NOBUF
|
||||
.RS
|
||||
Output buffer allocation failed
|
||||
.P
|
||||
.RE
|
||||
.B 03 H_NOINIT
|
||||
.RS
|
||||
Semaphore init failed
|
||||
.P
|
||||
.RE
|
||||
.B 04 H_NOCOLLECT
|
||||
.RS
|
||||
Collector allocation failed
|
||||
.P
|
||||
.RE
|
||||
.B 05 H_NOWALK
|
||||
.RS
|
||||
Walk buffer allocation failed
|
||||
.P
|
||||
.RE
|
||||
.B 06 H_NOTESTSPEC
|
||||
.RS
|
||||
Invalid test specification
|
||||
.P
|
||||
.RE
|
||||
.B 07 H_NOTESTINIT
|
||||
.RS
|
||||
Test setup failed
|
||||
.P
|
||||
.RE
|
||||
.B 08 H_NOTESTMEM
|
||||
.RS
|
||||
Unable to allocate test memory
|
||||
.P
|
||||
.RE
|
||||
.B 09 H_NOTESTTOT
|
||||
.RS
|
||||
Power on (i.e. 'tot') test failed
|
||||
.P
|
||||
.RE
|
||||
.B 10 H_NOTESTRUN
|
||||
.RS
|
||||
Continuous test failed
|
||||
.P
|
||||
.RE
|
||||
.B 11 H_NOCORES
|
||||
.RS
|
||||
Too many cores specified
|
||||
.P
|
||||
.RE
|
||||
.B 12 H_NOTASK
|
||||
.RS
|
||||
Unable to create child task
|
||||
.P
|
||||
.RE
|
||||
.B 13 H_NOWAIT
|
||||
.RS
|
||||
sem_wait failed
|
||||
.P
|
||||
.RE
|
||||
.B 14 H_NOPOST
|
||||
.RS
|
||||
sem_post failed
|
||||
.P
|
||||
.RE
|
||||
.B 15 H_NODONE
|
||||
.RS
|
||||
sem_post done failed
|
||||
.P
|
||||
.RE
|
||||
.B 16 H_NORQST
|
||||
.RS
|
||||
sem_post request failed
|
||||
.P
|
||||
.RE
|
||||
.B 17 H_NOCOMP
|
||||
.RS
|
||||
wait for completion failed
|
||||
.P
|
||||
.RE
|
||||
.B 18 H_EXIT
|
||||
.RS
|
||||
Exit signal
|
||||
.P
|
||||
.RE
|
||||
.B 19 H_NOTIMER
|
||||
.RS
|
||||
Timer failed
|
||||
.P
|
||||
.RE
|
||||
.RE
|
||||
.SH EXAMPLE
|
||||
|
||||
The following minimal program writes the contents of 16 collection buffers
|
||||
of random data to stdout with continuous testing.
|
||||
|
||||
.nf
|
||||
#include <stdio.h>
|
||||
#include <haveged/havege.h>
|
||||
int main(void)
|
||||
{
|
||||
H_PTR havege_state;
|
||||
H_PARAMS havege_parameters = {0};
|
||||
int i, rc;
|
||||
|
||||
if (NULL==havege_version(HAVEGE_PREP_VERSION)) {
|
||||
fprintf(stderr, "Incompatible library %s\\n", havege_version(NULL));
|
||||
return 1;
|
||||
}
|
||||
havege_parameters.testSpec="ta8bcb";
|
||||
havege_state = havege_create(&havege_parameters);
|
||||
rc = havege_state==NULL? H_NOHANDLE : havege_state->error;
|
||||
if (H_NOERR==rc) {
|
||||
if (0==havege_run(havege_state)) {
|
||||
H_UINT *buf = havege_state->io_buf;
|
||||
int size = havege_state->i_readSz /sizeof(H_UINT);
|
||||
char info[256];
|
||||
|
||||
for(i=0;i<16;i++) {
|
||||
rc = havege_rng(havege_state, buf, size);
|
||||
if (rc != size) {
|
||||
fprintf(stderr, "RNG read failed %d\\n", havege_state->error);
|
||||
break;
|
||||
}
|
||||
rc = fwrite(buf, 1, size*sizeof(H_UINT), stdout);
|
||||
if ( rc < size ) {
|
||||
fprintf(stderr, "Write failed\\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
i = havege_status_dump(havege_state, H_SD_TOPIC_TEST, info, sizeof(info));
|
||||
info[i++] = '\\n';
|
||||
havege_status_dump(havege_state, H_SD_TOPIC_SUM, info+i, sizeof(info)-i);
|
||||
fprintf(stderr, "%s\\n", info);
|
||||
}
|
||||
else fprintf(stderr, "Initialize failed %d\\n", havege_state->error);
|
||||
havege_destroy(havege_state);
|
||||
}
|
||||
else fprintf(stderr, "Create failed %d\\n", rc);
|
||||
return rc;
|
||||
}
|
||||
.fi
|
||||
|
||||
Defaults are provided for all inputs to havege_create() as documented in havege.h. In this
|
||||
case for example, (16*4kb=65kb) will be written to stdout because the default size for
|
||||
i_readsz in 4kb.
|
||||
|
||||
.SH SEE ALSO
|
||||
.TP
|
||||
.BR haveged(8)
|
||||
|
||||
.SH REFERENCES
|
||||
|
||||
.B haveged(8)
|
||||
references provides a basic reading list. The following links are suggested as sources for
|
||||
further exploration.
|
||||
.TP
|
||||
The origins of the HAVEGE concept can be found at:
|
||||
http://www.irisa.fr/caps/projects/hipsor/
|
||||
.TP
|
||||
Tuning concepts inspired by (the complexity) at:
|
||||
http://www.open-mpi.org/projects/hwloc/
|
||||
.TP
|
||||
Reference documentation for the AIS-31 test suite can be found at:
|
||||
https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Zertifizierung/Interpretationen/AIS_31_Functionality_classes_for_random_number_generators_e.pdf?__blob=publicationFile
|
||||
.TP
|
||||
Implementation and design information available at:
|
||||
http://www.issihosts.com/haveged/
|
||||
|
||||
|
||||
.SH AUTHORS
|
||||
Gary Wuertz <gary@issiweb.com> and Jirka Hladky <hladky jiri AT gmail DOT com>
|
Loading…
Add table
Add a link
Reference in a new issue