![]() |
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 |
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 |
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 |
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 08:45 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.