Open dtitov opened 6 years ago
I can have a look on Monday.
Same problem with the keys
service: key server is not able to return key by subkey ID. Read more about subkeys: https://wiki.debian.org/Subkeys
For instance, I generate PGP key with primary key (2FD9AF1FBFD7B257
) and subkey (CFC24A1FC03D5658
). While encrypting with Crypt4GH (Java implementation, because Python implementation doesn't support it, as far as I understand), the subkey ID used for encryption will be placed to the header (CFC24A1FC03D5658
). But in the key server the key will be cached by master key ID (2FD9AF1FBFD7B257
). So it can't be returned to decrypt the file in verify
...
@blankdots, could you, please, take a look to confirm it? We'd probably need separate issue for this problem.
@dtitov Is the still valid?
I didn't know where to create this issue, here or in the
lega-cryptor
's repo, but since it affects my current task in this repo, I placed it here. Feel free to create a copy there.I'm writing Gradle script for Docker Swarm bootstrapping and deployment and I'm generating PGP keys there using BouncyCastle.
The problem is that
lega-cryptor
is not able to use those keys for encryption:The first thing that I don't like here is the warning about
EncryptStorage
andEncryptCommunications
flags. I believe that it should be suppressed. In my case, the master key is the signing key and then there's subkey for encryption, which is being used. But anyway, it's just a warning, not the real problem.The real problem is
list index out of range
. I have no idea what does it mean and why is it thrown.To prove that the key itself is fine I double-checked encryption with both: Java implementation of Crypt4GH and with standard GPG tool. In both cases encryption was successful. Here's example with GPG:
Here's an example of key being used:
It's possible that I'm doing something wrong during the key generation. But two successful encryptions with other tools make me beleive that the generated key is fine.
@silverdaz, could you, please, assess and help with figuring out what can be wrong here?