Skip to content

Initial Cryptographic Support to have (some parts of) models en/de/crypted #284

Open

Description

@vorburger

It could be fun to make it add initial basic crypto support to this project.

The way I imagine it working is that you would "tag" (with Proto extensions, perhaps?) some parts of models marked secret. It would be nice to keep this nicely "modular" and avoid having to "bake this into the core" of Enola.

The secret parts of any model would then be encrypted on the client (CLI, for now, Web, later) and stored "encrypted at rest" on the server (e.g. in the File System Repository), and could later be decrypted again on the client.

There are a bunch of pre-requisites for this, at least including:

Activity

  1. self-assigned this
    on Sep 29, 2023
  2. changed the title [-]Initilal Cryptographic Support to have (some parts of) models en/de/crypted[/-] [+]Initial Cryptographic Support to have (some parts of) models en/de/crypted[/+] on Sep 29, 2023
  3. vorburger commented on Aug 19, 2024

    @vorburger
    MemberAuthor

    No, the basics of this should of course work completely without any client/server; just locally.

    At its core, this is just an URI scheme, with a ResourceProvider?

    Like the (TBD) data: one.

    crypt:{PUBKEY}/{SECRET}, using some agreed upon encoding.

    Are there existing standards for this?

    Decrypt is via a key in TPM; may shell out to exec age.

    Model https://enola.dev/secret is:

    CLI is via (TBD) Enola Actions, on Things; e.g. generate key, list keys, encrypt URL, decrypt secret.

    Password 🔑 Manager is then trivial and an obvious 1st application: just e.g. a class Website Thing, with a password property.

    The #607 format should directly support this.

    models/people/ can then contain e.g. phone numbers... 🔒

  4. vorburger commented on Aug 20, 2024

    @vorburger
    MemberAuthor

    Actually, decrypt: scheme specific part start should somehow include if what follows is an encrypted secret itself, or a delegated URL where to fetch one from.. e.g. decrypt:http://server/secret.pgp.

    The "decrypted Form" of such secrets should use secret-token: (bearer) scheme, as per RFC 8959.

  5. vorburger commented on Jan 9, 2025

    @vorburger
    MemberAuthor

    Decrypt is via a key in TPM; may shell out to exec age.

    Or https://github.com/microsoft/TSS.MSR/blob/main/TSS.Java/src/samples/Samples.java ? But likely PITA.

    So just using https://github.com/Foxboron/age-plugin-tpm (or https://github.com/remko/age-plugin-se; both from https://github.com/FiloSottile/awesome-age) may be a way to go. Maybe 🤔 shell exec only once to decrypt one key into another in-memory, and then use that one... is that a good idea?

  6. vorburger commented on Feb 8, 2025

    @vorburger
    MemberAuthor

    TBD: Private Keys from those 12 / 24 letter words.

    TODO: Tink-ish TS/JS, for Browser Client-side JWT (?), with Web Crypto API (or not; one could also use another library).

  7. vorburger commented on May 13, 2025

    @vorburger
    MemberAuthor
  8. vorburger commented on May 14, 2025

    @vorburger
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions