Skip to content

Conversation

3rdIteration
Copy link

Genesis block time is correct in Unix time, but human readable version is off by 10 minutes. (Single digit typo)

Basically this changes the fingerprint, so should be consistent so as to ensure compatibility between BIP85-GPG implementations.

(I am comparing my SeedSigner to Krux GPGap in this instance, the latter of which has gone with the human-readable time from the BIP whereas I went with Unix time and couldn't work out why the same input produced different results...)

Geneis block time is correct in Unix time, but human readable version is off by 10 minutes. (Single digit typo)
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Pinging @akarve and @scgbckbone for feedback.

Note on timestamps:

The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:05:05'</code> UTC) because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).
The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC) because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC) because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).
The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to UNIX Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC) because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).

Copy link
Contributor

@akarve akarve Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the creation time is set in GPG (right?) this does not affect the BIP-85 output per se. Nevertheless if someone generated a GPG key according to spec this would make any previously generated keys irreproducible. Moreover, the date is given at MUST. Therefore I recommend we not touch the date and instead add footnote on the discrepancy if desired.

Copy link
Author

@3rdIteration 3rdIteration Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BIP85 output is unchanged by this, but the fingerprint generated by GPG changes if the created timestamp is changed. (Even if the primary key itself is identical) The problem is that the spec is ambiguous, not that it should change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the spec is ambiguous

Agree, the spec needs to be clear.

Copy link
Contributor

@akarve akarve Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed the inconsistency and it should indeed be resolved. I request both a footnote containing the old human readable ts and a changelog entry for this correction. That way if someone used the incorrect timestamp they can at least get the same fingerprint.

Does the GPG API have a preferred or default timestamp format? If yes and it's epoch time then this change is less risky.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about API, but GPG packets include a timestamp in Unix time and while the command line tools will normally display a human readable time in your local timezone, if you ask it for the raw key data, you get Unix time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I request both a footnote containing the old human readable ts and a changelog entry for this correction. That way if someone used the incorrect timestamp they can at least get the same fingerprint.

@3rdIteration do you want to update for this feedback?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added something in 1887780

@jonatack jonatack added Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Bug fix labels Sep 17, 2025
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating. Feedback below.


====Corrected====

*Typo in human-readable timestamp for BIP85 GPG Keys
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*Typo in human-readable timestamp for BIP85 GPG Keys
* Typo in human-readable datetime for BIP85 GPG Keys that was incorrectly noted as '2009-01-03 18:05:05' rather than '2009-01-03 18:15:05', so implementations that relied on it instead of UNIX Epoch timestamp 1231006505 will produce different key fingerprints.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would use "datetime string" here too


===1.3.1 (2025-09-19)===

====Corrected====
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usual title for changelog fixes

Suggested change
====Corrected====
====Fixed====

Note on timestamps:

The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC) because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).
The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC)<ref>The human readable timestamp was incorrectly noted as '2009-01-03 18:05:05' prior to v1.3.1 of this BIP, so implementations that relied on this will produce different key fingerprints.</ref> because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to unix Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC)<ref>The human readable timestamp was incorrectly noted as '2009-01-03 18:05:05' prior to v1.3.1 of this BIP, so implementations that relied on this will produce different key fingerprints.</ref> because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).
The resulting RSA key can be used to create a GPG key where the creation date MUST be fixed to UNIX Epoch timestamp 1231006505 (the Bitcoin genesis block time <code>'2009-01-03 18:15:05'</code> UTC)<ref>The human-readable datetime string was incorrectly noted as '2009-01-03 18:05:05' prior to v1.3.1 of this BIP, so implementations that relied on it rather than UNIX Epoch timestamp 1231006505 will produce different key fingerprints.</ref> because the key fingerprint is affected by the creation date (Epoch timestamp 0 was not chosen because of legacy behavior in GNUPG implementations for older keys). Additionally, when importing sub-keys under a key in GNUPG, the system time must be frozen to the same timestamp before importing (e.g. by use of <code>faketime</code>).

@scgbckbone
Copy link
Contributor

ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants