rskey supports three distinct encryption algorithms depending on the product and deployment mode. Connect and Package Manager default to NaCl Secretbox but can be switched to AES-256-GCM for FIPS compliance. Workbench always uses AES-128-CBC for compatibility withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rstudio/rskey/llms.txt
Use this file to discover all available pages before exploring further.
rstudio-server.
- NaCl Secretbox (default)
- AES-256-GCM (FIPS)
- AES-128-CBC (Workbench)
NaCl Secretbox is the default algorithm for Posit Connect and Package Manager. It combines XSalsa20 stream encryption with a Poly1305 MAC to provide authenticated encryption.Key material used: first 32 bytes of the 512-byte key file.Nonce: 192 bits (24 bytes), randomly generated per encryption.MAC: Poly1305, providing 128-bit authentication.Implementation: The nonce is prepended directly to the ciphertext before base64 encoding. There is no version byte in this legacy format.Some ciphertexts produced by older implementations carry an explicit version byte
golang.org/x/crypto/nacl/secretbox — the standard Go wrapper around the NaCl reference implementation.Output format:0x01 before the nonce:rskey decrypt handles both forms transparently.Use this when: you are encrypting secrets for Connect or Package Manager and do not have a FIPS compliance requirement.Algorithm selection
The--mode flag passed to rskey encrypt selects the algorithm:
--mode value | Algorithm | Products |
|---|---|---|
| (omitted) | NaCl Secretbox | Connect, Package Manager |
fips | AES-256-GCM | Connect 2022.03.0+, Package Manager 2024.04.0+ |
workbench | AES-128-CBC | Posit Workbench |
rskey decrypt does not require a --mode flag. For Connect and Package Manager ciphertexts, the algorithm is determined from the version byte embedded at the start of the decoded payload (0x01 or 0x02 for NaCl and AES-256-GCM respectively; no version byte defaults to NaCl). For Workbench ciphertexts, the algorithm is identified by the presence of matching CRC32 checksums at the start and end of the payload string.