PrivacyNotes.app README

项目的 README,来自 github.com/LifetimeLabsHQ/PrivacyNotes.app。合并为一个 markdown 文件:README.md。

PrivacyNotes

Notes, tasks, and journal, encrypted on your device.
Your 12-word phrase is your identity and your key. With a phrase sign-up there is no email, no password and no account to leak.

Website  ·  Try it, no account  ·  Verify it yourself  ·  Security  ·  Threat model

Signed apps for macOS, Windows, Linux, Android and iOS, or run it in the browser.

License: AGPL v3 Encryption Release Stars GitGem


The PrivacyNotes app

This screenshot is a link. It opens the live demo in your browser:
no account, nothing saved, the real app with the real encryption.


What your data looks like on our server

Real rows from the notes table, containing only ciphertext

Real rows from the notes table in production. A public key, a ciphertext, a nonce.
No title, no body, no tags. Just bytes that only your phrase opens.


Do not take our word for it. Check it yourself in about a minute, with nothing but your browser's network tab.


PrivacyNotes GitHub stats on PrivacyTools.io

What PrivacyNotes is

A notes, tasks and journal app for macOS, Windows, Linux, Android, iOS and the browser, encrypted on your device. You get a 12-word phrase instead of an account, and everything you write is encrypted on your device under a key derived from it, on disk and on the way to us. Under self-custody, that key is yours alone. Notes, journal entries, tasks, a password vault, and file attachments all live under that one key.


Why this repo exists

Privacy claims need proof. The parts you actually have to trust are here: the client applications, the cryptographic core, and the threat model - the real files that ship, not summaries. Reading crypto.ts proves the encryption is sound; having the client around it proves the encryption is used on every path.

Three claims we make, and where to check each one without taking our word for it:

The claim Check it here
Under self-custody, your phrase never leaves your device crypto/crypto.ts, and the derivation strings in the live bundle
Your notes are encrypted on your device, at rest and on the way to us crypto/crypto.ts, the XChaCha20-Poly1305 path
The server stores only ciphertext VERIFY.md tier 1: watch your own notes leave in your browser's network tab

If any of those stops holding, the claim is broken and you can prove it. That is the entire point of this repo.

The first claim holds under self-custody, which every phrase sign-up uses. Its exception is custodial mode, which a sign-up with Google, Apple or GitHub preselects.


What is in here

Path What it is
application/ The client applications, as we build them: the web app, the desktop and mobile shells, and the shared crypto package. cd application && pnpm install && pnpm build.
crypto/crypto.ts Key derivation and note encryption, about 650 lines, commented step by step. Not a reference implementation. The production code, copied here so the link is short; the canonical file is application/packages/shared/src/crypto.ts. Attachments and images use the same cipher through crypto/blob.ts, which is another 50 lines.
SECURITY.md What we protect against, what we do not, and what the server can see. Written for users.
THREAT_MODEL.md Trust boundaries, cryptographic detail, and known limitations, including the unflattering ones. Written for auditors. Start here if you are reviewing the project.

The design in brief

Identity and key derivation. A 12-word BIP-39 mnemonic (128 bits of entropy) is generated on your device and turned into a 64-byte seed via the standard BIP-39 PBKDF2 path. Every key comes out of that seed via HKDF-SHA256, each under its own domain-separated info string so that no two uses share key material:

Info string Produces Used for
privacynotes-signing-v1 Ed25519 private key Its public key is your user ID
privacynotes-encryption-v1 32-byte symmetric key Note, attachment and image encryption
privacynotes-local-at-rest-v1 32-byte symmetric key Seals note content at rest in the device's own storage; never stored, never transmitted
privacynotes-auth-password-v1 32-byte secret The password for the anonymous account that carries your session
privacynotes-fp-pepper-v1 32-byte pepper Hashes the device-grouping signals described in SECURITY.md, so the server never sees the raw values

Note encryption. Each note is encrypted with XChaCha20-Poly1305 under a random 24-byte nonce. The plaintext payload includes title, body, tags, and metadata such as trashed and starred state. The server sees none of it. The 24-byte nonce is what makes random generation safe without collision risk, unlike AES-GCM's 12 bytes.

Challenge signing. Pubkey-to-account binding uses Ed25519 signatures over structured challenges (link:<authUid>). Device registration and revocation use the same shape. Every signature binds to the session's auth UID, so a captured signature cannot be replayed into another session.

Dependencies, all from the @noble and @scure families: @scure/bip39, @noble/hashes, @noble/ed25519, @noble/ciphers. Zero dependencies each, written to be auditable, deployed in production by major wallets.


Verify it yourself

Read it. crypto/crypto.ts is one file and you can finish it in a sitting.

Run the derivation. The same path the app uses, from the same audited packages, in a scratch directory you can delete afterwards. Copy the whole block:

mkdir -p /tmp/pn-verify && cd /tmp/pn-verify
npm install --silent @scure/bip39@^2 @noble/hashes@^2

node --input-type=module -e "
import { generateMnemonic, mnemonicToSeedSync } from '@scure/bip39';
import { wordlist } from '@scure/bip39/wordlists/english.js';
import { hkdf } from '@noble/hashes/hkdf.js';
import { sha256 } from '@noble/hashes/sha2.js';

const utf8 = new TextEncoder();
const hex  = b => Buffer.from(b).toString('hex');

const phrase = generateMnemonic(wordlist, 128);
const seed   = mnemonicToSeedSync(phrase);
const encKey = hkdf(sha256, seed, undefined, utf8.encode('privacynotes-encryption-v1'), 32);
const sigKey = hkdf(sha256, seed, undefined, utf8.encode('privacynotes-signing-v1'), 32);

console.log('Phrase           :', phrase);
console.log('Encryption key   :', hex(encKey));
console.log('Signing key      :', hex(sigKey));
console.log('Deterministic    :', hex(hkdf(sha256, mnemonicToSeedSync(phrase), undefined, utf8.encode('privacynotes-encryption-v1'), 32)) === hex(encKey));
console.log('Domain-separated :', hex(encKey) !== hex(sigKey));
"

Two lines of that output are the ones that matter. Deterministic: true says the phrase alone reproduces the key, on any machine, forever, with nothing fetched from us. Domain-separated: true says the signing key and the encryption key cannot be derived from each other, so publishing your user ID does not leak the key your notes are under.

Diff it against production. The bundle is minified, so a textual diff is not practical, but the derivation is falsifiable anyway. Open the JavaScript served at PrivacyNotes.app and search it for privacynotes-signing-v1 and privacynotes-encryption-v1, the HKDF-SHA256 construction, and XChaCha20-Poly1305 with 24-byte nonces. They are in there right now. If they ever are not, we are lying and you can show it.

Watch the wire. The strongest check needs no source at all. Open your browser's network tab, type a word into a note, and read what the app sends: a ciphertext, a nonce, a public key and timestamps. No title, no body, nothing you typed. VERIFY.md walks it in about a minute. It beats reading our table definitions, because it measures what actually leaves your machine rather than what we say we store.


The parts that are not absolute

SECURITY.md states each one in full, and THREAT_MODEL.md says how it works.

Custodial mode, the exception to the first claim

A sign-up with Google, Apple or GitHub preselects custodial mode: your phrase is kept on our server under a key we hold, so we could decrypt your notes. A phrase sign-up never uses it, and Settings > Account > Key custody switches either way. SECURITY.md has the full trade.

The rest, one line each


Security contact

Found a flaw in the crypto, the derivation, or the client? Report it privately on GitHub rather than opening a public issue, so it can be fixed before it is public. A private report there reaches us fastest and keeps the whole exchange in one place.

If you cannot use GitHub, email [email protected] as a backup. That address is also published in our security.txt on our own domain, so you can confirm it is really us. If a fix needs coordination we will work with you on timing before disclosure. There is no paid bounty program yet.

No third-party audit has been performed yet. The first serious spend out of revenue is one, with Cure53 as the target firm.


Credits

PrivacyNotes is shaped by the people who report bugs and ask for features in our issues. 104 people have opened an issue, and 436 reports are now fixed or built.

tech2-user harishbewe scamidge Real-Fruit-Snacks AndreFeliciano les-incompetent mburr MrJarvisHere laulaugaby Tobias1000 block6791 shriganesh grub-basket deftly1970 TheArtForm pdmcgeejr javaskript snogglefromp thecoffeebin gijs-epping KamikazeWolf michaeldurland ajgraves FrostyLime gitglub GregHabiskis BackupSFG tactfuljeer 825i thediamondgeezer ylnztrkk ameetjeeva

Everyone, with their counts, is in CREDITS.md.


License

This repository is AGPL-3.0. Read it, audit it, build it, fork it. If you run a modified version as a network service, publish your changes.

The name PrivacyNotes, the wordmark and the icon are not part of that grant. A fork needs its own name.

The PrivacyNotes app icon

Writing about PrivacyNotes? The square app icon is assets/icon.svg, and the full brand kit, with lockups and usage rules, is at privacynotes.app/brand. NOTICE.md says what the license grant does not cover.

A note on the earlier MIT releases of the encryption files is in crypto/README.md.

The app is built on other open source software. Every package, font and crate it includes, each with its license, is listed at privacynotes.app/licenses.

PrivacyNotes.app (LifetimeLabsHQ/PrivacyNotes.app)

正在搜索数据库…

这是什么?PrivacyNotes 是一款端到端加密应用,提供笔记、任务、日记、密码保险库、文件和书签功能,支持 macOS、Windows、Linux、Android、iOS 和浏览器。它不使用邮箱加密码,而是用一组 12 个单词的 BIP-39 助记词作为你的身份和加密密钥,因此不存在任何可能被泄露的账号。
这只是加密相关的源代码,还是一个完整可用的应用?这是一个完整的跨平台应用,为 macOS、Windows、Linux、Android 和 iOS 提供经过签名的原生安装包,同时还有网页版。代码仓库也公开了完整的客户端源码、加密核心(crypto/crypto.ts)以及威胁模型,方便他人独立验证其隐私声明。
我该如何开始使用 PrivacyNotes?在浏览器中打开 PrivacyNotes.app 即可免注册试用;或为你的平台安装经过签名的原生应用,然后用新生成的 12 个单词助记词注册。若要从源码构建客户端,请运行:'cd application && pnpm install && pnpm build'。
注册时需要邮箱或密码吗?不需要。用助记词注册只需要一台能生成 12 个单词 BIP-39 助记词的设备,没有邮箱、密码或账号。加密部分只依赖经过审计的 @noble 和 @scure 库(bip39、hashes、ed25519、ciphers)。
如果我丢失了 12 个单词的助记词会怎样?在自主保管模式下,丢失助记词就意味着你的笔记将永久丢失。系统无法通过重置密码找回,因为团队认为密码重置等同于后门。若改用 Google、Apple 或 GitHub 登录,则默认会将助记词存放在其服务器上,这会打破纯粹的自主保管保障。
服务器到底能看到我笔记的哪些信息?服务器只能看到密文:一个公钥、一个 nonce(随机数)以及只有你的助记词才能解密的字节,看不到标题、正文或标签。但服务器仍能看到一些元数据,例如你的假名公钥、密文长度、时间戳、笔记数量、同步规律以及你的请求 IP。
AGPL-3.0 许可证有什么限制?你可以自由阅读、审计、构建和分叉(fork)代码,但如果你将修改后的版本作为网络服务运行,就必须公开你的改动。PrivacyNotes 的名称、文字标志和图标不在许可授权范围内,因此分叉版本需要使用自己的品牌。
什么是托管模式?为什么有人会选择它?如果你用 Google、Apple 或 GitHub 注册,而不是使用助记词,PrivacyNotes 会将你的助记词加密后存放在其服务器上,加密密钥由公司持有。这样新设备只需一键即可完成设置,无需输入 12 个单词;但这会打破自主保管的保障,并使你面临法律命令或公司被攻破的风险。
我如何自行验证加密相关的声明?你可以阅读 crypto/crypto.ts(约 590 行),运行密钥派生脚本以确认其具有确定性,在线上的 JavaScript 打包文件中搜索 HKDF 域字符串,或者在保存笔记时打开浏览器开发者工具的网络面板,确认其中只发送了密文、nonce 和公钥。
这份代码是否经过第三方审计?目前尚未进行任何第三方审计。团队表示,第一笔来自收入的重要支出将用于审计,目标审计机构是 Cure53。
PrivacyNotes 除了笔记,也支持密码和文件附件吗?支持。同一把加密密钥同时保护笔记、日记条目、任务、密码保险库以及文件或图片附件,所有内容在离开你的设备之前都会先在客户端使用 XChaCha20-Poly1305 加密。
有哪些类似的项目?ente, siyuan, Trilium, notesnook, edgeever, joplin, logseq, AFFiNE
大小
146.8 MB
星标
699
时长
6个月
提交 · 90 天