473,471 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4620
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Andy Chau | last post by:
I try to use RSA to implement the following scheme but wasn't sucessful. Sever encrypt a message using a public key, the client decrpyt the message using a private key. I don't want the client...
2
by: Dave Bailey | last post by:
I have developed a web app using DPAPI to encrypt a connection string in the web.config file. The application works perfectly on the development machine but when deployed to the server when...
2
by: Paul Fi | last post by:
I have this encryption scheme that I want to implement: I have an authentication server, which takes clients' credentials to complete authentication but first I have to encrypt the credentials, I...
1
by: Bart | last post by:
Dear all, I would like to encrypt a large amount of data by using public/private keys, but I read on MSDN: "Symmetric encryption is performed on streams and is therefore useful to encrypt large...
2
by: almurph | last post by:
Hi everyone, Can you help me please? I am having a problem with the encryption/decryption of words with the Irish fada in them. The Irish fada is like this: áéíóú/ÁÉÍÓÚ. It's kind of like the...
4
by: pintu | last post by:
Hello everybody.. I hav some confusion regarding asymmetric encryption.As asymmetric encryption it there is one private key and one public key.So any data is encrypted using private key and the...
3
by: =?Utf-8?B?TG9yZW4=?= | last post by:
I’m trying to encrypt and decrypt a file in vb.net. I am using the TripleDESCryptoServiceProvider encryption found in System.Security.Cryptography. Below is the code for my Encrypt and Decrypt...
5
by: Netwatcher | last post by:
well, i started messing around with dictionaries, yet, most of the pages i found about them always talk about getting only one word out of it and turning it vice versa, i've been playing with that...
9
by: Betikci Boris | last post by:
I get bored last night and wrote a script that uses xor for encrypt- decrypt, however it woks fine under linux 2.6.25, text and documents are ok, but fails on compressed files *.jpg, *.pdf , etc ....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.