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

tmpfs for key generation #145

Closed
defunctio opened this issue Dec 10, 2016 · 3 comments · Fixed by #1496
Closed

tmpfs for key generation #145

defunctio opened this issue Dec 10, 2016 · 3 comments · Fixed by #1496

Comments

@defunctio
Copy link
Contributor

defunctio commented Dec 10, 2016

In my mind Algo is not really designed to persist. When you spin it up when you need it and tear it down when you are done. When you need it again you spin up a new instance, with new keys.

If everyone agrees that statement aligns with the goals of Algo I propose we use tmpfs as a memory resident only storage of sensitive keys as a layer of protection against postmortem forensics analysis that could be used for key recovery if the image were ever recovered. While this may be an unlikely event, the level of effort to implement is minimal.

@FiloSottile
Copy link

If the keys move to the client side to fix #75, you might want this for OS X

#!/bin/sh
ramfs_size_mb=$2
mount_point=$1

mkramdisk() {
  ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512))
  ramdisk_dev=`hdid -nomount ram://${ramfs_size_sectors}`

  newfs_hfs -v 'ram disk' ${ramdisk_dev}
  mkdir -p ${mount_point}
  mount -o noatime -t hfs ${ramdisk_dev} ${mount_point}

  echo "remove with:"
  echo "umount ${mount_point}"
  echo "diskutil eject ${ramdisk_dev}"
}

mkramdisk

@mrphs
Copy link
Contributor

mrphs commented Dec 18, 2016

In my mind Algo is not really designed to persist. When you spin it up when you need it and tear it down when you are done. When you need it again you spin up a new instance, with new keys.

Well, that only works for single user instances. If you continue to need it on a daily basis and have a bunch of users, you just keep the one you brought up in the first place. Spinning up new instances and re-sharing the config files makes it inconvenient.

@dguido dguido added this to the 1.1 milestone Dec 30, 2016
@dguido
Copy link
Member

dguido commented Dec 31, 2016

Since we're moving keys to the client side, this should become a config option. The default behavior will be to generate keys in a tmpfs on the client and throw them away when done. If the user says they need the keys for later, then we will copy the keys out of the tmpfs before destroying it.

@dguido dguido changed the title tmpfs for key storage tmpfs for key generation Dec 31, 2016
@jackivanov jackivanov removed this from the 1.1 milestone Mar 12, 2019
@jackivanov jackivanov modified the milestones: 1.2, 1.1 Mar 12, 2019
@jackivanov jackivanov added the 1.1 label Mar 19, 2019
@jackivanov jackivanov mentioned this issue Jun 21, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants