Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delta Chat encrypts to subkey that is not marked with encryption flag #6520

Open
link2xt opened this issue Feb 4, 2025 · 3 comments
Open
Labels
bug Something is not working

Comments

@link2xt
Copy link
Collaborator

link2xt commented Feb 4, 2025

There is a user that has a key consisting of RSA primary key that is marked for encryption, signing and certification. And there is an authentication RSA subkey. They imported the key into Delta Chat and now receive messages that they cannot decrypt in Thunderbird, because the other side using Delta Chat is encrypting to the subkey (which should not be used for encryption) and Thunderbird tries to decrypt only with the primary key.

It's not recommended to use the same RSA key for encryption and signing at the same time, and Autocrypt specification says there should be a signing-capable primary key and encryption subkey, so this normally does not happen for Delta Chat users.

Here is a key selection function that even has a TODO:
https://github.com/deltachat/deltachat-core-rust/blob/0040c17892b0d2c1002800248bf49b455d538a02/src/pgp.rs#L246-L268

@link2xt link2xt added the bug Something is not working label Feb 4, 2025
@link2xt
Copy link
Collaborator Author

link2xt commented Feb 4, 2025

rPGP does not even have a way to get key flags without looking at the packets manually. https://codeberg.org/heiko/rpgpie has some functions for this.

@adbenitez
Copy link
Collaborator

FTR the person solved the problem adding a new subkey for encrypting and removing the old subkey marked for authentication

@link2xt
Copy link
Collaborator Author

link2xt commented Feb 4, 2025

Just removing an authentication subkey should have worked as well. But it's generally not recommended to use the same key for signing and encryption.

@adbenitez adbenitez marked this as a duplicate and then as not a duplicate of #6628 Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants