gnupg

How to deal with Gnupg error: gpg: no default secret key: No secret key gpg: [stdin]: clearsign failed: No secret key?

本秂侑毒 提交于 2019-12-05 03:32:36
I am getting an error: gpg: no default secret key: No secret key gpg: [stdin]: clearsign failed: No secret key My secret keys are available to GPG. It might be difference between gpg1 and gpg2. The secret keys are stored in different ways. You may have both of them. Try which gpg gpg2 If you do have both, run: gpg2 --list-secret gpg --list-secret You maybe able to tell that one works, another does not. Here's the answer: I am using latest gnupg version , but I have to use 0.44 gnupg interface version. I have reinstalled the gnupg. Then no compilation errors were found. I am able to sign my

Using BouncyCastle with GnuPG 2.1's `pubring.kbx` file

拈花ヽ惹草 提交于 2019-12-05 03:11:10
问题 I'm trying to use BouncyCastle with PGP2 to read public keys ring. The problem is that since GnuPG 2.1 it's stored in pubring.kbx instead of pubring.gpg . That leads to IOException public key ring doesn't start with public key tag: tag 0x0 Any idea if and how I can use BC with GnuPG 2.1? 回答1: GnuPG 2.1 by default uses the new keybox file format -- if no pubring.gpg is found. If there is a "legacy" keyring file, it will be used instead. I'm not aware Bouncy Castle supports the .kbx file format

Problem decrypting PGP in python with pyme without user interaction

爱⌒轻易说出口 提交于 2019-12-04 20:45:00
I am trying to decrypt messages using pyme (a python wrapper from gpgme). It works fine if I type in the password when it prompts but I cannot get the passphrase callback to work. Here is the code import pyme.core def Callback( x, y, z ): print 'in passphrase callback' return 'passphrase' plain = pyme.core.Data() cipher = pyme.core.Data(sys.stdin.read()) c = pyme.core.Context() c.set_armor(1) c.set_passphrase_cb(Callback) c.op_decrypt( cipher, plain ) plain.seek(0,0) print plain.read() When I run this and don't provide the password interactively the program then tries the Callback printing 'in

PHP ASCII Armored PGP encrypted string

血红的双手。 提交于 2019-12-04 20:31:43
I need to PGP encrypt and ASCII armor a small string/token within a MediaWiki environment using a public key provided to me by a third party. This gives me: need to use PHP better to stay away from exec_shell() ... true? web server environment I am planning to use GnuPG lib after reading this: http://devzone.zend.com/1278/using-gnupg-with-php/ What user should have PGP public key stored in their .gnupg folder? UPDATE 1 so far I am testing hard-coding public key in (for now, just to test it out) // GnuPG stuff putenv("GNUPGHOME=/tmp"); $pubkey = "-----BEGIN PGP PUBLIC KEY BLOCK----- Version:

what is the best/easiest to use encryption library in python [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-04 15:51:19
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I want to encrypt few files using python what is the best way I can use gpg/pgp using any standard/famous python libraries? 回答1: PyCrypto seems to be the best one around. 回答2: Try KeyCzar Very easy to implement.

Clojars发布项目全流程笔记

无人久伴 提交于 2019-12-04 14:54:31
##0、确保‘clojars.org’可访问(关键)。 注1:安装lein,不在本文范围 注2:安装gpg,不在本文范围。请移步: http://www.ruanyifeng.com/blog/2013/07/gpg.html 注3:gpg下载链接 http://gpg4win.org/download.html ,我找的最小的下 gpg4win-vanilla。 注4:带括号的步骤为验证性质,可忽略。 ##1 $ lein new just-for-fun ##2 project.clj (defproject misty000/just-for-fun "0.0.1" ##(3)$ lein deploy clojars (尝试发布,提示没有gpg秘钥,先安装gpg) WARNING: please set :url in project.clj. No credentials found for clojars (did you mean lein deploy clojars ?) See lein help deploy for how to configure credentials. Username: yours@sohu.com Password: Wrote /home/yours/文档/Devel/just-for-fun/pom.xml Created

Adding a OpenPGP signature to an already signed document? [closed]

穿精又带淫゛_ 提交于 2019-12-04 13:17:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . We'd like to implement a workflow that requires multiple people to digitallly sign a document. If I have multiple secret keys in my own keychain, I can do something as simple as: gpg --sign -u userid1 -u userid2 filename But what do I do if I've got an already signed document and I want to add a signature? One

gpg with powershell - passphrase security

泄露秘密 提交于 2019-12-04 12:53:20
I'm using gnupg to encrypt and decrypt data via powershell script and the problem is, that I have passphrase in the code. It's propably not the best solution. Which is the best and secure way to provide passphrase to script? Thank you. C:\"Program Files"\GNU\GnuPG\gpg2.exe --passphrase mypassphrase --batch --output C:\Z\$decrypted_file.xls --decrypt C:\_Zo\$encrypted_file You can Crypt the passphrase or the password on the disk. The following solution use computer as a user . The following two scripts the securot framework .NET assembly. For server computers, it's possible to protect the

Getting BouncyCastle to decrypt a GPG-encrypted message

跟風遠走 提交于 2019-12-04 11:50:35
How can I get BouncyCastle to decrypt a GPG-encrypted message? I have created a GPG key pair at the CentOS 7 command line using gpg --gen-key . I chose RSA RSA as the encryption types, and I exported the keys using gpg --export-secret-key -a "User Name" > /home/username/username_private.key and gpg --armor --export 66677FC6 > /home/username/username_pubkey.asc I am able to import username_pubkey.asc into a remote Thunderbird client of another email account and successfully send an encrypted email to username@mydomain.com. But when my Java/BouncyCastle code running at mydomain.com tries to

gpg: keyblock resource pubring.kbx not found because the repo path is prefixed to the gnupg home

落爺英雄遲暮 提交于 2019-12-04 10:03:34
I used to have my commits signed by gpg which worked all fine, but I suddenly got this message instead: gpg: keyblock resource '/c/Users/username/path/to/project/C:\Users\username\.gnupg/pubring.kbx': No such file or directory gpg: skipped "my_key": No secret key gpg: signing failed: No secret key error: gpg failed to sign the data fatal: failed to write commit object Note the path of the keyblock resource, it consists of two paths and is indeed not valid. Information about my setup I had my commits automatically signed, my setup is from this answer , in summary: I set up gpg like normal, then