SecretKey makes a password for every account in a CSV file, such as an export from 1Password. Each password comes from:
- your root key, a random 32-byte secret kept in
config.json - a date code, the month as
YYMM(2611is November 2026) - the account's Title, Url and Username, and its mask (the password's pattern)
The same inputs always give the same passwords, on any PC, so nothing has to be stored. To recover a password, run SecretKey again. To change every password, use a new date code.
-
Built with AI-generated code. The purpose of SecretKey is to build a real, useful app with AI-generated code. The code is written by AI coding assistants (Claude by Anthropic, and earlier GitHub Copilot). A human, the repository owner, reviews every change and merges it through a pull request.
- Files Claude wrote or changed say so in a comment at the top of the file.
- Every commit Claude made ends with a
Co-Authored-By: Claudeline, sogit logshows exactly which changes were AI-generated.
-
Local only. SecretKey runs on your PC. Its own code makes no network connections, and its app package asks for no network permissions. Tests check both (
RepositoryRulesTests). GitHub is used only to store the code and to build releases. -
Pure .NET, Microsoft packages only. No third-party packages. The only packages are Microsoft's own:
- the Windows App SDK and Windows SDK build tools, for the WinUI 3 window and MSIX packaging
- MSTest, Microsoft's test framework, used by the tests only
A test fails if any other package is added.
-
Checkable by an AI. CLAUDE.md tells an AI assistant how to build, test, and check this README against the code.
ReadmeClaimsTestschecks the README's facts automatically.
- Open the latest release and download
SecretKey-<version>-x64.msix. - Open the file. Windows installs SecretKey and shows the publisher, Edwin West. The installer is signed, so Windows can confirm who made it and that it hasn't been changed.
- Start SecretKey from the Start menu.
To uninstall, go to Settings → Apps → Installed apps → SecretKey → Uninstall.
- The MSIX includes .NET and the Windows App SDK, so nothing else needs to be installed. It runs on 64-bit (x64) Windows.
- Each release also has a
.sha256file. To check your download, compare it with the output ofGet-FileHash .\SecretKey-<version>-x64.msixin PowerShell. - A pre-release (a
-rcversion) has the same package version as the final release. Uninstall it before installing the final one.
config.jsonholds your root key. Withconfig.jsonand your input file, anyone can regenerate every password, for any month. The date code is not a real secret: it's just a month, so it's easy to guess.- Keep
config.jsonprivate, for example on an encrypted drive. - Back it up. If the root key is lost, the passwords can't be regenerated.
- Keep
- Sharing. If you give someone
config.jsonand the input file, for example on a mailed flash drive, you are giving them every password. Encrypt the drive. - The output file holds your passwords in plain text. Import it into your password manager, then delete it.
- Git.
.gitignoreexcludesconfig.jsonand*.pfx. Never commit a real root key or a signing certificate.
- Select Folder... picks your workspace folder.
config.jsonis saved there. - Use the two Browse... buttons to pick the input file and choose where the output file goes.
- Enter the Global Password Pattern Mask. The default is
XxxxxNSxxxNN. - Click Generate New Key for a new root key, or paste yours.
- Click Save Config. The root key and mask are checked before anything is saved.
- Enter the date code and click Run SecretKey. The status bar shows how many passwords were written.
SecretKey <YYMM> [workspace folder]
It reads config.json from the workspace folder. Without a folder, it uses the folder SecretKey.exe is in. It prints a summary, never the root key, and exits with code 0 on success or 1 on any error.
| Setting | Meaning |
|---|---|
RootKey |
Your root key: exactly 64 hexadecimal characters (32 bytes). The secret. |
InputPath |
The input CSV file. |
OutputPath |
Where to write the output CSV. Must be a different file from InputPath. |
PasswordMask |
The mask for accounts without their own passwordmask= note. |
A relative path is taken relative to the folder that holds config.json. config.example.json shows the layout; its placeholder root key is rejected until you replace it.
- A CSV file in UTF-8 (with or without a byte-order mark), with a header row.
- Columns are found by name, in any order and any letter case:
Title,UrlandUsernameare required.Notesis optional and is where apasswordmask=setting goes.Passwordis optional. Old passwords in it are cleared (see below).- Other columns are ignored.
- Quoted fields may contain commas, doubled quotes (
"") and line breaks, so multi-line notes are fine. - Blank lines are skipped.
- The run stops, naming the line, for a row with more fields than the header or a row with no Title, Url or Username.
sample_input.csvis an example.
Nothing is written until the whole input file has been checked. If anything is wrong, no file is created or changed.
If the Password column has any values, SecretKey clears them from the input file after writing the output, so old passwords don't linger. Every other value is kept, including multi-line notes. The new file is written to a temporary file and then swapped in. A line is added to secretkey_events.log in the same folder with the time, the output file name and the number of rows, but no passwords. If the Password column is empty, the input file is not touched.
The output CSV has exactly four columns: Title,Url,Username,Password.
- Title, Url and Username are written as used for the password: spaces trimmed, and
https://added to a URL withouthttp://orhttps://. - The passwords are in plain text. Open the file in your password manager, not a spreadsheet: a spreadsheet may treat a password that starts with
=,+,-or@as a formula.
| Mask character | Gives |
|---|---|
X |
an uppercase letter, A–Z |
x |
a lowercase letter, a–z |
N |
a digit, 0–9 |
S |
a symbol from !@#$%&*()-_=+[]{}<>? |
Any other visible ASCII character, such as - or _, is copied into the password as-is. That helps when a site only allows certain symbols.
A mask may have at most 64 characters and needs at least 4 of X, x, N or S. Spaces and non-ASCII characters aren't allowed. The default mask XxxxxNSxxxNN gives passwords like Fiipc3]jpv38.
To give one account its own mask, put passwordmask= followed by the mask anywhere in its Notes. For example, use passwordmask=xxxxxxxxNNNN for a site that allows no symbols.
- The mask ends at the first space or line break.
passwordmaskcan be in any letter case.- One per account.
- If it's invalid, the run stops with an error naming the line and the account, and nothing is written.
Four digits, YYMM, with a month from 01 to 12. A new date code gives every account a new password. Old passwords can always be regenerated with their old date code.
These change a password: the root key, the date code, the account's Title, Url or Username, and its mask (global or passwordmask=). Nothing else does, including Notes text other than passwordmask=.
Editing an account's title or URL in your password manager changes its SecretKey password, so keep your input file as the reference.
docs/password-derivation.md gives the exact recipe (version 2), so the passwords can be regenerated without this app. In short: HKDF-SHA256 derives the month's key from the root key, and HMAC-SHA256 turns each account into an unbiased stream of characters. Known-answer tests lock the results.
| Project | What it is |
|---|---|
SecretKey.Core |
The engine: password math (Crypto.cs), CSV reading and writing, settings and checks. |
SecretKey |
The command-line app. |
SecretKeyUI |
The WinUI 3 desktop app. It calls SecretKey.Core directly. |
SecretKey.Core.Tests |
MSTest tests: password math, CSV, settings, repository rules and README checks. |
-
Windows, Visual Studio 2026 and the .NET 10 SDK. Open
SecretKey.slnx. -
Run the tests with Test → Test Explorer in Visual Studio, or:
dotnet test SecretKey.Core.Tests/SecretKey.Core.Tests.csproj -
SecretKeyUIis packaged as an MSIX (full trust) for a clean install and uninstall. Every pull request packages it, unsigned, andscripts/Test-Msix.ps1checks the package: publisher, version, self-contained (no other packages needed), and no permission exceptrunFullTrust.
Releases are built, signed and published by .github/workflows/release.yml, only when a version tag is pushed.
- Set the version in three places.
ReleaseRulesTestsfails if they disagree.Directory.Build.props:X.Y.ZSecretKeyUI/Package.appxmanifest:X.Y.Z.0CHANGELOG.md: a heading## [X.Y.Z] - YYYY-MM-DD, whose text becomes the release notes
- Push a tag
vX.Y.Z, orvX.Y.Z-rc.Nfor a pre-release. - The workflow then:
- checks the tag against the version
- runs the tests
- packages the MSIX and checks it with
scripts/Test-Msix.ps1 - waits for the owner's approval in the GitHub environment
release - signs the MSIX with Azure Artifact Signing (account
edwest19, profileCodeSigning-Apps, East US) - checks that the signature is valid, timestamped and made by
CN=Edwin West, O=Edwin West, L=Huntington, S=ny, C=US - publishes the GitHub Release with the MSIX and its
.sha256
Signing uses OpenID Connect, so no password or key is stored in GitHub. Every action is pinned to an exact commit. The workflows turn off the .NET CLI's and winapp's usage telemetry.
The repository uses GitHub's immutable OIDC subject claims (Settings → Actions → OIDC → Use immutable subject claim), so the sign-in token names the repository by its numeric IDs as well as its name. The Azure app registration SecretKey-GitHubActions-Signing trusts exactly this subject:
repo:edwest19@5809459/SecretKey@1239108708:environment:release
- A different repository that later takes the name
edwest19/SecretKeycan't match it. - Renaming this repository, its owner or the
releaseenvironment changes the subject. The Azure federated credential must then be updated to match.
MIT. See LICENSE.