pubring.gpg and secring.gpg are missing after key generation

2

I'm a newbie to GnuPG. I was following the instruction "Generating a Key Pair". And finally I do not see neither pubring.gpg nor secring.gpg in my ~/.gnupg directory:

chriss-MBP:.gnupg andrej$ ls -la
total 24
drwx------  10 andrej  staff   340 Feb  5 23:20 .
drwxr-xr-x+ 44 andrej  staff  1496 Feb  5 23:17 ..
srwxr-xr-x   1 andrej  staff     0 Feb  5 23:19 S.gpg-agent
-rw-------   1 andrej  staff     0 Feb  5 23:17 dirmngr.conf
-rw-------   1 andrej  staff     0 Feb  5 23:17 gpg.conf
drwx------   3 andrej  staff   102 Feb  5 23:20 openpgp-revocs.d
drwx------   4 andrej  staff   136 Feb  5 23:20 private-keys-v1.d
-rw-r--r--   1 andrej  staff  1375 Feb  5 23:20 pubring.kbx
-rw-------   1 andrej  staff    32 Feb  5 23:17 pubring.kbx~
-rw-------   1 andrej  staff  1280 Feb  5 23:20 trustdb.gpg

What am I doing wrong?

The key is seemed to be generated:

chriss-MBP:~ andrej$ gpg2 --list-keys
/Users/andrej/.gnupg/pubring.kbx
--------------------------------
pub   rsa2048/E40D351A 2016-02-05 [SC]
uid         [ultimate] My Name <my@email.com>
sub   rsa2048/EA645178 2016-02-05 [E]

I'm using GnuPG version 2.1.11:

chriss-MBP:.gnupg andrej$ gpg2 --version
gpg (GnuPG) 2.1.11
libgcrypt 1.6.4

My OS X version:

chriss-MBP:.gnupg andrej$ sw_vers -productVersion 
10.10.5

Andrej Istomin

Posted 2016-02-05T22:33:30.443

Reputation:

1This is a question about general tool usage and off topic on Stack Overflow. I voted for migration to Super User, please have a look at the [FAQ] next time posting a question and verify which site it fits. – Jens Erat – 2016-02-06T08:27:18.133

Answers

6

GnuPG 2.1 (and upwards) switched to a new keyring format with better performance. For newly generated keyrings, the keys are stored in the pubring.kbx file. Another change was merging public and private keyrings, that's why there is no additional secring.kbx.

With other words: the files changed, but you're not missing anything.

Jens Erat

Posted 2016-02-05T22:33:30.443

Reputation: 14 141

Thanks a lot for your explanation and sorry for placing post in the wrong place. – None – 2016-02-06T09:37:53.523

To clarify: does the pubring.kbx hold only public keys, or both public and private?? – lindhe – 2019-07-31T12:16:46.827

1GnuPG 2.1 merged the private keyring into the public keyring, both for the old keyring and new keybox formats. So yes: pubring.kbx holds both public and private keys. – Jens Erat – 2019-07-31T18:09:08.180

Thanks. Here is a source on that: https://www.gnupg.org/faq/whats-new-in-2.1.html

– lindhe – 2019-08-01T11:04:37.783