CodeName OneShai Almog5 min readintermediate
One Vault, from Your Phone to the Browser
Summary
CodeName One introduces a new com.codename1.security.vault API to simplify secure, cross-device data encryption and access for mobile and web applications. It manages key derivation, wrapping, and synchronization without exposing the data key to the sync server.
- Vaults use a random data key, wrapped by password-derived material or device-specific keys.
- Changing passwords doesn't require re-encrypting all records, only updating the key wrapper.
- Three unlock policies (SESSION_ONLY, REMEMBER_DEVICE, REQUIRE_USER_VERIFICATION) offer flexible access control.
- Integrates with WebAuthn PRF for passkey-based user verification and key derivation.
Developers building cross-platform applications requiring robust, synchronized end-to-end encryption will find this API valuable for reducing complex, error-prone security code.
7/10