Selaa lähdekoodia

Beginning of Hashlet install

Bob Mottram 11 vuotta sitten
vanhempi
commit
c33325de00
2 muutettua tiedostoa jossa 95 lisäystä ja 27 poistoa
  1. 95
    27
      beaglebone.txt
  2. BIN
      images/hashlet_installed.jpg

+ 95
- 27
beaglebone.txt Näytä tiedosto

@@ -17,7 +17,7 @@ Copyright (C)  2014  Bob Mottram
17 17
 
18 18
 Permission is granted to copy, distribute and/or modify this document under the terms of the [[https://gnu.org/licenses/fdl.html][GNU Free Documentation License]], Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
19 19
 
20
-Source for this web site in [[https://en.wikipedia.org/wiki/Org-mode][Emacs org-mode]] format is available [[/beaglebone.txt][here]].  Comments or patches may be submitted via [[https://github.com/bashrc/freedombone][Github]].
20
+Source for this web site in [[https://en.wikipedia.org/wiki/Org-mode][Emacs org-mode]] format is available [[/beaglebone.txt][here]]. Comments or patches may be submitted via [[https://github.com/bashrc/freedombone][Github]].
21 21
 #+END_CENTER
22 22
 
23 23
 * Introduction
@@ -113,7 +113,7 @@ Verify it.
113 113
 
114 114
 #+BEGIN_SRC: bash
115 115
 sha256sum debian-7.2-console-armhf-2013-11-15.tar.xz
116
-262ea96d6bff530ad545e001eb2aa50b26a999c02f0c0e2e5f8536edf21c973a  debian-7.2-console-armhf-2013-11-15.tar.xz
116
+262ea96d6bff530ad545e001eb2aa50b26a999c02f0c0e2e5f8536edf21c973a debian-7.2-console-armhf-2013-11-15.tar.xz
117 117
 #+END_SRC
118 118
 
119 119
 Uncompress it.
@@ -251,7 +251,7 @@ nameserver 85.214.20.141
251 251
 
252 252
 CTRL-O followed by ENTER to save, then CTRL-X to exit.
253 253
 
254
-Now disconnect the BBB from your computer and plug it into the router.  You'll need an ethernet patch cable and you may also need a 5V/1A power supply for the BBB.
254
+Now disconnect the BBB from your computer and plug it into the router. You'll need an ethernet patch cable and you may also need a 5V/1A power supply for the BBB.
255 255
 
256 256
 If you go to the web administration screen for your internet router (often it's on 192.168.2.1 or 192.168.1.254) then after a few minutes you should see the BBB appear on the network.  It's name will be "arm".
257 257
 
@@ -320,7 +320,7 @@ Append the following line:
320 320
 
321 321
 Then save and exit.
322 322
 
323
-To verify that the swapfile is accessilble type /top/ and look for the line which begins with "KiB Swap".  Probably there will be zero bytes used, but this might be non-zero when the system is under some load (for example getting a lot of web views or being crawled by a search engine).  CTRL-C exits from the /top/ command.
323
+To verify that the swapfile is accessilble type /top/ and look for the line which begins with "KiB Swap".  Probably there will be zero bytes used, but this might be non-zero when the system is under some load (for example getting a lot of web views or being crawled by a search engine). CTRL-C exits from the /top/ command.
324 324
 
325 325
 ** Enable backports
326 326
 
@@ -457,8 +457,75 @@ rngtest: input channel speed: (min=3.104; avg=26.015; max=18.626)Gibits/s
457 457
 rngtest: FIPS tests speed: (min=160.281; avg=165.696; max=168.792)Mibits/s
458 458
 rngtest: Program run time: 115987 microseconds
459 459
 #+END_SRC
460
-*** Additional addons
461
-At the time of writing there is also some hardware called [[http://beagleboard.org/project/CryptoCape/][cryptocape]] being developed, with the intention of adding extra random number generation capabilities to the BBB.
460
+*** Cryptotronix Hashlet
461
+#+BEGIN_VERSE
462
+/One must acknowledge with cryptography no amount of violence will ever solve a math problem./
463
+
464
+-- Jacob Appelbaum
465
+#+END_VERSE
466
+
467
+An optional extra is the [[http://cryptotronix.com/products/hashlet/][Cryptotronix Hashlet]] which also has hardware random number generation capability via the [[Atmel-8740-CryptoAuth-ATSHA204-Datasheet.pdf][Atmel ATSHA204]] chip.
468
+
469
+Install the hashlet [[images/hashlet_installed.jpg][like this]] on the BBB, then download the source code.
470
+
471
+#+BEGIN_SRC: bash
472
+cd /tmp
473
+wget http://freedombone.uk.to/hashlet-1.0.0.tar.gz
474
+wget http://freedombone.uk.to/hashlet-1.0.0.tar.gz.sig
475
+#+END_SRC
476
+
477
+Install some dependencies.
478
+
479
+#+BEGIN_SRC: bash
480
+apt-get install gnupg build-essential libgcrypt11-dev
481
+#+END_SRC
482
+
483
+Verify it.
484
+
485
+#+BEGIN_SRC: bash
486
+gpg --verify hashlet-1.0.0.tar.gz.sig
487
+#+END_SRC
488
+
489
+The main parts of the verification to check are:
490
+
491
+#+BEGIN_SRC: bash
492
+gpg: Signature made Fri 07 Feb 2014 23:22:37 GMT using RSA key ID 81CD647A
493
+gpg: requesting key 81CD647A from hkp server keys.gnupg.net
494
+gpg: key BD2EDEA6: public key "Joshua Brian Datko <jbd@cryptotronix.com>" imported
495
+
496
+gpg: Good signature from "Joshua Brian Datko <jbd@cryptotronix.com>"
497
+#+END_SRC
498
+
499
+Now install the driver.
500
+
501
+#+BEGIN_SRC: bash
502
+tar -xzvf hashlet-1.0.0.tar.gz
503
+cd hashlet-1.0.0
504
+chmod o+rw /dev/i2c*
505
+./configure
506
+make
507
+make check
508
+make install
509
+#+END_SRC
510
+
511
+To check the initial state of the device:
512
+
513
+#+BEGIN_SRC: bash
514
+hashlet --bus=/dev/i2c-2 state
515
+#+END_SRC
516
+
517
+It should return the message "/Factory/".  This is an indication that the hardware hasn't been tampered with by [[https://en.wikipedia.org/wiki/Tailored_Access_Operations][TAO]] or other shady outfits in transit.  If /i2c-2/ fails then try /i2c-1/ or /i2c-0/.
518
+
519
+#+BEGIN_SRC: bash
520
+hashlet --bus=/dev/i2c-2 personalize
521
+#+END_SRC
522
+
523
+Nothing should be returned by this command, but a file called ~/.hashlet will be generate which is the private key of the device.  To make sure it's only accessible by the root user:
524
+
525
+#+BEGIN_SRC: bash
526
+chmod 400 ~/.hashlet
527
+#+END_SRC
528
+
462 529
 ** Alter ssh configuration
463 530
 
464 531
 Altering the ssh configuration will make it a little more secure than the standard Debian settings.
@@ -1942,7 +2009,7 @@ a2enmod rewrite
1942 2009
 a2enmod headers
1943 2010
 #+END_SRC
1944 2011
 
1945
-Ensure that "NameVirtualHost *:443" is added to /etc/apache2/ports.conf.  It should look something like the following:
2012
+Ensure that "NameVirtualHost *:443" is added to /etc/apache2/ports.conf. It should look something like the following:
1946 2013
 
1947 2014
 #+BEGIN_SRC: bash
1948 2015
 NameVirtualHost *:80
@@ -2225,7 +2292,7 @@ Verify it.
2225 2292
 
2226 2293
 #+BEGIN_SRC: bash
2227 2294
 sha256sum roundcubemail.tar.gz
2228
-e8a311b22a8e1f70abb72ed9551cc9233cf6c5221f1eebf1ae64974117e3148b  roundcubemail.tar.gz
2295
+e8a311b22a8e1f70abb72ed9551cc9233cf6c5221f1eebf1ae64974117e3148b roundcubemail.tar.gz
2229 2296
 #+END_SRC
2230 2297
 
2231 2298
 Extract the files.
@@ -2270,7 +2337,7 @@ Save and exit, then restart Apache.
2270 2337
 service apache2 restart
2271 2338
 #+END_SRC
2272 2339
 
2273
-Now with a browser visit https://mydomainname.com/mail/installer.  Scroll down and click "next".  Give your webmail site a product name.
2340
+Now with a browser visit https://mydomainname.com/mail/installer. Scroll down and click "next".  Give your webmail site a product name.
2274 2341
 
2275 2342
 The *spellcheck_engine* option being limited to Google is slightly concerning in terms of privacy and security, but seems not to be implemented.
2276 2343
 
@@ -2318,9 +2385,9 @@ rm -rf /var/www/$HOSTNAME/htdocs/mail/installer
2318 2385
 
2319 2386
 Now with a browser navigate to https://mydomainname.com/mail and log in.
2320 2387
 
2321
-You'll notice that you may not be able to see any mailing list folders which you may have created earlier using the /mailinglistrule/ script.  To make folders visible click on the cog-like settings icon at the bottom left of the screen then select *manage folders*.  You will then be able to select which folders you wish to become visible.  Make sure that the *Sent*, *spam* and *ham* folders are selected.
2388
+You'll notice that you may not be able to see any mailing list folders which you may have created earlier using the /mailinglistrule/ script. To make folders visible click on the cog-like settings icon at the bottom left of the screen then select *manage folders*.  You will then be able to select which folders you wish to become visible.  Make sure that the *Sent*, *spam* and *ham* folders are selected.
2322 2389
 
2323
-Click on the *Mail* icon to go back to your main mail screen then click on the *Settings* icon at the top right of the screen and select *special folders*. Set *Junk* to *spam* then click the save button.  Also select *identities* and make sure that your email address is correct.
2390
+Click on the *Mail* icon to go back to your main mail screen then click on the *Settings* icon at the top right of the screen and select *special folders*. Set *Junk* to *spam* then click the save button. Also select *identities* and make sure that your email address is correct.
2324 2391
 
2325 2392
 *** Thunderbird
2326 2393
 
@@ -2576,7 +2643,7 @@ Then save and exit.
2576 2643
 -- Nick Cohen
2577 2644
 #+END_VERSE
2578 2645
 
2579
-Wordpress is the most popular blogging platform, but in practice I found it to be high maintenance with frequent security updates and breakages.  More practical for a home server is Flatpress.  Flatpress doesn't use a MySql database, just text files, and so is easy to relocate or reinstall.
2646
+Wordpress is the most popular blogging platform, but in practice I found it to be high maintenance with frequent security updates and breakages. More practical for a home server is Flatpress.  Flatpress doesn't use a MySql database, just text files, and so is easy to relocate or reinstall.
2580 2647
 
2581 2648
 See the [[Setting up a web site]] section of this document for details of how to configure the web server for your blog's domain.
2582 2649
 
@@ -2591,7 +2658,7 @@ Verify the download:
2591 2658
 
2592 2659
 #+BEGIN_SRC: bash
2593 2660
 sha256sum flatpress.tar.gz
2594
-6312a49aab5aabd6371518dcaf081f489dff04d001bc34b4fe3f2a81170bbd4e  flatpress.tar.gz
2661
+6312a49aab5aabd6371518dcaf081f489dff04d001bc34b4fe3f2a81170bbd4e flatpress.tar.gz
2595 2662
 #+END_SRC
2596 2663
 
2597 2664
 Extract and install it.
@@ -2698,7 +2765,7 @@ Verify it.
2698 2765
 
2699 2766
 #+BEGIN_SRC: bash
2700 2767
 sha256sum hybserv_1.9.4-1_armhf.deb
2701
-41bf4eb6e24c87610a80bc14db1103a57484835510eea7e4ba9709c523318615  hybserv_1.9.4-1_armhf.deb
2768
+41bf4eb6e24c87610a80bc14db1103a57484835510eea7e4ba9709c523318615 hybserv_1.9.4-1_armhf.deb
2702 2769
 #+END_SRC
2703 2770
 
2704 2771
 Install it.
@@ -3118,7 +3185,7 @@ openssl genpkey -paramfile /etc/ssl/private/xmpp.pem -out /etc/ssl/private/xmpp.
3118 3185
 openssl req -new -x509 -key /etc/ssl/private/xmpp.key -out /etc/ssl/certs/xmpp.crt -days 3650
3119 3186
 #+END_SRC
3120 3187
 
3121
-The above uses a Diffie-Hellman elliptic curve (ECDH P-256) algorithm.  It is apparent that amongst crypographers there are differences of opinion about the security of elliptic curves, so if you prefer there is also a more traditional RSA way to generate an SSL certificate:
3188
+The above uses a Diffie-Hellman elliptic curve (ECDH P-256) algorithm. It is apparent that amongst crypographers there are differences of opinion about the security of elliptic curves, so if you prefer there is also a more traditional RSA way to generate an SSL certificate:
3122 3189
 
3123 3190
 #+BEGIN_SRC: bash
3124 3191
 openssl genrsa -out /etc/ssl/private/xmpp.key 4096
@@ -3220,7 +3287,7 @@ Jitsi can be downloaded from https://jitsi.org/
3220 3287
 
3221 3288
 On your desktop/laptop open Jitsi and select *Options* from the *Tools* menu.
3222 3289
 
3223
-Click *Add* to add a new user, then enter the Jabber ID which you previously specified with /prosodyctl/ when setting up the XMPP server.  Close and then you should notice that your status is "Online" (or if not then you should be able to set it to online).
3290
+Click *Add* to add a new user, then enter the Jabber ID which you previously specified with /prosodyctl/ when setting up the XMPP server. Close and then you should notice that your status is "Online" (or if not then you should be able to set it to online).
3224 3291
 
3225 3292
 From the *File* menu you can add contacts, then select the chat icon to begin a chat.  Click on the lock icon on the right hand side and this will initiate an authentication procedure in which you can specify a question and answer to verify the identity of the person you're communicating with.  Once authentication is complete then you'll be chating using OTR, which provides an additional layer of security.
3226 3293
 
@@ -3469,7 +3536,7 @@ Under the *themes* section select a few themes, including mobile themes which ar
3469 3536
 
3470 3537
 Under the *site* section give your Friendica node a name other than "/my friend network/", you can change the icon and banner text and set the default mobile theme typically to /frost-mobile/.  If you don't want your node to host a lot of accounts for people you don't know then you may want to set the register policy to "/requires approval/".  For security it's probably a good idea only to host accounts for people who you actually know, rather than random strangers.  Also be aware that the Beaglebone does not have a great deal of computational power or bandwidth and will not function well if there are hundreds of users using your node.  If you're not federating with Diaspora or other sites then you may wish to select "/only allow Friendica contacts/".  That improves the security of the system, since communication between Friendica nodes is always encrypted separately and in addition to the usual SSL encryption layer - which makes life interesting for the Surveillance State and at least keeps those cryptanalysts employed.
3471 3538
 
3472
-It's probably a good idea to enable "/private posts by default for new users/" and also "/don't include post content in email notifications/".  Since traditional email isn't a secure system and is easily vulnerable to attack by systems such as [[https://en.wikipedia.org/wiki/XKeyscore][Xkeyscore]].
3539
+It's probably a good idea to enable "/private posts by default for new users/" and also "/don't include post content in email notifications/". Since traditional email isn't a secure system and is easily vulnerable to attack by systems such as [[https://en.wikipedia.org/wiki/XKeyscore][Xkeyscore]].
3473 3540
 
3474 3541
 ***** Settings
3475 3542
 Each user has their own customisable settings, typically available either via an icon or by an entry on a drop down menu.
@@ -3542,7 +3609,7 @@ Verify it.
3542 3609
 
3543 3610
 #+BEGIN_SRC: bash
3544 3611
 sha256sum movim.tar.gz
3545
-2740ddbedf6cefcc2934759374376643b6cdea4fb7f944ec25098a6868cb499e  movim.tar.gz
3612
+2740ddbedf6cefcc2934759374376643b6cdea4fb7f944ec25098a6868cb499e movim.tar.gz
3546 3613
 #+END_SRC
3547 3614
 
3548 3615
 Install it.
@@ -3591,7 +3658,7 @@ Click on /Database Settings/ and alter the MySql movim database username to /mov
3591 3658
 
3592 3659
 Click /Submit/ followed by /Resend/.  If you get a lot of orange warnings about database fields being created then hit /Submit/ again until you see "Movim database is up to date".
3593 3660
 
3594
-If everything on all three tabs looks green then you are ready to go.  Click on the Movim logo at the top left and then log in with your Jabber ID (JID).
3661
+If everything on all three tabs looks green then you are ready to go. Click on the Movim logo at the top left and then log in with your Jabber ID (JID).
3595 3662
 
3596 3663
 *** Red Matrix
3597 3664
 **** Introduction
@@ -3989,7 +4056,7 @@ Verify the download:
3989 4056
 
3990 4057
 #+BEGIN_SRC: bash
3991 4058
 sha256sum geomyidae-current.tgz
3992
-162f55ab059ab0a9be8e840497795293bbd51c34b1f4564dcdf3f0ddd5c0db31  geomyidae-current.tgz
4059
+162f55ab059ab0a9be8e840497795293bbd51c34b1f4564dcdf3f0ddd5c0db31 geomyidae-current.tgz
3993 4060
 #+END_SRC
3994 4061
 
3995 4062
 Then extract and install it.
@@ -4407,7 +4474,7 @@ Verify the download:
4407 4474
 
4408 4475
 #+BEGIN_SRC: bash
4409 4476
 sha256sum owncloud.tar.bz2
4410
-92b53fdfa7c4165b83dd2f8447f63928454a5815d08ff2d6165dd1a8969ecbe1  owncloud.tar.bz2
4477
+92b53fdfa7c4165b83dd2f8447f63928454a5815d08ff2d6165dd1a8969ecbe1 owncloud.tar.bz2
4411 4478
 #+END_SRC
4412 4479
 
4413 4480
 Extract the archive.  This may take a couple of minutes, so don't be alarmed that the system has crashed.
@@ -4469,7 +4536,7 @@ Verify it.
4469 4536
 
4470 4537
 #+BEGIN_SRC: bash
4471 4538
 sha256sum dokuwiki.tgz
4472
-6b126f90979463d9ddaa74acc6f96aa230cfdc789946f241c3646086d9574be8  dokuwiki.tgz
4539
+6b126f90979463d9ddaa74acc6f96aa230cfdc789946f241c3646086d9574be8 dokuwiki.tgz
4473 4540
 #+END_SRC
4474 4541
 
4475 4542
 Then extract and install it.
@@ -4692,7 +4759,7 @@ webm    video/webm
4692 4759
 
4693 4760
 Save and exit.
4694 4761
 
4695
-If you need to be able to upload large files to the wiki then edit */etc/php5/apache2/php.ini* and set *upload_max_filesize* accordingly.  If the directory */etc/php5/apache2* doesn't exist then you will need to install the package *libapache2-mod-php5*.
4762
+If you need to be able to upload large files to the wiki then edit */etc/php5/apache2/php.ini* and set *upload_max_filesize* accordingly. If the directory */etc/php5/apache2* doesn't exist then you will need to install the package *libapache2-mod-php5*.
4696 4763
 
4697 4764
 Now you can visit your wiki and begin editing.
4698 4765
 
@@ -5365,7 +5432,7 @@ A disadvantage with encrypted mailing lists which use the conventional email sys
5365 5432
 
5366 5433
 An alternative is to use a decentralised mailing list, implemented using Bitmessage.  On your local machine (not the BBB) you can make a private mailing list which is difficult to censor and where there is no single point of failure.  This type of mailing list is known as a "/chan/".
5367 5434
 
5368
-With Bitmessage if any one computer goes offline then the conversation can still keep going since there is no central mailing list server.  Bitmessages are also encrypted with public/private key pairs and the manner in which the system operates makes it very difficult for the surveillance apparatus to exfiltrate the social graph of list users.
5435
+With Bitmessage if any one computer goes offline then the conversation can still keep going since there is no central mailing list server. Bitmessages are also encrypted with public/private key pairs and the manner in which the system operates makes it very difficult for the surveillance apparatus to exfiltrate the social graph of list users.
5369 5436
 
5370 5437
 On a Debian based system:
5371 5438
 
@@ -5415,7 +5482,7 @@ Generate a key pair:
5415 5482
 convergence gencert
5416 5483
 #+END_SRC
5417 5484
 
5418
-When asked for a challenge password just hit *Enter* a couple of times.  Then move the key pair to the appropriate directories as follows.
5485
+When asked for a challenge password just hit *Enter* a couple of times. Then move the key pair to the appropriate directories as follows.
5419 5486
 
5420 5487
 #+BEGIN_SRC: bash
5421 5488
 mv mynotary.key /etc/ssl/private
@@ -5649,7 +5716,7 @@ Change the ssl setting from *always* to *sometimes*, hten save and exit.
5649 5716
 
5650 5717
 So, you're now microblogging on the open web, with no companies in the middle.  Congratulations!  To find some other people to connect to you can try searching other nodes listed at http://gnu.io/try/
5651 5718
 
5652
-When following other GNU Social users enter the URL of your profile.  For example, https://mygnusocialdomain/myusername
5719
+When following other GNU Social users enter the URL of your profile. For example, https://mygnusocialdomain/myusername
5653 5720
 
5654 5721
 ** Install Mediagoblin
5655 5722
 
@@ -5664,7 +5731,7 @@ For a mediagoblin site it is recommended to use a separate domain/subdomain, so
5664 5731
 Install some dependencies.
5665 5732
 
5666 5733
 #+BEGIN_SRC: bash
5667
-apt-get install git-core python python-dev python-lxml python-imaging python-virtualenv python-gst0.10 libjpeg8-dev sqlite3 libapache2-mod-fcgid
5734
+apt-get install git-core python python-dev python-lxml python-imaging python-virtualenv python-gst0.10 libjpeg8-dev sqlite3 libapache2-mod-fcgid gstreamer0.10-plugins-base gstreamer0.10-plugins-bad gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg python-numpy python-scipy libsndfile1-dev
5668 5735
 #+END_SRC
5669 5736
 
5670 5737
 Create a user, replacing /mymediagoblindomain/ with the domain name for your mediagoblin site.
@@ -5705,6 +5772,7 @@ Change *email_sender_address* to your email address and set *email_debug_mode* t
5705 5772
 Then save and exit.
5706 5773
 
5707 5774
 #+BEGIN_SRC: bash
5775
+./bin/pip install scikits.audiolab
5708 5776
 ./bin/gmg dbupdate
5709 5777
 exit # to go back to the root user
5710 5778
 emacs /etc/init.d/mediagoblin

BIN
images/hashlet_installed.jpg Näytä tiedosto