{"id":14036208,"url":"https://github.com/keybase/triplesec","last_synced_at":"2025-10-07T07:30:42.530Z","repository":{"id":415897,"uuid":"12437709","full_name":"keybase/triplesec","owner":"keybase","description":"Triple Security for the browser and Node.js","archived":false,"fork":false,"pushed_at":"2023-04-15T14:09:22.000Z","size":36700,"stargazers_count":399,"open_issues_count":31,"forks_count":47,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-01-18T15:08:03.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://keybase.io/triplesec","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keybase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-08-28T15:40:48.000Z","updated_at":"2024-09-16T20:11:55.000Z","dependencies_parsed_at":"2023-07-06T10:46:29.590Z","dependency_job_id":null,"html_url":"https://github.com/keybase/triplesec","commit_stats":{"total_commits":536,"total_committers":9,"mean_commits":59.55555555555556,"dds":"0.13619402985074625","last_synced_commit":"a9d289731ae146411f61a5f267106c79295369ed"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keybase%2Ftriplesec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keybase%2Ftriplesec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keybase%2Ftriplesec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keybase%2Ftriplesec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keybase","download_url":"https://codeload.github.com/keybase/triplesec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235600043,"owners_count":19016195,"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":[],"created_at":"2024-08-12T03:01:52.411Z","updated_at":"2025-10-07T07:30:35.726Z","avatar_url":"https://github.com/keybase.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# node-triplesec\n\nA CommonJS module for symmetric key encryption of smallish secrets\n\n## How to install\n\n```sh\nnpm install triplesec\n```\n\n## How to Use\n\n### One-shot Mode\n\n```coffeescript\n{encrypt, decrypt} = require 'triplesec'\n\nkey = new Buffer 'top-secret-pw'\npt0 = new Buffer 'the secret!'\npt1 = new Buffer pt0\nencrypt { key, data : pt1 }, (err, ciphertext) -\u003e\n\tdecrypt { key, data : ciphertext }, (err, pt2) -\u003e\n\t\tconsole.log \"Right back the start! #{pt0} is #{pt2}\"\n```\n\n### Reusable Derived Keys\n\nThe most expensive part of TripleSec is to derive keys from your\ngiven passphrase.  This is intentionally so to make it more expensive\nto crack your password in the case that your ciphertext is stolen. \nHowever, you can spread this expense over multiple encryptions\nif you plan to be encrypting more than once:\n\n```coffeescript\n{Encryptor, Decryptor} = require 'triplesec'\n\nkey = new Buffer 'top-secret-pw'\nenc = new Encryptor { key }\ndec = new Decryptor { key }\npt0 = new Buffer 'the secret!'\npt1 = new Buffer pt0\npt2 = new Buffer pt0\nenc.run { data : pt1 }, (err, ct1) -\u003e\n\tenc.run { data : pt2 }, (err, ct2) -\u003e\n\t\tdec.run { data : ct1 }, (err, pt3) -\u003e\n\t\t\tdec.run { data : ct2 }, (err, pt4) -\u003e\n\t\t\t\tconsole.log \"Right back the start! #{pt0} is #{pt3} is #{pt4}\"\n```\n\nIf you want to resalt derived keys with every encryption, you should explicitly\nask for that. Otherwise, salt will be reused to speed up encryption\n(and decryption).\n\n```coffeescript\nenc.run { data : pt1 }, (err, ct1) -\u003e\n\tenc.resalt {}, () -\u003e\n\t\tenc.run { data : pt2 }, (err, ct2) -\u003e\n```\n\n### Full API Documentation\n\nDocumentation generated by [codo](https://github.com/netzpirat/codo)\nis available [here](http://keybase.github.io/triplesec/codo/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeybase%2Ftriplesec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeybase%2Ftriplesec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeybase%2Ftriplesec/lists"}