Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can only decrypt, but not encrypt [No public key] #382

Open
HendrikHuel opened this issue Feb 26, 2024 · 2 comments
Open

Can only decrypt, but not encrypt [No public key] #382

HendrikHuel opened this issue Feb 26, 2024 · 2 comments

Comments

@HendrikHuel
Copy link

My team and I are using blackbox to share confidential data. The keys of my collegues are added to the keychain and all, but I, are able to decrypt and encrypt files.

I can only decrypt files using blackbox/blackbox_edit_start or blackbox/blackbox_decrypt_file. I cannot add a new files or encrypt them after a change via blackbox_edit_end. Also I am not able to add new files via blackbox/blackbox_register_new_file. Both commands run in a "No public key" error.

The strange thing is that if I run gpg --list-keys from the blackbox' source I only see my keys, but when when I run gpg --homedir .blackbox I do see all keys from my collegues and mine.
Then when I try to decrypt the total number processed gpg: Total number processed: does not match the number of keys from the keychain in --homedir .blackbox but the number of keys in my keychain without defining a homedir.

How can I change my homedir such that blackbox can use it properly?

The number of files in ~/user/.genupg/private-keys-v1.d matches the number of keys of my team.

My machine is a MAC (14.2.1 (23C71)) and I use
gpg (GnuPG) 2.4.4
libgcrypt 1.10.3

@tlimoncelli
Copy link
Contributor

Hi there!

I'm not sure what the problem would be, but I have a guess. Is it possible that someone added keys that are incompatible with older GnuPG versions? As a result, each user sees a different subset of keys?

I once saw something like this. We had some users with CentOS 7, which had a very old version of GnuPG. Other users had Macs with newer GnuPG. We had to freeze all changes to the repo and re-key everyone using the same exact GnuPG version.

@HendrikHuel
Copy link
Author

My collegue who initialized our keys uses gpg 2.4.3 and a other collegue that has no problems using the deployed keys has version 2.2.27. So I am not sure if it could be a problem involving legacy versions.

I managed to get the encryption running by first setting the environement variable for gpg homedirectory export GNUPGHOME "<full/path/to/.blackbox>". With the variable gpg --list-keys lists only the relevant keys.

Without setting the env variable gpg --version yields Users/<user>/.gnupg as Home:, which is the expected default I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants