Simple Asymmetric encryption/decryption

B

Bruce

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
 
A

Anthony Jones

Bruce said:
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?
 
B

Bruce

Anthony Jones said:
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
RC4 looks good and has some example code why don't you use that?
 
A

Anthony Jones

Bruce said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Python and PHP encryption/decryption 3
Encryption & Decryption 6
simple encryption/decryption 3
Cookie encryption? 7
En/Decryption 3
Encryption Problems 2
AES encryption 5
About Encryption ... 1

Members online

No members online now.

Forum statistics

Threads
474,083
Messages
2,570,591
Members
47,212
Latest member
RobynWiley

Latest Threads

Top