Skip to content

Generate Features subpacket on the new keys #6673

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

Open
link2xt opened this issue Mar 17, 2025 · 1 comment
Open

Generate Features subpacket on the new keys #6673

link2xt opened this issue Mar 17, 2025 · 1 comment

Comments

@link2xt
Copy link
Collaborator

link2xt commented Mar 17, 2025

This is how it is done in rpgpie for v6 keys:
https://codeberg.org/heiko/rpgpie/src/commit/f1cc0d8c634a4d8af363d1500b187449e791bd49/src/tsk.rs#L283

We currently generate v4 keys, but RFC 4880 already defined features subpacket:
https://www.rfc-editor.org/rfc/rfc4880#section-5.2.3.24

This will allow other clients, including new versions of Delta Chat, to detect that contacts support SEIPDv2 and send SEIPDv2 packets.

Regenerating existing signatures is out of scope for the issue, we should make sure new keys have Features subpacket first.

With rsop using rpgpie new generated v6 keys have Features subpacket, rsop generate-key --profile rfc9580 | rpacket dump /dev/stdin shows:

Signature(
    Signature {
        packet_version: New,
        config: SignatureConfig {
            typ: Key,
            pub_alg: Ed25519,
            hash_alg: SHA2_512,
            unhashed_subpackets: [],
            hashed_subpackets: [
                Subpacket {
                    is_critical: false,
                    data: SignatureCreationTime(
                        2025-03-17T12:39:42Z,
                    ),
                },
                Subpacket {
                    is_critical: false,
                    data: KeyFlags(
                        03,
                    ),
                },
                Subpacket {
                    is_critical: false,
                    data: Features(
                        09,
                    ),
                },
...
@hko-s
Copy link

hko-s commented Mar 17, 2025

Right, the "features" subpacket itself is old and established. All software should be able to tolerate it, including if it has bits set that the software doesn't know about.

Like the SEIPDv2 support "features" bit, which is defined in RFC 9580: https://www.rfc-editor.org/rfc/rfc9580.html#features-subpacket

Setting this flag for new users at first seems like a good starting point to me as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants