Reader small image

You're reading from  BeagleBone for Secret Agents

Product typeBook
Published inSep 2014
PublisherPackt
ISBN-139781783986040
Edition1st Edition
Right arrow
Author (1)
Joshua Datko
Joshua Datko
author image
Joshua Datko

Josh Datko is the founder of Cryptotronix, LLC, an open source hardware company that specializes in embedded, cryptographic electronics. He graduated with distinction from the US Naval Academy with a Bachelor's of Science in Computer Science and then served 10 years in the Navy, both actively and as a reserve submarine officer. He has been deployed to locations worldwide including Afghanistan in support of Operation Enduring Freedom. In 2014, Josh presented at both the HOPE and DEF CON conferences. He completed his Master's of Science in Computer Science, with a focus on security and networking, from Drexel University.
Read more about Joshua Datko

Right arrow

Unlocking your key at startup


Finally, we need to automate this process. When the BBB boots, we want it to collect the code, extend the PCR, and unwrap the GPG keys so that they are ready to use. We'll make an init.d script that will handle this, but we still need to deal with the GPG key. We don't want an unwrapped GPG key lying around the disk, even if it is protected with a password. Instead, we'll keep the GPG keys on a ramfs, which will never touch persistent storage.

To create the ramfs, add the following to /etc/fstab:

ramfs    /mnt/ramdisk ramfs nodev,nosuid,noexec,nodiratime,size=1M,uid=1000,gid=1002   0 0

Be sure to replace your uid and gid with the appropriate values for your user. This can be obtained by running the id command. Either reboot or run mount -a to reload the fstab. Since GPG expects the secring.gpg to live in ~/.gnupg/secring.gpg, we'll create a link from there to the ramdisk. Create the following symlink:

ln -s /mnt/ramdisk/secring.gpg ~/.gnupg/secring.gpg

Now, we...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
BeagleBone for Secret Agents
Published in: Sep 2014Publisher: PacktISBN-13: 9781783986040

Author (1)

author image
Joshua Datko

Josh Datko is the founder of Cryptotronix, LLC, an open source hardware company that specializes in embedded, cryptographic electronics. He graduated with distinction from the US Naval Academy with a Bachelor's of Science in Computer Science and then served 10 years in the Navy, both actively and as a reserve submarine officer. He has been deployed to locations worldwide including Afghanistan in support of Operation Enduring Freedom. In 2014, Josh presented at both the HOPE and DEF CON conferences. He completed his Master's of Science in Computer Science, with a focus on security and networking, from Drexel University.
Read more about Joshua Datko