Summary and Schedule
This workshop teaches you how to use gocryptfs — a transparent, file-level encryption tool — to protect restricted research data on the Sagehen HPC cluster. You will learn to create encrypted directories, integrate encryption into SLURM workflows, manage encryption keys safely, and maintain compliance with federal and institutional data protection requirements.
Pomona College HPC Context
This workshop is part of the Pomona College Research Computing Workshop Series for researchers using the Sagehen HPC cluster.
This workshop is MANDATORY for all researchers storing or processing Restricted-tier data on Sagehen. Pomona’s ITS Training and Awareness Policy and NIST SP 800-171 control 3.13.11 require encryption for Controlled Unclassified Information (CUI) at rest.
Prerequisites:
- Workshop 13: HPC Security Orientation (required)
- Workshop 14: Data Classification and Handling (strongly recommended)
- Active Sagehen HPC account (its-hpc@pomona.edu)
- Comfortable with the Unix command line (Workshops 1–2)
For questions or support, contact its-hpc@pomona.edu.
Workshop Structure
The workshop is organized into 17 episodes across five sections:
Section 1 — Why Encrypt? (Episodes 1–3) Regulatory landscape, Pomona’s data classification system, and real-world scenarios.
Section 2 — How gocryptfs Works (Episodes 4–5) Architecture, AES-256-GCM encryption, FUSE filesystem model, and key derivation.
Section 3 — Hands-On Encryption (Episodes 6–9) Planning directories, creating encrypted volumes, mounting workflows, and non-interactive mounting.
Section 4 — SLURM Integration (Episodes 10–12) Decision framework for pre-mount vs. mount-in-script, job script templates, and advanced patterns (arrays, pipelines, GPU jobs).
Section 5 — Key Management and Maintenance (Episodes 13–17) Key backup, password management, lab group management, security best practices, and verification/maintenance routines.
Total estimated time: 4–5 hours (teaching + exercises)
Key Facts
- Encryption: AES-256-GCM (hardware-accelerated on Sagehen)
- Key derivation: scrypt (memory-hard, brute-force resistant)
- Performance overhead: 5–10% CPU, 10–20% I/O typical
- Password requirement: 14+ characters (NIST SP 800-63B)
- No password recovery: Forgotten passwords mean permanently lost data
-
Critical file:
gocryptfs.confmust be backed up — losing it means losing all encrypted data
Acknowledgments
Developed by Andrew Wilson, Director of Research Computing and Digital Scholarship at Pomona College, with Andrei Motchenko, who tested, edited and produced screenshots for the workshop series.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Why Encrypt? Regulations and Risk |
When is data encryption necessary? What are the regulatory requirements? What happens when research data is exposed? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 00h 20m | 2. Pomona’s Data Classification System |
What data requires encryption at Pomona? How do I classify my research data? What does gocryptfs protect against? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 00h 35m | 3. Scenarios and Responsibilities |
What do real-world research scenarios look like? Who is responsible for what in data security? What do I do if I suspect a breach? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 00h 55m | 4. gocryptfs Architecture |
How does gocryptfs work technically? What is the two-directory model? How does FUSE enable transparent encryption? Why is gocryptfs better than alternatives like EncFS? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 01h 15m | 5. Encryption, Performance, and Comparison |
What is AES-256-GCM and why is it secure? How does scrypt key derivation prevent brute-force attacks on your password? How does gocryptfs.conf store the encryption key? What is the performance impact of encryption? Why is gocryptfs better than alternatives? What are the limitations and threat model? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 01h 40m | 6. Planning Your Encrypted Directories |
How do you plan and name your cipher and plain directories? Where should encrypted directories be stored? What storage quota implications does encryption have? How do you check storage usage on BeeGFS? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 02h 05m | 7. Verifying and Managing Encrypted Directories |
What files does gocryptfs create during initialization? How do you verify your encrypted directory is working? What are the correct directory permissions? What are the common mistakes when creating encrypted directories? Why is backing up gocryptfs.conf critical? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 02h 35m | 8. Daily Mount and Unmount Workflow |
How do you mount and unmount gocryptfs directories? What is the daily workflow for encrypted data? Why must plain directories be empty before mounting? What are the security implications of mounted directories? How do you handle “device busy” errors? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 03h 00m | 9. Non-Interactive Mounting and Troubleshooting |
How do you mount gocryptfs non-interactively in SLURM scripts? What are the security tradeoffs between different password methods? What happens to mounts when jobs complete or nodes reboot? What are the common mount errors and how do you fix them? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 03h 20m | 10. SLURM Integration: Decision Framework |
How do you decide between pre-mounting and mount-in-script
approaches? What are the security and performance tradeoffs? How do you handle passwords securely in job scripts? What password handling options are available? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 03h 40m | 11. SLURM Script Templates and Patterns |
What does a production-ready SLURM script look like? How does the trap cleanup pattern work in detail? What storage location should you choose for mounted data? How do different storage locations compare in performance and persistence? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 04h 05m | 12. Advanced SLURM Patterns |
How do you run job arrays with encrypted data? How can you build multi-step pipelines with encrypted workflows? What patterns work for GPU jobs with encrypted data? What error handling strategies prevent common failures? How do you log encrypted workflows responsibly? What does SLURM record about your job? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 04h 35m | 13. Key Backup Strategy |
What are the two critical components you must never lose? What happens if you lose gocryptfs.conf? What does gocryptfs.conf contain and why does every field matter? How do you apply the 3-2-1 backup rule to encryption keys? Where should you store backups of gocryptfs.conf? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 04h 50m | 14. Password Management |
Why is memorizing multiple gocryptfs passwords unreliable? What password manager is recommended and why? How can you create a strong, memorable passphrase? When is it safe to write down passwords? How do you change a gocryptfs password, and what does re-encrypt mean? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 05h 05m | 15. Lab Management and Disaster Recovery |
What procedures should a lab have when a member with encryption access
leaves? How do you plan for succession if a PI becomes unavailable? How do you track multiple encrypted directories in a lab? What automated backup strategies can a lab implement? What are the main disaster recovery scenarios and recovery procedures? What compliance documentation is required for encrypted research data? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 05h 35m | 16. Security Best Practices and Troubleshooting |
What are the 10 essential security habits for gocryptfs? What are the most common mistakes and how do you avoid them? How do you troubleshoot mount problems systematically? What performance optimizations exist and how much do they help? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 05h 55m | 17. Verification, Sharing, and Maintenance |
How do you verify encryption is truly protecting your data? How do you maintain encrypted systems over time? What should you do if you suspect a security incident? How do you safely share encrypted data with collaborators? How do you manage data lifecycle and retention? :::::::::::::::::::::::::::::::::::::::::::::::: |
| Duration: 06h 25m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Prerequisites
Before this workshop, you should have:
- An active Sagehen HPC account (request from its-hpc@pomona.edu if needed)
- Completed Workshop 13: HPC Security Orientation (mandatory)
- Familiarity with the Unix command line (Workshops 1–2)
- Comfort with basic file operations (
mkdir,ls,chmod,cp)
Verify Your HPC Access
Log into Sagehen via OnDemand or SSH and run these checks:
BASH
# Confirm you can log in
ssh <myusername>@sagehen.hpc.pomona.edu
# Check your home directory
pwd
# Expected: /rhome/<myusername>
# Check your lab's storage
ls /bigdata/lab/<labname>
# Replace "labname" with your lab directory name
If you cannot log in, contact its-hpc@pomona.edu before the workshop.
Verify gocryptfs Is Available
BASH
# Check that the module exists
module avail gocryptfs
# Load it
module load gocryptfs
# Verify it works
gocryptfs --version
# Expected: gocryptfs v2.x.x
If the module is not available, email its-hpc@pomona.edu to request installation.
Check Your Storage Quota
You will need at least 10 GB of free space in
/bigdata/lab/<labname> for workshop exercises. If
your lab is near its quota limit, contact its-hpc@pomona.edu to discuss
options.
Prepare a Strong Password
During the workshop you will create an encrypted directory that requires a password. Prepare one in advance:
- Minimum 14 characters (per NIST SP 800-63B)
- Mix of uppercase, lowercase, numbers, and symbols
- Store it in a password manager such as Bitwarden (free) or 1Password
- There is no password recovery — a forgotten password means permanently lost data
Do not write your password on a sticky note, in a plain text file, or in an email draft.
Quick Readiness Check
Run this script to verify everything at once:
BASH
#!/bin/bash
echo "=== gocryptfs Workshop Readiness Check ==="
# Check home directory
echo -n "Home directory: "
if [ -d "$HOME" ]; then echo "OK ($HOME)"; else echo "FAIL"; fi
# Check gocryptfs module
echo -n "gocryptfs module: "
if module avail gocryptfs 2>&1 | grep -q gocryptfs; then
module load gocryptfs
echo "OK ($(gocryptfs --version 2>&1))"
else
echo "FAIL — email its-hpc@pomona.edu"
fi
# Check /bigdata access
echo -n "/bigdata access: "
if [ -d "/bigdata" ]; then echo "OK"; else echo "FAIL"; fi
# Check /tmp directory creation
echo -n "Directory creation: "
TEST_DIR="/tmp/test_gocryptfs_$$"
if mkdir -p "$TEST_DIR" 2>/dev/null; then
rmdir "$TEST_DIR"
echo "OK"
else
echo "FAIL"
fi
echo "=== Done ==="
Save this as check_readiness.sh and run it with
bash check_readiness.sh. If any check fails, email its-hpc@pomona.edu with the
output.
Troubleshooting
“gocryptfs: command not found” — You need to load
the module first: module load gocryptfs. If
module avail gocryptfs shows nothing, the module is not
installed; contact its-hpc@pomona.edu.
“Permission denied” on
/bigdata/lab/<labname> — You may not be in
the correct group. Run groups to check your group
membership, then ask your PI or email its-hpc@pomona.edu to be added.
“Disk quota exceeded” — Run
quota_check.sh to see current usage. Ask your PI about
cleaning up old data, or email its-hpc@pomona.edu to request
additional storage.