Crypto-mail-safe

From Technologia Incognita
Revision as of 16:20, 27 September 2013 by Justa (talk | contribs)
Jump to: navigation, search

Introduction

At Techinc we end up having to deal with having to store Identification-documentation in a secure manner because of requirements that Urban Resort puts on us for the availability of RFID-fobs to open the door to the building.

As such, we've looked at a number of options on how to deal with these sensitive documents; ranging from storing them in a safe at the space, at someonebody's home, in a bank-vault, etc.

The challenges are several. They include, but are not limited to:

  • Acquisition: how do we make the process of getting the document to us as secure as possible
  • Storage: How do we store it so that only authorized people entrusted with access can get to it securely
  • Access: How do we implement any kind of access-control that we can verifiably demonstrate is secure/honest towards our members
  • Change of roles: How do we ensure that people who do not need access anymore lose their ability to access these types of documents.

What follows is a proposal from me (User:Justa) to address a number of these issues via a system based on cryptograpy, using mail as transfer-method and crypted image-files as a manner for storage. I will try to explain the theory of operation, it's challenges and it's limitations as honestly as possible.

Outline

The proposed system would use a combination of PGP and [Shamir's Secret Sharing] algorithm to come to an environment that'd function as follows:

  • There would be a 'secure drop-point' email-adress on the techinc-domain, let's call this 'secure@techinc.nl' for convenience
  • The 'secure@techinc.nl' address would have a well-published and verifiable public PGP-key available for people to mail to it.
  • Preferably, it will ONLY accept PGP-encrypted mails, but it could be made to accept (and subsequently process) plain emails as well.

Behind 'secure@techinc.nl' is a script/program that parses incoming mail, verifies that there's an encrypted attachment and proceeds to storing that attachment on disk somewhere, and/or uploading it to dropbox, whatever. Additionally, when receiving a non-encrypted mail, one could choose to EITHER deny the mail and send a refusal-notice to the sender OR proceed to encrypting the contents of the mail with the public key of 'secure@techinc.nl' itself and inform the sender about the action taken.

Additionally, the script should/could keep a log of all the actions it's performed; preferably via mail to a number of admins/board-members in charge of the system's functioning. Possibly also allowing people to admin/moderate incoming mail so as to prevent obvious spam-mails being stored.

At this point, one has:

  • An email-gateway that allows people to securely send crypted data to us
  • A secure way to store the data
  • A transaction-log of where the data came from, who sent it (possibly with PGP-signatures and SMTP-logs)

It has not been mentioned yet, but the PRIVATE key belonging to 'secure@techinc.nl' is stored using the aforementioned 'shamir's secret sharing' algorithm. It exists as a message that's been split up in N parts and given to a number of admins/moderators/boardmembers of which a certain number of M parts are required to provide the full PGP key again.

This would allow you to build a process that'd work as follows (as a suggested procedure/functioning):

  • The Private PGP key has been split over 7 board-members (N=7) with the number of required parts to get to the key set to 3 (M=3).
  • This would allow 3 board-members to get together and get to the key, preventing any one single board-member or two board-members from conspiring together and plundering the store of ID's.
  • The 'M' can be set to 4 or higher, all the way to 7.. but for convenience and continuity reasons this would likely be unwanted.
  • When a request-for-information comes from UR, there will be the need for a committee of (at least) 3 people to agree to the need for complying with the request and to be able to get to the PGP key to decrypt the proper file into plaintext.


Extra considerations

There are a number of 'special situations' that need to be addressed in ways that ensure a reliably secure functioning of this mechanism , as well as a continued capability to trust the system's security. I suggest implementing these by way of specially tailor-made Raspberry PI images as I will explain in the following segments:

Issuing the initial key-parts

There will be the need to create a Private and Public PGP keypair in a way that people can trust that the PRIVATE key is not known to any one person individually. Upon creation, the Public key needs to be published/exported. In contrast, the PRIVATE key needs to be split up into N-segments as soon as possible, after which each of the N people that are entrusted with such a segment should, each individually, have access to only their segment and their segment alone.

I propose to implement that as a special-purpose raspi SD-card image that does the following:

  • Boots a linux-distro
  • Starts a script that asks for the N and M params for the Shamir Secret Sharing algo, as well as the params for the PGP-key creation process
  • Requires some source of (NON NETWORK-based) entropy to be supplied (i suggest mice/keyboards/joysticks)
  • After creation of the PGP key, it will ask for a USB-stick to be inserted; this will get the PUBLIC key on it.
  • After transfer, it will unmount the stick and require a further N USB-sticks to be inserted sequentually, transferring a segment of the PRIVATE key onto it each time, unmounting, waiting for a next stick to be inserted and waiting for a confirmation before continuing.. etc.

At this point, you will have N sticks with N segments of the PGP key, split properly. None of the people involved will have had access to the full private key at any one point. The public key is stored on a seperate stick. The SD-image does not store anything on disk and/or is subsequently erased and/or destroyed (SD-card burned)

Decrypting a file

There will be the need to access a file every now and then when the need arises.

When this happens, M people come together with a USB-stick containing their segments of the PGP key that would enable to decrypt the file. It would not be good to assemble the key on any machine that'll be re-used later; for that would compromise the trust that members should have in the assurance that nobody individually has access to the key alone.

As such I propose to implement this as a special-purpose RasPI SD-card image that does the following:

  • Boots some linux
  • Starts a script that asks for insertion of a USB-stick that contains a crypted file. It asks you to identify the file and copies it to SD-card.
  • It asks an M-number of USB-sticks to be inserted that all contain a segment of the PRIVATE key required to decrypt the file. It might be possible to have the system auto-detect the amount of segments required for it to succesfully get the PRIVATE key. If required, the PRIVATE key is stored ONLY on SD-card, or only in memory-disk.
  • The file is decrypted, a USB stick is asked to write the decrypted file to.
  • The SD-card is destroyed/wiped if required (or it should do PGP activity on MEM-disks only)

Re-issuing keys upon change of admins/board/etc

The