# Conflict when adding more than one RSA PGP Key

**URL:** <https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230>\
**Category:** SSH, OpenPGP, GPG\
**Created:** [February 13, 2021, 11:31pm UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230 "2021-02-13T23:31:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veloc](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Veloc](https://onlykey.discourse.group/u/Veloc)\
**Post date:** [February 13, 2021, 11:31pm UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230/1 "2021-02-13T23:31:43Z")

</div>

I have two PGP keys that I would like to add to OnlyKey. When I add one of them, it functions correctly in encrypting/decrypting. However, it will only function properly when there is only one key on the card.

For example, I’ll load Key A and it will work. When I auto load Key B, encrypting/decrypting with Key A no longer works but Key B will sometimes.  
When I load Key B first, it will encrypt/decrypt but when I auto load Key A the same conflict occurs where one or both keys will not work.

I’ve tried loading keys in different orders, confirming each time that the first key loaded will work.  
I’ve tried manually selecting slots, using auto load, or a combination of both with no success.  
I’ve not tried the only key command line.  
Only key is not in sysadmin mode.  
Both RSA Keys save successfully

I’ve read through just about all supporting documents and can’t find something that tackles this specific issue.  
If there is anyone that has ran into the same issue and found a resolution it would be much appreciated to know where I’m going wrong. Thanks!

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [February 15, 2021, 4:05pm UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230/2 "2021-02-15T16:05:02Z")

</div>

Whenever you load the key A you are overwriting key B and vice versa.

---

<div class="post-metadata">

**Author:** ![Veloc](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Veloc](https://onlykey.discourse.group/u/Veloc)\
**Post date:** [February 15, 2021, 4:19pm UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230/3 "2021-02-15T16:19:18Z")

</div>

So it can only store one key at a time? Do I have a misconception that it can store multiple?  
Or is it the method of which I’m using that’s causing the overwrite?

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [February 15, 2021, 5:04pm UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230/4 "2021-02-15T17:04:05Z")

</div>

For RSA keys there are 4 slots. An RSA PGP key has at least 2 keys taking up slots 1 and 2, you could manually load a second RSA PGP key to slots 3 and 4 for use with things like OnlyKey Agent - [OnlyKey SSH/GPG agent | Docs](https://docs.crp.to/onlykey-agent.html#stored-keys)

---

<div class="post-metadata">

**Author:** ![Veloc](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Veloc](https://onlykey.discourse.group/u/Veloc)\
**Post date:** [February 16, 2021, 4:15am UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230/5 "2021-02-16T04:15:42Z")

</div>

Thank you for your help. I’ll look into this more.

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [February 16, 2021, 2:52pm UTC](https://onlykey.discourse.group/t/conflict-when-adding-more-than-one-rsa-pgp-key/230/6 "2021-02-16T14:52:42Z")

</div>

To use two PGP keys with webcrypt (apps.crp.to) you can have one RSA PGP key and one X25519 PGP key which you load through the app using autoload like this:  
 ![image](https://global.discourse-cdn.com/free1/uploads/onlykey/original/1X/806aa013a3973c1120763b0e353cafd01f63600a.png)  
To use two or more PGP keys with OnlyKey agent you can load through the app manually and use like this:  
 ![image](https://global.discourse-cdn.com/free1/uploads/onlykey/original/1X/a993aeed65fc88af840e7744930335a1d8a72dd6.png)

```auto
$ onlykey-agent identity@myhost -sk 4

```
