-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Message. This after "sign+encrypt" by encryption public key RSA,
and signing this by ECC private key.
Qustion: Can I get an encrypted message without decryption,
by only VERIFY the signature,
or can I get the signed message without decryption
throught option decrypt-only, using only Receiver's Private Key (decryption)?
I see some cases:
- Sign, then encrypt <-> decrypt, then verify.
- Encrypt, then sign <-> verify, then decrypt.
- Someone else...
When I trying to decrypt, using private key RSA only - for message,
which encrypted by RSA public key, I see:
Error: Can't find a key for "blah-blah-blah": key not found: ["blah-blah-blah"].
"blah-blah-blah" - this is ECC key in keyring. I did console.log('keyring', keyring);
When I trying to verify this message using ECC private key,
i see another error: Error: key not found: ["bla-bla-bla"] - and this key is RSA key.
And when I trying to checksig using public key RSA, by which message was been encrypted,
I see the same error: Error: key not found: ["bla-bla-bla"] -> so this seems,
like ID corresponding for PRIV RSA.
But... In keyring in verify function, when I trying to checksig, using pub RSA,
I see this:
verify function, key-ring: PgpKeyRing
_keys: Object
...............................: Object
bla-bla-bla: Object
...............................: Object
and that means, key is there. Maybe keyring box need some fix, or fetch function in kbpgp not working correcly.
If the way for sign+encrypt is (first encrypt by pub, then sign by another priv) correctly,
then I think, I can get encrypted message, after checksig,
using only pub, corresponding the ANOTHER PRIV.
Or if sign+encrypt doing by this way (first sign by priv, then decrypt by pub),
then I can get signed message, after simply decryption-only, using Receiver's priv.