Commit Graph
3 Commits
Author SHA1 Message Date
lucioandClaude Opus 5 c0031c00da polish P1: CipherScheme (.legacy/.modern) in the cipher stream
The legacy scheme is what every PowerToys up to v0.100.2 speaks: a fixed
PBKDF2 salt (UTF-16LE of "18446744073709551615", 40 bytes), 50 000
iterations, a fixed ASCII IV "1844674407370955" and no cleartext header —
citations to the pre-a9e1f0f20e Encryption.cs. The sacrificial block is
still the first ciphertext block under both schemes.

- CipherWriter/CipherReader take the scheme; the writer's header is 16
  bytes under .legacy and 48 under .modern, the reader consumes as many.
- MacCipherScheme setting, default legacy, Mac-only key in the same file.
- InvalidKeyReason.cipherSchemeMismatch and SocketStatus
  .cipherSchemeMismatch (raw value 100, outside the Windows range) with
  its menu text, for the diagnostic the network layer raises next.

Verified offline against Python cryptography in both directions: our
legacy writer's stream decrypts under
pbkdf2_hmac('sha512', key, '18446744073709551615'.encode('utf-16-le'),
50000, 32) + AES-CBC, and our reader recovers Python's.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-16 21:06:41 -07:00
lucioandClaude Opus 5 716c5be5c5 app-ui: three fixes found re-reading the first pass
- UIBridge remembered only the lowercased key of a peer, so a "Lost X"
  notification for a row that vanished printed the name in lower case;
  and the spelling map was built with Dictionary(uniqueKeysWithValues:),
  which traps when a peer pair has two connections carrying one name.
- SettingsWindowController.show() refreshed the drafts unconditionally,
  so opening the Advanced pane from the menu threw away a half-typed
  security key. It now refreshes only when the window was not visible.
- StatusItem: dropped the unused StatusModel.hasProblem and the dead
  fill/size argument in the icon drawing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-16 04:15:54 -07:00
lucioandClaude Opus 5 6b2b3fc65a app-ui: menu bar, settings window, notifications, login item
The real user interface, replacing app-engine's placeholder status item.

- MWBMac/StatusItem.swift: NSStatusItem with a code-drawn icon, the
  documented status colours (doc/devdocs/modules/mousewithoutborders.md)
  and the menu the Windows tray menu offers (frmScreen.Designer.cs:91-180).
- MWBMac/SettingsWindow/*: one NSWindow hosting a SwiftUI TabView with six
  panes; every property in README §Settings is reachable. Labels and help
  text taken from MouseWithoutBordersPage.xaml + Resources.resw, cited per
  file.
- MWBMac/Notifications.swift, LaunchAgent.swift: UNUserNotificationCenter
  and SMAppService.mainApp, both guarded on a bundle identifier.
- mwb/UIBridge.swift: EngineSnapshot -> StatusModel, clicks -> Engine, and
  the connected/lost/invalid-key notification diff.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-16 04:14:11 -07:00