Hacker News new | ask | show | jobs
by dignifiedquire 809 days ago
hey, author here, happy to answer questions, and would love to hear from anyone using the library :)
2 comments

It seems OpenPGP is still riddled with SHA-1. Git kind of avoided the problem (https://github.blog/2017-03-20-sha-1-collision-detection-on-...). What's your plan to deal with the issue?
I am not aware of any outstanding SHA-1 issues that would require a change in the current RFC4880 OpenPGP standard. There was an obscure attack that involved generating two keypairs with colliding SHA-1 signatures and getting a third party to sign one of them but you can just use a different hash (say SHA256). The SHA-1 used in the MDC portion of the authenticated encryption mode doesn't and is very unlikely to ever represent any security weakness (the hash used there doesn't require any particular cryptographic properties). SHA-1 is used for the key fingerprint, but the use of a hash with collision resistance is not required in general for key fingerprints. An attacker could in theory create two different keys with the same fingerprint, but then they would just own two keys that would be hard for to distinguish from one another. You don't sign the fingerprints, you sign the actual public key. In general, it would be a bad idea to specify that the hash used for a key fingerprint required collision resistance as that would mean that the fingerprint would have to be something like an unusable 256 bits long to prevent birthday attacks.
I just finished implementing sha1collision detection, and it will be integrated into rpgp soon https://github.com/rpgp/rpgp/issues/293

This is the same algorithm used by git.

There are higher level implementations that use the dates on signatures to straight out reject sha1 material, but that gives only a limited protection.

Does it support smart cards and such devices?
it‘s not builtin, but possible to integrate with

@wiktor-k is working on a tool to use rpgp to provide a simple solution to work with smartcards

Yep. We've got it working with OpenPGP Card devices (Yubikeys, Nitorkeys, etc.). The signing part was actually pretty easy and the decryption required a bit more work but the maintainer was super responsive (https://github.com/rpgp/rpgp/pull/315).

Overall I'm pretty happy with the codebase.

The PoC for using cards in git is in https://github.com/wiktor-k/monkeybagel (excuse the silly name ;).

How does it interface with the cards? IIRC the rust pcsc library used by Sequoia needed C libraries. I've been doing some NFC stuff too and was looking for a pure-rust solution if there was one.
It uses this crate: https://crates.io/crates/pcsc

On Windows and Mac it binds to system libraries. On Linux it works with pcsclite.

Btw I'm not aware of any tooling that's used by Sequoia, rather wrappers that use Sequoia and pcsc crate.