pwsafe

Password Safe is an open-source password manager originally designed by Bruce Schneier. Stores credentials in a strongly encrypted local database file. Source: github.com/pwsafe/pwsafe. Local repo: /home/john/git/pwsafe. Active branch: webdav.

Architecture

Three clean layers, strictly separated:

1. core — platform-independent C++ logic (src/core/): database model, file I/O, commands, preferences

2. ui — UI frontends (src/ui/): Windows/MFC, wxWidgets (Linux+Mac), CLI; plus OS shims (src/os/)

3. crypto — cryptographic primitives (src/core/crypto/): TwoFish, AES, SHA-256, BlowFish, HMAC, PBKDF2, TOTP

The core→UI boundary is the Observer interface (UIinterface.h). The UI→core boundary is PWScore and the Command pattern.

Key Design Patterns

Command pattern — every database mutation is a reversible Command; undo/redo is built-in

Observer pattern — core notifies UI of changes without depending on it

In-memory encryption — all fields in CItem/CItemData are BlowFish-encrypted at rest in RAM

File format versioning — PWSfile factory selects the right subclass (V1V2/V3/V4) from the file magic

Application Documentation

core — PWScore, CItemData, PWSfile hierarchy, Command/Observer patterns

crypto — key stretching, TwoFish CBC, HMAC, in-memory BlowFish

fileformat — V3/V4 on-disk structure, typed fields, entry types

ui — Windows/MFC, wxWidgets, CLI, OS abstraction layer

transport — loadable transport plugin architecture

webdav — WebDAV plugin design: local cache, locking, libcurl, offline mode

writing-a-plugin — developer guide: how to write a new transport plugin

Development Process

dev — implementation status, design decisions, test documentation

Story (narrative history)

story — how we extended pwsafe with native WebDAV transport: six phases, the lock daemon, three security audits, four test suites

Security Audits

security_audits — three external audits (o3, gpt-5.2, self-review); combined remediation table; all Critical+High fixed

Articles / Writeup

pwsafe/writeup/index — LinkedIn article draft(s): extending pwsafe with WebDAV using AI (Claude Code, ask)

version7
updated2026-02-28
children['pwsafe/core', 'pwsafe/crypto', 'pwsafe/fileformat', 'pwsafe/ui', 'pwsafe/transport', 'pwsafe/webdav', 'pwsafe/writing-a-plugin', 'pwsafe/dev', 'pwsafe/story', 'pwsafe/security_audits', 'pwsafe/writeup/index']