sahar yousefi saharyousefi82 at
Mon May 30 20:21:13 CEST 2011

I'm working on asymmetric keys for encryption and decryption of files. I am going to encrypt data on sender PC using receiver's public key and send encrypted data to receiver in order to decrypt it using its private key.
 I have two PCs (A and B). I created a (public key, private key) on A and sent its public key to B. the public key is attached. Then I tried to encrypt a dir using "gpgdir" command. But I encountered below error. I'm wondered why gpg is looking for A's private key? Whenever we don’t want B knows the private key? How can I fix it?
# gpgdir --verbose -K el_ghasemi at -e /home/yousefi/Desktop/a
[+] import_perl_modules(): The @INC array:
[+] Executing: gpgdir --verbose -K el_ghasemi at -e /home/yousefi/Desktop/a
    Using GnuPG key: el_ghasemi at
    Enter password (for initial encrypt/decrypt test)
Password: 21961363
[+] test_mode(): Encrypt/Decrypt test of gpgdir_test.2902
[+] test_mode(): Created gpgdir_test.2902
Reading passphrase from file descriptor 9    
pub  1024R/18EA55AA 2011-05-30 ghasemi (this is a encrypt test) <el_ghasemi at>
 Primary key fingerprint: C4F9 1073 B733 C752 C18C  EF81 1BFC 4C86 58C0 723B
      Subkey fingerprint: D953 4E49 13CA 998C BF0F  3CE5 7E3A 9360 18EA 55AA
It is NOT certain that the key belongs to the person named
in the user ID.  If you *really* know what you are doing,
you may answer the next question with yes.
Use this key anyway? (y/N) y
gpg: 18EA55AA: There is no assurance this key belongs to the named user
[+] test_mode(): Successful encrypt of gpgdir_test.2902
Reading passphrase from file descriptor 9    
    GnuPG errors:
gpg: encrypted with 1024-bit RSA key, ID 18EA55AA, created 2011-05-30
      "ghasemi (this is a encrypt test) <el_ghasemi at>"
gpg: decryption failed: secret key not available
    GnuPG status:
[GNUPG:] ENC_TO 7E3A936018EA55AA 1 0
[*] Created zero-size file: gpgdir_test.2902
    Bad password? Try with --verbose at /usr/bin/gpgdir line 642.
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110530/ab384a48/attachment-0001.htm>

More information about the Gnupg-users mailing list