private key crypto on form post data

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: ESPN Lover (espn_at_lover.com)
Date: 02/25/05


Date: Fri, 25 Feb 2005 08:08:59 -0700

Hello,

I need to find a way to encode a form post element with a private key, which
then can be decoded using that same private key using ASP. Yeah, Yeah, I
know strange request. Is there some object on my IIS 6 server or some
object in the Win2000 OS that would allow me to pass in data and a key and
get back the encoded data as well as being able to pass in the encoded data
with the key and get back decoded data?

Would prefer to use a syntax like
  DIM myData, X
  myData = ...some routine to get data...
  SET X = Server.CreateObject("COMPONENT.CLASS")
  DIM enc
  enc = X.Encode(myData, myKey)
  SET X = Nothing
  Response.Write "<INPUT Type=Hidden Name=EncodedStuff Value=" & enc & ">"

Then on form receipt
  DIM myEncData, enc
  myEncData= Request.Form("EncodedStuff")
  SET X = Server.CreateObject("COMPONENT.CLASS")
  DIM decoded
  decoded= X.Decode(myEncData, myKey)
  SET X = Nothing
  do stuff with decoded data....

Thank you!



Relevant Pages

  • Re: Posting data in a loop
    ... ' Write encoded data into request stream ... Dim myStream As System.IO.Stream = resp.GetResponseStream ... Dim encode As System.text.Encoding = ... ' Pipe the stream to a higher level stream reader with the required encoding ...
    (microsoft.public.dotnet.framework)
  • ECDsaCng elliptic curve class exception on import of private key
    ... I was playing around with the new ECDsaCng elliptic curve class of the ... importing a previously exported private key. ... Dim bSignature() As Byte ...
    (microsoft.public.dotnet.security)
  • Re: Sign hash with public key
    ... You can encrypt with public key and decrypt with private. ... You can sign with private key and verify with public. ... Dim AlgHash As HashAlgorithm = HashAlgorithm.Create ...
    (microsoft.public.dotnet.security)
  • Re: Using private keys to sign hash
    ... Dim store As Microsoft.Web.Services2.Security.X509.X509CertificateStore = ... I have a certificate and private key generated by a tool that I didn't ... I was told that a private key without ...
    (microsoft.public.dotnet.security)
  • Re: 512 bit encryption with RSACryptoServiceProvider results in "Bad Key"
    ... Both these tests will get a Machine Certificate and then Encrypt and Decrypt ... "Private Key" to encrypt and "Public Key" to decrypt, ... Dim CAPI_Store As New CAPICOM.Store ...
    (microsoft.public.dotnet.security)