469,927 Members | 1,904 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

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
Dec 13 '07 #1
3 4262
"Bruce" <fake_dont_send@anything_.comwrote in message
news:OD**************@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
Dec 13 '07 #2

"Anthony Jones" <An*@yadayadayada.comwrote in message
news:OB**************@TK2MSFTNGP04.phx.gbl...
"Bruce" <fake_dont_send@anything_.comwrote in message
news:OD**************@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

Dec 13 '07 #3
"Bruce" <fake_dont_send@anything_.comwrote in message
news:e6**************@TK2MSFTNGP05.phx.gbl...
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:OB**************@TK2MSFTNGP04.phx.gbl...
"Bruce" <fake_dont_send@anything_.comwrote in message
news:OD**************@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

Dec 13 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dave Bailey | last post: by
2 posts views Thread by Paul Fi | last post: by
4 posts views Thread by pintu | last post: by
3 posts views Thread by =?Utf-8?B?TG9yZW4=?= | last post: by
9 posts views Thread by Betikci Boris | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.