Solved

Using .NET for PGP encrypted query string

Posted on 2004-09-01
3
465 Views
Last Modified: 2010-04-11
I need to pass two params to a URL (black box). I am being told that as long as I concatenate the string of params (similar to "param1=A#param2=B"), I can then encrypt the string using PGP and pass that encrypted string as a single param to where it needs to go. I have been provided the target's public key.

According to documentation I have found, PGP needs to have a file to read from. Is there a way I can make this happen without writing to a file? I absolutely must use PGP and their public key to perform this encrypted query string method. I am using .NET on WinTel platform, VB or C# independent.
0
Comment
Question by:PDubs
3 Comments
 
LVL 5

Accepted Solution

by:
rsriprac earned 250 total points
ID: 11960846
If you are collaing GnuPGP, then you have to write to file or pipe it in via stdin.  This is because GnuPGP is a separate program.  This article might clear up some details:

http://www.codeproject.com/csharp/gnupgdotnet.asp

I would recommend using the wrapper class they provide

-Ram
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11982556
silly question:
  why do you encrypt params when everyone on world can easyly decrypt it with the public key?
  sounds like a useless use of encryption ...

PGP/GPG can either read the data or the public key from STDIN, some versions of PGP can also read from a previously opend file  handle (AFAIK up to PGP 6.5.3), both, GPG and PGP also support a --batch option for that purpose.
0
 

Author Comment

by:PDubs
ID: 12019869
Ram -- Good suggestion. It works like a charm.

Hoffmann -- I am limited to the requirements given to me, that's why.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now