Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
5 add key status
source | link

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

My keyring now looks something like this:

❯❯❯ gpg --list-secret-keys
/home/caleb/.gnupg/pubring.gpg
------------------------------
sec   rsa4096/75267693 2014-07-31 [expires: 2016-02-02]
uid         [ultimate] Caleb Maclennan <caleb@alerque.com>
ssb   rsa4096/B89B1E86 2014-07-31 [expires: 2018-07-30]
ssb>  rsa2048/85BD5AD1 2015-10-06 [expires: 2016-10-05]
ssb>  rsa2048/DFE6D89D 2015-10-06 [expires: 2016-10-05]

For encrypting I'm running something like this:

❯❯❯ gpg --default-keyrecipient B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besidesI've tried all of --default-key I've trid, --local-user (-u), and --recipient (-r) including in combination. Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?  

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

For encrypting I'm running something like this:

❯❯❯ gpg --default-key B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besides --default-key I've trid --local-user (-u) and --recipient (-r). Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?  

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

My keyring now looks something like this:

❯❯❯ gpg --list-secret-keys
/home/caleb/.gnupg/pubring.gpg
------------------------------
sec   rsa4096/75267693 2014-07-31 [expires: 2016-02-02]
uid         [ultimate] Caleb Maclennan <caleb@alerque.com>
ssb   rsa4096/B89B1E86 2014-07-31 [expires: 2018-07-30]
ssb>  rsa2048/85BD5AD1 2015-10-06 [expires: 2016-10-05]
ssb>  rsa2048/DFE6D89D 2015-10-06 [expires: 2016-10-05]

For encrypting I'm running something like this:

❯❯❯ gpg --recipient B89B1E86 -a -e test.txt

But I've tried all of --default-key, --local-user (-u), and --recipient (-r) including in combination. Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?

4 added 32 characters in body
source | link

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

For encrypting I'm running something like this:

❯❯❯ gpg --default-key B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besides --default-key I've tridetrid --local-user (-u) and --recipient (-r). Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

For encrypting I'm running something like this:

❯❯❯ gpg --default-key B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besides --default-key I've tride -u and -r. Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

For encrypting I'm running something like this:

❯❯❯ gpg --default-key B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besides --default-key I've trid --local-user (-u) and --recipient (-r). Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?

3 added 552 characters in body
source | link

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

For encrypting I'm running something like this:

❯❯❯ gpg --default-key B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besides --default-key I've tride -u and -r. Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

What is the proper procedure to encrypt using a specific subkey?

I recently generated two new subkeys to put on an external key card. I previously had a master key (usage marked SC) and a single subkey (marked E). This arrangement was worked fine for what I needed in keeping a few local files private. Just now I created two new subkeys using addkey, one signing key and one encryption key. Each of these I transfered to my card using keytocard. That seems to have worked fine and the card does what I expect.

The issue now is I can't figure out how to encrypt a file using my first subkey (key 1). No matter what I specify as a recipient or user (including the subkey id) the resulting file shows up as being encrypted against they key that's now on my card (and only on my card!).

For encrypting I'm running something like this:

❯❯❯ gpg --default-key B89B1E86 -a -e test.txt
File 'test.txt.asc' exists. Overwrite? (y/N) y

But besides --default-key I've tride -u and -r. Any way I shake it, decrypting the result tells be it's encoded with my card key instead:

❯❯❯ gpg -d test.txt.asc
gpg: encrypted with 2048-bit RSA key, ID DFE6D89D, created 2015-10-06
      "Caleb Maclennan <caleb@alerque.com>"
gpg: public key decryption failed: Card error
gpg: decryption failed: No secret key

What is the proper procedure to encrypt using a specific subkey?

2 edited title
| link
1
source | link