Forum Replies Created
-
AuthorPosts
-
Here is what I am using now- it seemed to survive a reboot and shutdown. I changed the file format of /etc/udev/rules.d/99-TrueRNG.rules to ASCII text (no CRLF).
I set the feed interval to 30. I think it defaults to 60, which seemed to cause problems.
/etc/default/rng-tools
HRNGDEVICE=/dev/TrueRNG RNGDOPTIONS="--fill-watermark=75% --feed-interval=30"
I’m not sure if this is related, but I’m on debian jessie 8.1. I noticed that after I upgraded a few packages yesterday (apt-get upgrade) TrueRNG was broken. Unfortunately, I don’t remember which packages I upgraded.
Here are a few things I noticed:
- systemd complains about “invalid key/value pair” which I think is related to the file format of the rules file. It is ASCII text, with CRLF line terminators. I resaved it as just ASCII text and I’m crossing my fingers. It’s working now after a reboot, but the last time, it took a hour before it gave up/reset.systemd-udevd[17049]: invalid key/value pair in file /etc/udev/rules.d/99-TrueRNG.rules on line 7,starting at character 210 (‘\n’)
(I edited the file a little to try a few things, but the format was unchanged when systemd/udevd threw this error)
I was rebuilding/resizing a filesystem, which I assume is why the last day has been lower than usual. The points where it dropped to zero are where the rng daemon would not start and entropy was 0 or very low. It probably would be higher if I removed rng-tools so that the kernel would have relied on good old fashioned entropy collection.
- This reply was modified 8 years, 10 months ago by gee-one.
Here is the terminal output that shows the two units both contributing to the available entropy. This is running on Debian Wheezy 7.6.
nothing running…
root@localhost# ps ax | grep rngd 12586 pts/5 S+ 0:00 grep rngd
Without hardware assistance, output from /dev/random is pretty slow.
root@localhost# time dd if=/dev/random of=stock bs=16 count=64 iflag=fullblock 64+0 records in 64+0 records out 1024 bytes (1.0 kB) copied, 348.052 s, 0.0 kB/s real 5m48.053s user 0m0.008s sys 0m0.000s
I have two units V1.0 and V2. I tested the output speed directly from /dev/ttyACM* for benchmark purposes. Yes, it appears that output for V1.0 is slightly faster than V2.
root@localhost# ls /dev/ttyACM* -l crw-rw---T 1 root dialout 166, 0 Aug 18 19:41 /dev/ttyACM0 crw-rw---T 1 root dialout 166, 1 Aug 23 18:08 /dev/ttyACM1 root@localhost# time dd if=/dev/ttyACM0 of=ttyAMC0 bs=1k count=10240 iflag=fullblock 10240+0 records in 10240+0 records out 10485760 bytes (10 MB) copied, 208.953 s, 50.2 kB/s real 3m28.955s user 0m0.080s sys 0m1.164s root@localhost# time dd if=/dev/ttyACM1 of=ttyAMC1 bs=1k count=10240 iflag=fullblock 10240+0 records in 10240+0 records out 10485760 bytes (10 MB) copied, 229.817 s, 45.6 kB/s real 3m49.819s user 0m0.096s sys 0m1.308s
I started the first unit (v1.0) and measured output from /dev/random
root@localhost# rngd -r /dev/ttyACM0 -p /var/run/rngd0.pid --fill-watermark=100% --feed-interval=1 root@localhost# time dd if=/dev/random of=true_v1 bs=1k count=10240 iflag=fullblock 10240+0 records in 10240+0 records out 10485760 bytes (10 MB) copied, 208.795 s, 50.2 kB/s real 3m28.796s user 0m0.000s sys 0m2.848s
I left the first unit running and started the second unit (V2), then tested output from /dev/random. The output is the sum of the two units separately.
root@localhost# rngd -r /dev/ttyACM1 -p /var/run/rngd1.pid --fill-watermark=100% --feed-interval=1 root@localhost# time dd if=/dev/random of=true_v1_v2 bs=1k count=10240 iflag=fullblock 10240+0 records in 10240+0 records out 10485760 bytes (10 MB) copied, 109.638 s, 95.6 kB/s real 1m49.639s user 0m0.008s sys 0m2.852s
I received a V2 today and I have a V1.0 as well. I plugged them both in and the output seems to be additive, I.e., I am getting about 95 Kb/s output from /dev/random. I am using version rngd 2-unofficial-mt.14
I set up rngd as follows
rngd -r /dev/ttyACM0 --fill-watermark=90% --feed-interval=1 -p /var/run/rngd0.pid rngd -r /dev/ttyACM1 --fill-watermark=90% --feed-interval=1 -p /var/run/rngd1.pid
I think the important part, besides having different pids, is the fill-watermark flag so that rngd keeps reading from the devices. I suspect you could get more performance with 100%, but this leaves some room for computer’s own entropy source. The feed interval only comes into play when the entropy pool is full.
I’m running some tests now, but I’ll add some output when they are done.
I just received a new V2 today, and ran it through some of its paces. I am not getting that much variation in results. I am on linux and pulled 64M from /dev/ttyAMC1 (I have a V1.0 in /dev/ttyAMC0). I used ent to analyze the byte count.
$ ent -c true2-d.64M Value Char Occurrences Fraction 0 262737 0.003915 1 261696 0.003900 2 261971 0.003904 3 261731 0.003900 4 262129 0.003906 5 261891 0.003903 6 261399 0.003895 7 262226 0.003908 8 262009 0.003904 9 262641 0.003914 10 262745 0.003915 11 261910 0.003903 12 262084 0.003905 13 261890 0.003903 14 262589 0.003913 15 261598 0.003898 16 261646 0.003899 17 262201 0.003907 18 262078 0.003905 19 261423 0.003896 20 261994 0.003904 21 261609 0.003898 22 261860 0.003902 23 262776 0.003916 24 261893 0.003903 25 262981 0.003919 26 262114 0.003906 27 262193 0.003907 28 262189 0.003907 29 261808 0.003901 30 260901 0.003888 31 261621 0.003899 32 261955 0.003903 33 ! 262377 0.003910 34 " 262009 0.003904 35 # 261406 0.003895 36 $ 262077 0.003905 37 % 262730 0.003915 38 & 262175 0.003907 39 ' 262527 0.003912 40 ( 261929 0.003903 41 ) 262344 0.003909 42 * 260944 0.003888 43 + 262077 0.003905 44 , 262244 0.003908 45 - 261416 0.003895 46 . 262570 0.003913 47 / 261889 0.003903 48 0 261547 0.003897 49 1 262411 0.003910 50 2 262164 0.003907 51 3 262497 0.003912 52 4 262601 0.003913 53 5 261805 0.003901 54 6 261278 0.003893 55 7 262042 0.003905 56 8 262377 0.003910 57 9 261656 0.003899 58 : 262322 0.003909 59 ; 262651 0.003914 60 < 262000 0.003904 61 = 262212 0.003907 62 > 261376 0.003895 63 ? 262016 0.003904 64 @ 262925 0.003918 65 A 262124 0.003906 66 B 260942 0.003888 67 C 263001 0.003919 68 D 261776 0.003901 69 E 261872 0.003902 70 F 261472 0.003896 71 G 262514 0.003912 72 H 261916 0.003903 73 I 261875 0.003902 74 J 262615 0.003913 75 K 262731 0.003915 76 L 261961 0.003904 77 M 263507 0.003927 78 N 261971 0.003904 79 O 262851 0.003917 80 P 262297 0.003909 81 Q 261781 0.003901 82 R 262564 0.003913 83 S 262058 0.003905 84 T 262398 0.003910 85 U 262133 0.003906 86 V 261908 0.003903 87 W 261417 0.003895 88 X 261944 0.003903 89 Y 262157 0.003907 90 Z 262178 0.003907 91 [ 261272 0.003893 92 \ 262893 0.003917 93 ] 263210 0.003922 94 ^ 262573 0.003913 95 _ 261595 0.003898 96 ** 262579 0.003913 97 a 262351 0.003909 98 b 261358 0.003895 99 c 261700 0.003900 100 d 262783 0.003916 101 e 262844 0.003917 102 f 262715 0.003915 103 g 261563 0.003898 104 h 262879 0.003917 105 i 261373 0.003895 106 j 261553 0.003898 107 k 262110 0.003906 108 l 261740 0.003900 109 m 261474 0.003896 110 n 263049 0.003920 111 o 262302 0.003909 112 p 262450 0.003911 113 q 261837 0.003902 114 r 262831 0.003917 115 s 262886 0.003917 116 t 262094 0.003906 117 u 262207 0.003907 118 v 262371 0.003910 119 w 261831 0.003902 120 x 262677 0.003914 121 y 262283 0.003908 122 z 262493 0.003912 123 { 261532 0.003897 124 | 262648 0.003914 125 } 261743 0.003900 126 ~ 262630 0.003914 127 262019 0.003904 128 262279 0.003908 129 263019 0.003919 130 262821 0.003916 131 262229 0.003908 132 262176 0.003907 133 262731 0.003915 134 262294 0.003909 135 262586 0.003913 136 262403 0.003910 137 261772 0.003901 138 262268 0.003908 139 262758 0.003915 140 261138 0.003891 141 262274 0.003908 142 262259 0.003908 143 263101 0.003921 144 262499 0.003912 145 262186 0.003907 146 261640 0.003899 147 261478 0.003896 148 261500 0.003897 149 263538 0.003927 150 262180 0.003907 151 262001 0.003904 152 263051 0.003920 153 262019 0.003904 154 261841 0.003902 155 262045 0.003905 156 261095 0.003891 157 262021 0.003904 158 261967 0.003904 159 262750 0.003915 160 262739 0.003915 161 � 262272 0.003908 162 � 261582 0.003898 163 � 261556 0.003898 164 � 261527 0.003897 165 � 262685 0.003914 166 � 262730 0.003915 167 � 261559 0.003898 168 � 262949 0.003918 169 � 262548 0.003912 170 � 261889 0.003903 171 � 262592 0.003913 172 � 261857 0.003902 173 � 262207 0.003907 174 � 261008 0.003889 175 � 261374 0.003895 176 � 263191 0.003922 177 � 262646 0.003914 178 � 262025 0.003905 179 � 261820 0.003901 180 � 262377 0.003910 181 � 262618 0.003913 182 � 261443 0.003896 183 � 262204 0.003907 184 � 263069 0.003920 185 � 261611 0.003898 186 � 262668 0.003914 187 � 262143 0.003906 188 � 262294 0.003909 189 � 262597 0.003913 190 � 261958 0.003904 191 � 261841 0.003902 192 � 262354 0.003909 193 � 262027 0.003905 194 � 263238 0.003923 195 � 261476 0.003896 196 � 261458 0.003896 197 � 261242 0.003893 198 � 262049 0.003905 199 � 262509 0.003912 200 � 262196 0.003907 201 � 261811 0.003901 202 � 261771 0.003901 203 � 262755 0.003915 204 � 261878 0.003902 205 � 261321 0.003894 206 � 261766 0.003901 207 � 262523 0.003912 208 � 262727 0.003915 209 � 261739 0.003900 210 � 262929 0.003918 211 � 263601 0.003928 212 � 262411 0.003910 213 � 262150 0.003906 214 � 262585 0.003913 215 � 262292 0.003909 216 � 261865 0.003902 217 � 261199 0.003892 218 � 261752 0.003900 219 � 262193 0.003907 220 � 261539 0.003897 221 � 262506 0.003912 222 � 262314 0.003909 223 � 262204 0.003907 224 � 262207 0.003907 225 � 262454 0.003911 226 � 262118 0.003906 227 � 263031 0.003920 228 � 261540 0.003897 229 � 262592 0.003913 230 � 261572 0.003898 231 � 261330 0.003894 232 � 261458 0.003896 233 � 261493 0.003897 234 � 261328 0.003894 235 � 262348 0.003909 236 � 262572 0.003913 237 � 261350 0.003894 238 � 261854 0.003902 239 � 262012 0.003904 240 � 262563 0.003913 241 � 262070 0.003905 242 � 262355 0.003909 243 � 261684 0.003899 244 � 262401 0.003910 245 � 262060 0.003905 246 � 263629 0.003928 247 � 261980 0.003904 248 � 263142 0.003921 249 � 261669 0.003899 250 � 261664 0.003899 251 � 262003 0.003904 252 � 262115 0.003906 253 � 261797 0.003901 254 � 261693 0.003900 255 � 262385 0.003910 Total: 67107840 1.000000 Entropy = 7.999997 bits per byte. Optimum compression would reduce the size of this 67107840 byte file by 0 percent. Chi square distribution for 67107840 samples is 271.85, and randomly would exceed this value 25.00 percent of the times. Arithmetic mean value of data bytes is 127.5058 (127.5 = random). Monte Carlo value for Pi is 3.142486124 (error 0.03 percent). Serial correlation coefficient is -0.000081 (totally uncorrelated = 0.0).
-
AuthorPosts