Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# sunlight-secretmanager

sunlight-secretmanager is a command-line tool to manage a
[Sunlight](https://sunlight.dev/) CT Log's private key material.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this undersells it a bit: The different format private keys are fundamentally derived from this, and we should be clear that the "seed material", fundamentally, is the private key

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could you suggest an alternative wording? I'm just trying to avoid suggesting the sunlight-secretmanager generates or manages the actual private key files, which implies a very specific thing (i.e. a PEM- or DER-encoded file in the standard format).

[Sunlight](https://sunlight.dev/) CT Log's seed material for its private key.

All CT logs have a private key which they use to create Signed Certificate
Timestamps (SCTs) and Signed Tree Heads (STHs). Sunlight does not take this
private key as input directly. Instead, its configuration requires two file
paths:

- A seed file containing at least 32 bytes of random data, from which the log's
ECDSA P-256 key will be derived; and
- A PEM file containing the corresponding ECDSA P-256 public key.
private key as input directly. Instead, its configuration requires a seed file
containing at least 32 bytes of random data, from which the log's ECDSA P-256
key (and ML-DSA-44 key in v0.9.0 and above) will be derived.

The purpose of sunlight-secretmanager is to authenticate to AWS Secrets Manager,
retrieve a stored seed, use that seed to derive the corresponding pubkey, and
write both files to disk in a tmpfs. It knows what seed to retrieve and where to
write the output files by parsing the same config file which configures the
Sunlight log itself.
retrieve a stored seed, and write it to a file in a tmpfs. It knows what seed to
retrieve and where to write the output file by parsing the same config file
which configures the Sunlight log itself.

If it successfully retrieves a secret from AWS Secrets Manager but that secret
is empty, it will generate a new seed and save it back to AWS before proceeding.
Expand Down