Questions tagged [gpgme]

GPGME (abbreviated from GnuPG Made Easy) is a library designed to make access to GnuPG easier for applications.

71 questions
27
votes
2 answers

Best way to soft brute-force your own GPG/PGP passphrase?

I created a nice long passphrase, used it a few times, then forgot it ;) The twist is, I know the general theme and probably almost all of the characters. The perfectionist in me doesn't want to revoke the key or anything like that (and I think I…
Sam Brightman
  • 2,831
  • 4
  • 36
  • 38
11
votes
1 answer

Unable to generate gpg keys in linux

I'm not able to generate GPG keys in linux sudo gpg --gen-key # This is the command to try to generate key error You need a Passphrase to protect your secret key. gpg: problem with the agent: Timeout gpg: Key generation…
user2932003
  • 171
  • 2
  • 4
  • 14
9
votes
1 answer

gpgme: selecting a private key when signing data

Using gpgme (the development library for gpg/gnupg), I'm trying to sign some data. In the key ring I have more then 1 private key so I want to select the correct one. This fails with: "Unusable secret key (117440566)". The key was generated with…
Folkert van Heusden
  • 433
  • 4
  • 17
  • 38
8
votes
1 answer

How to decrypt PGP encrypted file with Ruby gpgme

I can't find a single example of how to do this. I have a PGP encrypted XLS file and a PGP key. Here's is my code that returns an empty string: require 'rubygems' require 'gpgme' def passfunc(obj, uid_hint, passphrase_info, prev_was_bad, fd) io…
Vincent
  • 16,086
  • 18
  • 67
  • 73
6
votes
4 answers

How to prevent passphrase-caching from within a gpgme-based Python script?

The following short Python script takes three command-line arguments: a passphrase, an input path, and an output path. Then it uses the passphrase to decrypt the contents of the input path, and puts the decrypted content in the output path. from…
kjo
  • 33,683
  • 52
  • 148
  • 265
5
votes
2 answers

PHP gnupg enrypt works but decrypt not

i'm about to use gnupg to encrypt and decrypt files. The strange thing is, encrypt works fine, but decrypt always returns false. Here a simple php script encrypting and decrypting content: $content = 'test…
Wolf-Tech
  • 1,259
  • 3
  • 18
  • 38
5
votes
1 answer

search for a public key on a keyserver with GPGME

Today I started a new thread on gnupg mailing list, Search keys on a keyserver with GPGME. Basically I use GPGME as an interface to use GnuPG in my app, but I don't know how I can use GPGME functions to search for a key on a keyserver. Any idea?
josecampos
  • 851
  • 1
  • 8
  • 25
4
votes
1 answer

How to import GPG key and decrypt file using C++ GPGME

How do I simply load a gpg key to import into a context using GPGME C++ library? I am trying to build an application that decrypts a file using GPGME but I am struggling to understand the GPU Documentation. I've tried to search the web for examples…
4
votes
1 answer

Verifying a GPG signature using a specific public key with GPGME in C / C++

I have a C++ program that needs to verify the signature of a file that has been signed with GPG using a specific private key. Using GPGME I have successfully written a program that verifies that the given file has been properly signed with a private…
Kevin Salvesen
  • 293
  • 1
  • 13
4
votes
0 answers

Importing key from server with gpgme

I'm trying to import a key from a keyserver using GPGME. I'm sure the key exists, since I can see it when I access the server with my browser. I followed the manual and produced this: gpgme_key_t key; gpgme_keylist_mode_t mode =…
3
votes
1 answer

Using the gpgme library from .NET?

This question is actually two questions: How to use the gpgme library in Windows? Are there bindings for .NET available somewhere? (If not, I guess I can make my own.) EDIT: Solution found: gpgme-sharp works very nicely both in Linux and Windows.…
JCCyC
  • 16,140
  • 11
  • 48
  • 75
3
votes
1 answer

How to verify GPG signature with OpenSSL

I wrote a simple cross-platform utility to verify GPG signatures using the gpgme. However gpgme doesn't work very well on windows and on other platforms (e.g. osx) it requires GnuPG command line utilities installed which is a pretty heavy…
Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
3
votes
1 answer

C GPGMe ignore user keyring

I recently finished a program that downloads public keys into memory, then creates an encrypted message with all of them. However, I have been having some difficulty creating a list of only the keys I download. When they are first downloaded, they…
735Tesla
  • 3,162
  • 4
  • 34
  • 57
3
votes
3 answers

Using passphrase callback in ruby gpgme

I am using ruby gpgme gem (1.0.8). My passphrase callback isn't called: def passfunc(*args) fd = args.last io = IO.for_fd(fd, 'w') io.puts "mypassphrase" io.flush end opts = { :passphrase_callback =>…
edbond
  • 3,921
  • 19
  • 26
3
votes
1 answer

How to get gpg-agent to ask for passphrase when generating keys with GPGME?

I'm using pygpgme to generate keys, which works fine, but I have to provide the passphrase to gpgme like this: key_params = dedent(""" Key-Type: RSA Key-Length: 2048 Name-Real: Jim Joe …
1
2 3 4 5