fix permissions for .deb packages & update README

This commit is contained in:
Manuel Domke
2018-10-04 12:49:39 +02:00
parent 9af2987760
commit 2a5be01ffb
2 changed files with 70 additions and 52 deletions

View File

@@ -1,51 +1,44 @@
Compiling the Driver for Windows Releases
--------------------------------
I compiled infnoise-win.exe using VisualStudio 2013 using Windows 7. I downloaded the
FTD2xx drivers from FTDI. Pipes seem almost entirely broken in Windows, so the Windows
version requires out output file to be specified on the command line. In a cmd window,
you can type
infnoise-win foo
and let it run for a while until you have as much random data in foo as you need.
The VisualStudio project for infnoise is in the infnoise/software/VisualStudio directory.
Using prebuilt packages for Linux
--------------------------------- ---------------------------------
Precompiled binaries can be downloaded from the releases section of the 13-37-org fork: Signed packages of release versions are availabe on [Github](https://github.com/13-37-org/infnoise/releases) and [13-37.org](https://13-37.org/files/).
https://github.com/13-37-org/infnoise/releases
All packages are signed with the same PGP-Key (Key-ID: 0x4E730A3C) used for the repositories below. The packages are signed with the same PGP-Key (Key-ID: `0x4E730A3C`) used for the repositories below.
Full Fingerprint: 71AE 099B 262D C0B4 93E6 EE71 975D C25C 4E73 0A3C. You can also check the Full Fingerprint: `71AE 099B 262D C0B4 93E6 EE71 975D C25C 4E73 0A3C`. You can get the keys on [13-37.org/keys](https://13-37.org/keys) and in the [Crowd Supply campaign](https://crowdsupply.com/13-37/infinite-noise-trng).
fingerprints at 13-37.org/pgp-keys and in the Crowd Supply campaign.
Repositories for Ubuntu, Debian and Raspbian are also available. To add them follow this procedure: Repositories for Ubuntu, Debian and Raspbian are also available. To add them follow this procedure:
$ wget -O 13-37.org-code.asc https://13-37.org/files/pubkey.gpg $ wget -O 13-37.org-code.asc https://13-37.org/files/pubkey.gpg
Verify the keys fingerprint: Verify the keys fingerprint:
# GPG1 # GPG1
$ gpg --with-fingerprints 13-37.org-code.asc $ gpg --with-fingerprints 13-37.org-code.asc
# GPG2: # GPG2:
$ gpg2 --import-options import-show --dry-run --import < 13-37.org-code.asc $ gpg2 --import-options import-show --dry-run --import < 13-37.org-code.asc
$ sudo apt-key add 13-37.org-code.asc $ sudo apt-key add 13-37.org-code.asc
Available for Ubuntu and Debian (x86, x64 and armhf):
$ echo "deb http://repo.13-37.org/ stable main" | sudo tee /etc/apt/sources.list.d/infnoise.list $ echo "deb http://repo.13-37.org/ stable main" | sudo tee /etc/apt/sources.list.d/infnoise.list
$ sudo apt-get update $ sudo apt-get update
$ sudo apt-get install infnoise $ sudo apt-get install infnoise
Connect the Infinite Noise TRNG (if not already) and the service will be started via a udev rule. Connect the Infinite Noise TRNG (if not already) and the service will be started via a udev rule. Check status of driver:
Check status of driver:
$ systemctl status infnoise $ systemctl status infnoise
Compiling the Driver for Linux
Compiling the Driver
------------------------------
It's highly recommended to build from the already released versions, as these have been [tested and verified](https://github.com/13-37-org/infnoise/tree/master/tests/results) extensively. Note that the releases are maintained in the 13-37-org fork of this project.
To switch to a specific tag:
git clone https://github.com/13-37-org/infnoise
git checkout tags/0.3.0
Linux
------------------------------ ------------------------------
The infnoise application reads random data from the Infinite Noise USB key and writes The infnoise application reads random data from the Infinite Noise USB key and writes
@@ -58,7 +51,7 @@ this command:
These include an open source drivers for the FT240X USB chip used on the Infinite Noise These include an open source drivers for the FT240X USB chip used on the Infinite Noise
TRNG. Once this is done, to compile the infnoise program, simply make it: TRNG. Once this is done, to compile the infnoise program, simply make it:
$ make $ make -f Makefile.linux
To run the infnoise application, make sure the Infinite Noise USB stick is To run the infnoise application, make sure the Infinite Noise USB stick is
plugged in, and from a shell, type: plugged in, and from a shell, type:
@@ -73,24 +66,50 @@ Note that there is a newer alpha version of the next release of the libftdi libr
found it runs much slower than the current libftdi1 library in Ubuntu, so I am sticking found it runs much slower than the current libftdi1 library in Ubuntu, so I am sticking
with the stable release for now. with the stable release for now.
MacOS
------------------------------
You'll need to install Xcode and Homebrew before.
brew install libftdi
git clone https://github.com/13-37-org/infnoise
cd infnoise/software
make -f Makefile.macos
The `--dev-random` mode is not implemented for MacOS (yet.)
Windows
-----
I compiled infnoise-win.exe using VisualStudio 2013 using Windows 7. I downloaded the FTD2xx drivers from FTDI. Pipes seem almost entirely broken in Windows, so the Windows version requires out output file to be specified on the command line. In a cmd window, you can type
infnoise-win foo
and let it run for a while until you have as much random data in foo as you need.
The VisualStudio project for infnoise is in the infnoise/software/VisualStudio directory.
There is also a new fork https://github.com/jj1bdx/infnoise-windows compiled with VS2017.
Usage Usage
----- -----
Usage: infnoise [options] Usage: infnoise [options]
Options are: Options are:
--debug - turn on some debug output -D, --debug - turn on some debug output
--dev-random - write entropy to /dev/random instead of stdout -R, --dev-random - write entropy to /dev/random instead of stdout
--raw - do not whiten the output -r, --raw - do not whiten the output
--multiplier <value> - write 256 bits * value for each 512 bits written to the Keccak sponge -m, --multiplier <value> - write 256 bits * value for each 512 bits written to
--no-output - do not write random output data the Keccak sponge. Default of 0 means write all the entropy.
--daemon - run in the background. Output should be redirected to a file or -n, --no-output - do not write random output data
the options should be used with --dev-random. To reduce CPU-usage addition -p, --pidfile <file> - write process ID to file
af entropy is only forced after a minute rather than a second. -d, --daemon - run in the background
--pidfile <filename> - write the process ID to a file. If --daemon is used, it is the ID of the background process. -s, --serial <serial> - use specified device
--serial <serial> - use Infinite Noise TRNG/FT240 with the given serial number (see --list-devices) -l, --list-devices - list available devices
--list-devices - list available devices -v, --version - show version information
-h, --help - this help output
Note: The options --daemon and --pidfile are only implemented in the Linux version. Note: The options --daemon, --dev-random and --pidfile are only implemented in the Linux version.
The windows version is also lacking --list-devices and --serial.
Examples Examples
-------- --------
@@ -210,19 +229,20 @@ random data into /dev/random when the TRNG is plugged in, you can ask Linux to
do this by creating a file in etc/udev/rules.d. do this by creating a file in etc/udev/rules.d.
It relies on the systemd service "infnoise.service" provided under init_scripts, as udev is not designed to start long-running processes. It relies on the systemd service "infnoise.service" provided under init_scripts, as udev is not designed to start long-running processes.
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="infnoise" SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="infnoise"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015" ,TAG+="systemd", ENV{SYSTEMD_WANTS}="infnoise.service" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015" ,TAG+="systemd", ENV{SYSTEMD_WANTS}="infnoise.service"
This also adds a symlink so the device removal can also be reacted on. This also adds a symlink so the device removal can also be reacted on.
I personally run the infnoise tool by hand from a bash shell, typically to test devices like this: I personally run the infnoise tool by hand from a bash shell, typically to test devices like this:
$ sudo ./infnoise --debug --no-output $ sudo ./infnoise --debug --no-output
To avoid having to type 'sudo' each time, I created the following udev rules, To avoid having to type 'sudo' each time, I created the following udev rules,
which worked on my particular Ubuntu 14.04 based laptop: which worked on my particular Ubuntu 14.04 based laptop:
$ cat 30-infnoise.rules $ cat 30-infnoise.rules
SUBSYSTEM=="usb", ATTRS{idProduct}=="6015", ATTRS{idVendor}=="0403", GROUP="dialout", MODE="0664" SUBSYSTEM=="usb", ATTRS{idProduct}=="6015", ATTRS{idVendor}=="0403", GROUP="dialout", MODE="0664"
Note that my username is in the dialout group. Note that my username is in the dialout group.

View File

@@ -30,9 +30,7 @@ if [ ! -e build/usr/sbin/infnoise ] ; then
exit 1; exit 1;
fi fi
# debuild -b -uc -us dpkg --root-owner-group -b build/ infnoise_${VERSION}_${ARCH}.deb
dpkg -b build/ infnoise_${VERSION}_${ARCH}.deb
#debbuild -uc -us
### build infnoise-tools ### ### build infnoise-tools ###
rm -rf build rm -rf build
@@ -56,7 +54,7 @@ cp ../build-scripts/control.debian.tools build/DEBIAN/control
echo "Version: $VERSION" >> build/DEBIAN/control echo "Version: $VERSION" >> build/DEBIAN/control
echo "Architecture: $ARCH" >> build/DEBIAN/control echo "Architecture: $ARCH" >> build/DEBIAN/control
dpkg -b build/ infnoise-tools_${VERSION}_${ARCH}.deb dpkg --root-owner-group -b build/ infnoise-tools_${VERSION}_${ARCH}.deb
rm -rf build rm -rf build
cd .. cd ..
@@ -77,6 +75,6 @@ cp build-scripts/control.debian.lib build/DEBIAN/control
echo "Version: $VERSION" >> build/DEBIAN/control echo "Version: $VERSION" >> build/DEBIAN/control
echo "Architecture: $ARCH" >> build/DEBIAN/control echo "Architecture: $ARCH" >> build/DEBIAN/control
dpkg -b build/ libinfnoise_${VERSION}_${ARCH}.deb dpkg --root-owner-group -b build/ libinfnoise_${VERSION}_${ARCH}.deb
rm -rf build rm -rf build