Page MenuHome GnuPG

Failure to export plaintext v5 secret key.
Open, NormalPublic

Description

I'm investigating GnuPG v5 functionality, so modified GnuPG sources to always generate v5 keys. This works (including using generated keys with GnuPG 2.4.0), however attempt to export non-encrypted secret key fails, producing the following packet dump for RSA key:

# off=0 ctb=95 tag=5 hlen=3 plen=2921
:secret key packet:
	version 5, algo 1, created 1686657810, expires 0, pkbytes 391
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	protbytes: 0
	skbytes: 201210263
	skey[2]: [MPI_NULL]
	skey[3]: [2685 bits]
	skey[4]: [MPI_NULL]
	skey[5]: [MPI_NULL]
# off=2924 ctb=b4 tag=13 hlen=2 plen=6
:user ID packet: "v5_rsa"

For encrypted secret key export/import back works well.

Details

Version
2.4.0

Event Timeline

werner added a subscriber: werner.

Thanks, we will take care of this.

I general think it will be better if we use the new OCB format for exporting secret v5 keys. m However, this has not yet been implemented.

werner triaged this task as Normal priority.Jun 13 2023, 7:41 PM