Skip to content

Conversation

@ltfschoen
Copy link

No description provided.

@davxy
Copy link
Member

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
Member

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