@wiktor@metacode.biz
@wiktor@metacode.biz avatar

wiktor

@wiktor@metacode.biz

I work on cryptographic software and integration with hardware security modules (TPMs, PKCS#11...) primarily in 🦀 Rust:

tss-esapi
cryptoki
ssh-agent-lib
several other crates

I have been involved in several OpenPGP projects and co-authored the book 📚 “OpenPGP for application developers”.

A significant portion of my projects have been financed via the 🇪🇺 Next Generation Internet program thanks to substantial help from the NLnet Foundation.

I ❤️ open-source and try to contribute wherever I can. Check out my links! When no-one is watching I'm developing ActivityPub software...

This profile is from a federated server and may be incomplete. Browse more on the original instance.

kubikpixel, to rust
@kubikpixel@chaos.social avatar

deleted_by_author

  • Loading...
  • wiktor,
    @wiktor@metacode.biz avatar

    Based on their Cargo.toml (https://github.com/stalwartlabs/mail-server/blob/e10083651b4bf58d4a78c49f285efac9c5bad4e2/crates/jmap/Cargo.toml#L48) it seems they’re using experimental cryptographic backend which is not "considered mature enough for general consumption": https://gitlab.com/sequoia-pgp/sequoia/-/tree/main/openpgp?ref_type=heads#experimental-and-variable-time-cryptographic-backends

    Additionally it looks like they’re not using the recommended way of importing Sequoia: https://gitlab.com/sequoia-pgp/sequoia/-/tree/main/openpgp?ref_type=heads#how-to-select-crypto-backends-in-crates

    I don’t have any personal association with Stalwart but maybe it'd be a good idea to report that at https://github.com/stalwartlabs/mail-server/issues ?

    👋

    hko, (edited ) to rust
    @hko@fosstodon.org avatar

    The ecosystem gets a number of things right. Among the ones I appreciate a lot is strong encouragement of canonical formatting with .

    Canonical formatting, enforced by CI, makes it much harder to e.g. strategically hide a stray dot in source code in a way that is easy to overlook - and to miss its semantical impact.

    wiktor,
    @wiktor@metacode.biz avatar

    I thought you were a bit exaggerating but check this out: https://marc.info/?l=openbsd-misc&m=171227941117852&w=2 (CTRL+F "Aside from its documented change")

    Whitespace has been used to activate and deactivate the malware! 🤯

    If only the project has been using consistent whitespace formatter this just wouldn’t pass basic checks.

    kubikpixel, (edited ) to TodayILearned
    @kubikpixel@chaos.social avatar

    deleted_by_author

  • Loading...
  • wiktor,
    @wiktor@metacode.biz avatar

    Both of them really have different strengths and weaknesses:

    Sequoia is definitely more feature-complete (for example it supports multiple crypto backends) but sometimes the complexity shows (e.g. selecting crypto backends https://gitlab.com/sequoia-pgp/sequoia/-/tree/main/openpgp?ref_type=heads#how-to-select-crypto-backends-in-crates or the type names: https://docs.rs/sequoia-openpgp/latest/sequoia_openpgp/cert/amalgamation/struct.ValidComponentAmalgamationIter.html).

    rpgp is basically an extension of RustCrypto, and as such is a bit more integrated in the Rust ecosystem but has been lagging a bit on compatibility until Heiko submitted a couple of PRs and now is on the top: https://tests.sequoia-pgp.org/ (rpgpie).

    Glad that you like the Sequoia documentation: quite a lot of work has gone into polishing it… :)

    wiktor, to random
    @wiktor@metacode.biz avatar

    PSA: WKD Checker (https://metacode.biz/openpgp/web-key-directory) will be officially sunsetted on 1.05.2024.

    The reasons are two-fold: on one hand the service already succeeded in raising awareness of the protocol on the other I lack the resources to maintain and develop it and leaving unmaintained online services is not the smartest move.

    The service was powered by an open-source component so in case someone badly needs it it’s always possible to host your own: https://gitlab.com/wiktor/wkd-checker

    Thanks for all your support and kind words! 👋

    hko, (edited ) to random
    @hko@fosstodon.org avatar

    I just released version 0.9.5 of the opgpcard CLI tool (https://crates.io/crates/openpgp-card-tools), now with manpage generation and generation of shell completions (work by @dvzrv, thanks! 🥳)

    wiktor,
    @wiktor@metacode.biz avatar

    I’ve made a couple of small apps to fill in the gap (eg. https://gitlab.com/wiktor/git-gpg-shim) and they work well for me (pass-based passwords, git commit signing) and they work but it’s definitely quite a chore to set it up.

    Just recently I’ve migrated to git SSH commit signing (with per-device TPM-stored signing keys) and the experience is better out of the box (no custom tooling necessary at all).

    wiktor,
    @wiktor@metacode.biz avatar

    I feel like you’re replying to a point I haven’t made (I was mentioning just commit signing where SSH works better for me) but just for the sake of the thread let me reply to your question.

    Nope, SSH cannot be used for e-mails but based on what I’m seeing on the mailing lists OpenPGP won’t be usable there too soon. Or rather, OpenPGP will split into two: v5 supported by RNP (Thunderbird) and GnuPG; and v6 supported by Sequoia and OpenPGP.js (ProtonMail). And now it’s entirely conceivable that your v5 e-mails won’t be readable by, say, Sequoia’s Careful E-mail client (hypothetical example).

    See: https://mailarchive.ietf.org/arch/msg/openpgp/BLgKYP9CbGtMsIJRV3Ws9jh57Tw/

    wiktor,
    @wiktor@metacode.biz avatar

    Yes, I’ve read Kai’s e-mail about putting user’s first, it was very good. But consider the fact that OpenPGP facilities in Thunderbird are provided by RNP and their last known position on the matter doesn’t leave much room for interpretation: https://mailarchive.ietf.org/arch/msg/openpgp/EgILWBGqU_qvbRLLdbR3jxvMZyc/

    elmiko, to random
    @elmiko@fosstodon.org avatar

    looking for some #pgp advice. i updated my key several years ago with some email aliases, but now i want it to be more authoritative. is the best option to deprecate the old key and start a new one, or is there a way to invalidate some of the aliases?

    wiktor,
    @wiktor@metacode.biz avatar

    Yep, I can totally relate. The mechanics are not well written anywhere in an easy to digest format (ping https://fosstodon.org/@hko ).

    I’ll use this toot to provide info you may find useful:

    OpenPGP keys (or as some call them “certificates") are in reality append-only data structures (think git repositories). You never actually "remove” anything, rather create a new thing (where the version is specified by creation time) that has properties you’re interested in. Even if you revoke User ID or a subkey in reality this only adds yet another signature with a flag that “this key is revoked now”.

    There are some exceptions… or rather edge cases… if you never publish a piece of data you can totally remove that locally and it would be as if it has never existed (think git rebase is OK on not published commits) also some newer keyservers such as https://keys.openpgp.org allow selective User ID publishing (so you can remove User ID from their copy). Of course removing User ID there would do nothing to copies of your key you (or others) store elsewhere.

    HTH 👋

    wiktor,
    @wiktor@metacode.biz avatar

    That would mean all these commits would become “unverified” and would show verification errors when someone would try to do that. In reality probably it wouldn’t have any bigger impact anyway.

    I suggest replacing your entire key only when you want to change cryptography of the primary key (say you were using DSA) or security of the primary key private key material (say you generated in a shared computer but since then started to wear tinfoil hat and only offline, airgapped machine is OK).

    And that’s I think it, everything else can just be achieved by amending what you already have. (Just skimming this thread and I don’t see anything, even changing primary key from [SC] to [C] is possible afterwards: https://unix.stackexchange.com/a/707006).

    hko, to random
    @hko@fosstodon.org avatar

    Just took a first stab at running the (https://github.com/canokeys/canokey-core/) secure key implementation, containerized - and talked to the applet.

    Next to the usual suspects, its OpenPGP applet also supports the Chinese national cryptography standard SM2 algorithm (see https://en.wikipedia.org/wiki/SM9_(cryptography_standard)), and I'm increasingly intrigued where and how OpenPGP is used in Chinese contexts.

    wiktor,
    @wiktor@metacode.biz avatar

    Hmm… that’s interesting. SM-collection of algorithms are government cryptographic standards so I guess it implies that there are some people in Chinese government that use OpenPGP. This is similar to Brainpool for some EU countries. It also means that we probably won’t know the real users since it’s top secret or something 🤷

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • megavids
  • anitta
  • modclub
  • lostlight
  • All magazines