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

Increase the maximum length of identity PGP fingerprint values from 20 bytes #77

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ltfschoen
Copy link

No description provided.

@davxy
Copy link
Contributor

davxy commented Feb 20, 2024

PGP key fingerprints are 20 bytes long.
If you hex encode 20 bytes obviously you get 40 chars (as 1 byte is encoded in 2 chars).

AFAICT the current implementation is correct as it allows you to put there 20 bytes.
In polkadot.js, to insert any data as a raw byte string you need to prefix it with 0x, otherwise is interpreted as a sequence of characters (40 in this case).

Source: I'm using pgp entry for my identity

@muelli
Copy link

muelli commented Mar 15, 2024

PGP key fingerprints are 20 bytes long.

note that the upcoming openpgp standard defines "A v6 fingerprint [as] the 256-bit SHA2-256 hash" in section 5.5.4.3. "Version 6 Key ID and Fingerprint" in https://datatracker.ietf.org/doc/draft-ietf-openpgp-crypto-refresh/ which is close to publication.

@davxy
Copy link
Contributor

davxy commented Mar 15, 2024

PGP key fingerprints are 20 bytes long.

note that the upcoming openpgp standard defines "A v6 fingerprint [as] the 256-bit SHA2-256 hash" in section 5.5.4.3. "Version 6 Key ID and Fingerprint" in https://datatracker.ietf.org/doc/draft-ietf-openpgp-crypto-refresh/ which is close to publication.

In that case we eventually need to update the max length to 32 bytes.

BTW, the issue with this RFC is mostly not the proposal to increase the max supported length of the fingerprint. Here the main issue is that there is a bit of confusion between the length in bytes and the length when the bytes are encoded as a hex string e.g. here and here

@anaelleltd anaelleltd added the Stale Is no longer pursued. label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Is no longer pursued.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants