Add the OpenPGP operations of the Drive data model as pure functions:
node keys and passphrases, names, hash keys and lookup hashes, content
keys, blocks, verifier tokens, manifests and extended attributes.
The formats follow the reference SDK (driveCrypto.ts, openPGPCrypto.ts),
which differs from the plan's Task 5 interfaces in these ways, now
updated in the plan:
- node keys are v4 EdDSA/ECDH with user ID "Drive key" and ordinary S2K
locking; file keys (aead=true) advertise SEIPDv2 with AES-256-GCM and
folder keys don't, as the SDK's enableAead
- the content key is v6 only when the node key advertises SEIPDv2, as
the SDK's preference-following session key generation
- the content key signature is checked on read against the node key and
extra (address) keys
- block signatures are encrypted with the content session key, as the
SDK's encryptSignature
- hash keys are signed by the node key; reading also accepts address keys
- reencryptPassphrase signs anew, and encryptName takes the current name
session key for rename and move
- name length is counted in UTF-16 code units, as the SDK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>