Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9289875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:17:05+00:00 2026-06-18T20:17:05+00:00

I am using GnuPG library to encrypt decrypt messages. I have successfully confirgured the

  • 0

I am using GnuPG library to encrypt decrypt messages. I have successfully confirgured the GPG extension on my server and generated a key pair. Also I am successfull in importing another public key and enrypting data using that public key.

I also encrypted data using my public key and decrypted it using my private key.

But when somebody else encrypts data using my public key I am unable to decrypt it. the error is

Warning: gnupg_decrypt(): decrypt failed in pgpdecrypt.php on line 22 

my code is

$Message = $_REQUEST["Message"];

// Specify custom location of GnuPG binary.
$res = gnupg_init();

gnupg_seterrormode($res, GNUPG_ERROR_WARNING); 

$rtv = gnupg_adddecryptkey($res, "rizwan@google.com", "0000");
echo gnupg_geterror($res) . "<br>"; // Print if any errors

$enc = gnupg_decrypt($res, $Message); // ERROR IS AT THIS LINE
echo gnupg_geterror($res) . "<br>"; // Print if any errors
echo $enc;

this same code is decrypting data encrypted by me at my machine.

I am unable to extract error details.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:17:06+00:00Added an answer on June 18, 2026 at 8:17 pm

    Cipher Algorithm 6 reffers to DES. DES is not supported in GnuPG, it uses 3DES/Triple-DES instead. I encrypted the data using 3DES and it successfuly decrypted at my site.

    Hope this helps to other people encountering same problem. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to import a GPG key in a PHP script, it works using
I'm using gnupg to encrypt and decrypt data via powershell script and the problem
I'm getting an error when I try to decrypt using PostgreSQL's gnupg extension and
There is a PHP extension port of the gnupg PGP library. However, I'm having
i have noticed when using python gnupg, that if i sign some data and
I am trying to decrypt a file from the server where I have the
Using SQL Server 2008 R2 we are looking for a way to select the
Using Microsoft SQL Server 2005, is there any way to see when a table
I'm developing a Google Chrome extension using the NaCL. It's pretty cool and easy
Using ember 1.0.0-pre3 I have a little app that has this code: window.App =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.