LiberaForms 上的端到端加密(E2EE)

  • Announcement: After teasing, E2EE (End-to-End Encryption) has landed on dev.liberaforms.org. It's open for broader testing and will be in v4, making FOSS form software more useful.
  • Cryptography: All cryptography happens in the client. Use OpenPGP.js for good maintenance and browser compatibility. Use type: 'ecc' when generating keys. ECC keys are asymmetric.
  • Key Types:

    • Form keys: Protect form answers. Created by form owner. Public key is on server and public. Private key is protected by user's personal key and may be persisted on server in some cases.
    • Personal keys: Created by each user. Exclusive to them. Used to encrypt form keys. Public key is on server for sharing. Private key may be protected by a passphrase and never leaves the user's browser. Backup functionality puts private key in clipboard.
  • Key Storage: Use localStorage and sessionStorage differently. localStorage persists private keys and form private keys protected by a passphrase. sessionStorage persists unlocked private keys for one session.
  • Feature in Action:

    • Form creation: v4 will have an interactive map functionality. Video shows creating a form and enabling E2EE.
    • User submitting an answer: Before -editor configures E2EE, the POST request contains a base64-encoded binary blob encrypted with the Form Key, unreadable by the server.
    • -editor1 configures keys: The UI guides through key creation and warns about key loss.
    • Adding -editor1 to the form: Form owner queries E2EE data and sends public key to browser, which encrypts form key and saves it on the server.
    • -editor1 reads answers: LiberaForms helps restore the Form key locally using the private key, and the data is never seen by the server.
  • How to Try: Try on dev.liberaforms.org. For self-hosted instances, install/upgrade as usual. Don't use on important data until fully released. Migrations between development and release versions will be handled. Settings can change default encryption. Report bugs if found.
阅读 10
0 条评论