{"id":16852938,"url":"https://github.com/lann/devcrypt","last_synced_at":"2025-03-18T10:17:28.781Z","repository":{"id":55601723,"uuid":"322409092","full_name":"lann/devcrypt","owner":"lann","description":"Encrypt your development secrets","archived":false,"fork":false,"pushed_at":"2020-12-20T15:26:48.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T16:36:41.940Z","etag":null,"topics":["cryptography","env","secrets"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-17T20:46:09.000Z","updated_at":"2021-08-20T21:21:15.000Z","dependencies_parsed_at":"2022-08-15T04:10:16.268Z","dependency_job_id":null,"html_url":"https://github.com/lann/devcrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lann%2Fdevcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lann%2Fdevcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lann%2Fdevcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lann%2Fdevcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lann","download_url":"https://codeload.github.com/lann/devcrypt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198395,"owners_count":20414443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","env","secrets"],"created_at":"2024-10-13T13:49:08.801Z","updated_at":"2025-03-18T10:17:28.761Z","avatar_url":"https://github.com/lann.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevCrypt - encrypt your development secrets\n\nThe purpose of DevCrypt is to improve otherwise insecure sharing of development\nenvironment (that is, \"low value\") secrets, such as test database passwords. If\nyou currently keep these secrets unencrypted in your source code or shared via\ne.g. email, DevCrypt may be for you.\n\n**DO NOT USE DEVCRYPT TO PROTECT PRODUCTION OR OTHERWISE HIGH-VALUE SECRETS!**\n\nWhile DevCrypt is built on secure cryptographic elements, it is immature and\nhasn't been thoroughly reviewed by _anyone_, let alone cryptographic experts.\n\nFor production secrets, consider [Mozilla's SOPS](https://github.com/mozilla/sops).\n\n## Quickstart\n\n### Install\n\nDevCrypt is written in [Go](https://golang.org). Currently there are no\nbinaries available, so you have to compile from source.\n\nTo install the devcrypt binary to `$GOBIN` (by default, `~/go/bin/devcrypt`):\n\n```\n$ go get -u github.com/lann/devcrypt\n$ devcrypt help\n```\n\nor, to just compile the binary:\n\n```\n$ git clone https://github.com/lann/devcrypt\n$ cd devcrypt\n$ go build\n$ ./devcrypt help\n```\n\n### Generate a key for yourself\n\n```\n$ devcrypt keygen\nGenerating key with label \"lann@computer\"...\nWrote private key to \"/home/lann/.config/devcrypt/devcrypt_key\"\nWrote public key to \"/home/lann/.config/devcrypt/devcrypt_key.pub\"\nPublic key:\ndevcrypt-key cpCWOPP0/afWR3YkfrxZ6KptOO9pAZflm3LF6ChoTXU= lann@computer\n```\n\n### Encrypt your secrets\n\n```\n$ echo \"SECRET_KEY=topSecret\" \u003e .env\n$ devcrypt encrypt .env\nEncrypted to \".env.devcrypt\"\n```\n\n### Add a friend to your encrypted file\n\n```\n$ devcrypt keygen -k bobs_key -l bob@boblandia\n...\nWrote public key to \"bobs_key.pub\"\n...\n$ devcrypt add .env.devcrypt bobs_key.pub\nAdding public key labeled \"bob@boblandia\"\nUpdated \".env.devcrypt\"\n```\n\n### Decrypt your secrets\n\n```\n$ devcrypt decrypt .env.devcrypt\nDecrypted to \".env\"\n```\n\n### Remove a friend (or enemy?) from your encrypted file\n\n```\n$ devcrypt remove .env.devcrypt lann@computer\nRemoving public key by label \"lann@computer\":\ndevcrypt-key cpCWOPP0/afWR3YkfrxZ6KptOO9pAZflm3LF6ChoTXU= lann@computer\n\nUpdated \".env.devcrypt\"\n\n$ devcrypt decrypt .env.devcrypt\nError: unsealing file: no key box found for key labeled \"lann@computer\"\n```\n\n## Cryptography\n\nDevCrypt uses cryptographic elements from NaCl as implemented in\n[golang.org/x/crypto/nacl](https://pkg.go.dev/golang.org/x/crypto/nacl).\n\nFiles are encryped with [secretbox](https://pkg.go.dev/golang.org/x/crypto/nacl/secretbox)\nusing a random \"file key\". That key is then encrypted into one or more\n\"[sealed boxes](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes)\",\nwhich allow encryption with a public key and decryption with the matching private key.\nThe sealed boxes and matching public keys are stored along with the encrypted file in a single text file.\n\nUsers with private keys that match one of the \"sealed boxes\" can decrypt the file by looking up the sealed\nbox based on their public key, decrypting the file key using their private key, then decrypting the file\ncontents with the file key. They can also add new public keys to the encrypted file by decrypting the file\nkey and then reencrypting it into a new sealed box.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flann%2Fdevcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flann%2Fdevcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flann%2Fdevcrypt/lists"}