Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Simple Asymmetric encryption/decryption (http://www.velocityreviews.com/forums/t803834-simple-asymmetric-encryption-decryption.html)

Bruce 12-13-2007 12:11 AM

Simple Asymmetric encryption/decryption
 
How can I encrypt strings using an asymmetric key?

I want to encrypt short strings (credit card numbers, etc.) and save the
encrypted strings into a database. When accessing the data (i.e. the web
admin), he will provide a password (the decryption key).

There are DLL components (http://www.aspencrypt.com), but I can't register a
DLL on the machine (hosted server).

If you know of something, or some code samples, it'll be highly appriciated.

I also found this http://www.4guysfromrolla.com/webtech/010100-1.shtml (read
only if you're in the USA :)


Thanks



Anthony Jones 12-13-2007 09:24 AM

Re: Simple Asymmetric encryption/decryption
 
"Bruce" <fake_dont_send@anything_.com> wrote in message
news:ODgCM0RPIHA.5524@TK2MSFTNGP05.phx.gbl...
> How can I encrypt strings using an asymmetric key?
>


Public/Private key based systems are asymmetric. Below you talk about using
a password, that would be symmetric since the data is decrypted using the
same key that encrypted it.

> I want to encrypt short strings (credit card numbers, etc.) and save the
> encrypted strings into a database. When accessing the data (i.e. the web
> admin), he will provide a password (the decryption key).
>
> There are DLL components (http://www.aspencrypt.com), but I can't register

a
> DLL on the machine (hosted server).
>
> If you know of something, or some code samples, it'll be highly

appriciated.
>
> I also found this http://www.4guysfromrolla.com/webtech/010100-1.shtml

(read
> only if you're in the USA :)
>


RC4 looks good and has some example code why don't you use that?


--
Anthony Jones - MVP ASP/ASP.NET



Bruce 12-13-2007 04:33 PM

Re: Simple Asymmetric encryption/decryption
 

"Anthony Jones" <Ant@yadayadayada.com> wrote in message
news:OB$ztnWPIHA.1188@TK2MSFTNGP04.phx.gbl...
> "Bruce" <fake_dont_send@anything_.com> wrote in message
> news:ODgCM0RPIHA.5524@TK2MSFTNGP05.phx.gbl...
>> How can I encrypt strings using an asymmetric key?
>>

>
> Public/Private key based systems are asymmetric. Below you talk about
> using
> a password, that would be symmetric since the data is decrypted using the
> same key that encrypted it.


By "password" I meant the (asymmetric) secret key that will decrypt the
strings.

The reason I'm looking for asymmetric, is because I don't want to store the
key on the same server that keeps the data.

I also don't want to use the SQL server to decrypt, since it's hosted on a
shared hosting, and I don't want to bund myself to specific features that
that hosting company is providing. So I'm looking for some pure lovely ASP
code.

Bruce

>> I want to encrypt short strings (credit card numbers, etc.) and save the
>> encrypted strings into a database. When accessing the data (i.e. the web
>> admin), he will provide a password (the decryption key).
>>
>> There are DLL components (http://www.aspencrypt.com), but I can't
>> register a
>> DLL on the machine (hosted server).
>>
>> If you know of something, or some code samples, it'll be highly
>> appriciated.
>>
>> I also found this http://www.4guysfromrolla.com/webtech/010100-1.shtml
>> (read only if you're in the USA :)
>>

>
> RC4 looks good and has some example code why don't you use that?


> --
> Anthony Jones - MVP ASP/ASP.NET




Anthony Jones 12-13-2007 11:41 PM

Re: Simple Asymmetric encryption/decryption
 
"Bruce" <fake_dont_send@anything_.com> wrote in message
news:e6BuUZaPIHA.2000@TK2MSFTNGP05.phx.gbl...
>
> "Anthony Jones" <Ant@yadayadayada.com> wrote in message
> news:OB$ztnWPIHA.1188@TK2MSFTNGP04.phx.gbl...
> > "Bruce" <fake_dont_send@anything_.com> wrote in message
> > news:ODgCM0RPIHA.5524@TK2MSFTNGP05.phx.gbl...
> >> How can I encrypt strings using an asymmetric key?
> >>

> >
> > Public/Private key based systems are asymmetric. Below you talk about
> > using
> > a password, that would be symmetric since the data is decrypted using

the
> > same key that encrypted it.

>
> By "password" I meant the (asymmetric) secret key that will decrypt the
> strings.
>
> The reason I'm looking for asymmetric, is because I don't want to store

the
> key on the same server that keeps the data.
>
> I also don't want to use the SQL server to decrypt, since it's hosted on a
> shared hosting, and I don't want to bund myself to specific features that
> that hosting company is providing. So I'm looking for some pure lovely ASP
> code.
>



So if the host doesn't have the 'secret key' (you mean private key right?)
Where is the key held and how does it get to where its needed?

I've not seen a public/private algorithm implemented in VBScript before.

I'm still not sure I understand why this system needs to asymmetric, can't
you just do the encryption in the same place using the same key as the
decryption?


--
Anthony Jones - MVP ASP/ASP.NET





All times are GMT. The time now is 09:56 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.