Summary: Entropy source using the cryptographically secure pseudo-random number generator Name: csprng Version: 1.1.3 Release: 0%{?dist} License: GPLv3+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Group: System Environment/Daemons #See output of rpm -qa --qf '<%>{group} : <%>{name}\n' | sort -u #Remove <> around % - it's there to make rpmlint happy URL: http://code.google.com/p/csrng/ Source0: http://csrng.googlecode.com/files/%{name}-%{version}.tar.bz2 Source1: csprngd.service Requires(post): systemd Requires(preun): systemd Requires(postun): systemd BuildRequires: glibc-common openssl-devel %description The csprng project provides cryptographically secure pseudo-random number generator. It consists of * C library * csprng-generate utility to generate stream of random numbers written to file or to STDOUT * Linux daemon csprngd to fill entropy of Linux kernel random device /dev/random It combines these three components to provide a high quality cascade random number generator: * HAVEGE hardware random number generator. HAVEGE combines on-the-fly hardware volatile entropy gathering with pseudo-random number generation. The internal state of HAVEGE includes thousands of internal volatile hardware states of the CPU and is merely unmonitorable. The CPU intern states include caches, branch predictors, TLBs, long pipelines, instruction level parallelism, ... The state of these components is not architectural (i.e. the result of an ordinary application does not depend on it), it is also volatile and cannot be directly monitored by the user. Every invocation of the operating system modifies thousands of these binary volatile states. * Cryptographically secure pseudo-random number generator (CSPRNGD): block cipher AES-128 working in the counter mode based Deterministic Random Bit Generator as defined by NIST SP800-90 document * Run-time random number statistical testing and verification as defined by FIPS PUB 140-2 * Monobit test * Poker test * Runs test * Long run test * Continuous run test %package devel Summary: Headers and shared development libraries for the csprng Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Headers and shared development libraries for the cryptographically secure pseudo-random number generator %prep %setup -q %build %configure make %{?_smp_mflags} %check make check %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALL="install -p" ##Install systemd service file mkdir -p %{buildroot}%{_unitdir} install -p -m644 %{SOURCE1} %{buildroot}%{_unitdir}/ # We don't ship .la files. rm -rf %{buildroot}%{_libdir}/libcsprng.a %{buildroot}%{_libdir}/libcsprng.la # TestU01_raw_stdin_input_with_log requires non-free TestU01 package rm -rf %{buildroot}%{_bindir}/TestU01_raw_stdin_input_with_log rm -rf %{buildroot}%{_mandir}/man1/TestU01_raw_stdin_input_with_log.1* #Remove debug programs rm -rf %{buildroot}%{_bindir}/ctr_drbg_test rm -rf %{buildroot}%{_bindir}/*main %clean rm -rf %{buildroot} %post /sbin/ldconfig %if 0%{?systemd_post:1} %systemd_post csprngd.service %else if [ $1 = 1 ]; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %endif %preun %if 0%{?systemd_preun:1} %systemd_preun csprngd.service %else if [ $1 = 0 ]; then # Package removal, not upgrade /bin/systemctl --no-reload disable csprngd.service >/dev/null 2>&1 || : /bin/systemctl stop csprngd.service >/dev/null 2>&1 || : fi %endif %postun /sbin/ldconfig %if 0%{?systemd_postun_with_restart:1} %systemd_postun_with_restart csprngd.service %else /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ]; then # Package upgrade, not uninstall /bin/systemctl try-restart csprngd.service >/dev/null 2>&1 || : fi %endif %files %defattr(-, root, root, -) %{_mandir}/man8/csprngd.8* %{_mandir}/man1/csprng-generate.1* %{_libdir}/libcsprng*so.* %{_bindir}/csprng-generate %{_sbindir}/csprngd %{_unitdir}/csprngd.service %doc COPYING README ChangeLog AUTHORS %files devel %defattr(-, root, root, -) %{_includedir}/%{name}/* %{_libdir}/*.so #Copy example programs to the doc directory %doc test/*main.c %changelog * Fri Jan 4 2013 Jirka Hladky - 1.1.3-0 - Update to the version 1.1.3 * Mon Dec 31 2012 Jirka Hladky - 1.1.2-0 - Update to the version 1.1.2 * Thu Nov 22 2012 Jirka Hladky - 1.1.1-0 - Initial build