Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document PGP, RAM Disks, and Symmetric Encryption #107

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Conversation

kj4ezj
Copy link
Contributor

@kj4ezj kj4ezj commented Sep 26, 2024

This pull request submits my personal notes on using PGP for asymmetric encryption, RAM disks to work with secrets, as well as symmetric encryption. We have been using PGP to share secrets, I have been using a RAM disk to work with these secrets, and the symmetric encryption is useful to store secrets.

@kj4ezj kj4ezj added documentation Improvements or additions to documentation DevOps Unify development and operations practices to shorten systems engineering lifecycles labels Sep 26, 2024
Copy link
Member

@spoonincode spoonincode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

gpg --list-keys
```

### Encrypt a Message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple other useful tips for basic encryption that aren't mentioned in here:

  1. It's possible to encrypt a single message to multiple recipients.
  2. It's possible to sign and encrypt at the same time, to provide some authenticity on where the encrypted message came from.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both added, with signing now being the default in my examples as it is good practice.

Put a file there so you can tell whether or not a RAM disk is mounted.
```bash
echo 'WARNING: If you can see this, there is currently no RAM disk mounted!' > /mnt/ram/STOP.txt
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively what I like to do is remove permissions from the empty directory that will be the mount point. That will prevent reading or writing or even looking in to the directory until something is mounted there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then how do you know the mount point exists?

Can you please provide an example, if you want me to add it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to add it.

Basically something like

sudo mkdir /mnt/ram
sudo chmod 0600 /mnt/ram

Now it's impossible (non-root) to ls /mnt/ram or touch /mnt/ram/foobar. So you can't accidentally use it when there is nothing mounted there. But it's still possible to mount something at /mnt/ram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Unify development and operations practices to shorten systems engineering lifecycles documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants