decryptMeta: Decrypt metadata for a rehashed dataset with GPG, for secure...

Description Usage Arguments Details Value See Also Examples

View source: R/decryptMeta.R

Description

For users who have a GPG keyring with entries for both themselves (sender) and their collaborator (recipient), this function and its counterpart, encryptMeta, allow relatively secure transfer of metadata associated with a rehashed dataset, to keep it within a set of trustworthy individuals until such time as it is appropriate to make public.

Usage

1

Arguments

encrypted

the metadata to decrypt (an object or a .rds file)

Details

There are some important caveats: if recipients are not trustworthy (i.e. if one cannot trust collaborators), this precaution does not offer much in the way of assurance. However, if recipients are trustworthy, this can make brute-force reidentification attacks too costly to be worthwhile, especially if the data is meant for eventual public release at a later date.

Note: this function assumes that sender and recipient have GPG keys available to one another. GPG (Gnu Privacy Guard) is an implementation of PGP (Pretty Good Privacy). PGP is Phil Zimmerman's public-key cryptography scheme (see https://en.wikipedia.org/wiki/Pretty_Good_Privacy), used via the https://cran.r-project.org/web/packages/gpg/gpg R package.

FIXME: make it possible to use a .gpg file for the transport format.

Value

1
         a metadata decoder for `dehash` (or another object)

See Also

encryptMeta

gpg_encrypt

gpg_decrypt

Examples

1
2
3
4
5
6
7
8
data(exampleSE)
rehashed <- rehash(exampleSE)
object <- rehashed$object
encrypted <- encryptMeta(rehashed$meta, recipient="Tim Triche, Jr.")
decrypted <- decryptMeta(encrypted)
identical(decrypted, rehashed$meta)
rehashed <- NULL # no peeking!
dehash(object, decrypted) 

trichelab/rehash documentation built on Nov. 5, 2019, 10:58 a.m.