Simple Asymmetric encryption/decryption

Discussion in 'ASP General' started by Bruce, Dec 13, 2007.

  1. Bruce

    Bruce Guest

    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
     
    Bruce, Dec 13, 2007
    #1
    1. Advertising

  2. "Bruce" <fake_dont_send@anything_.com> wrote in message
    news:...
    > 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
     
    Anthony Jones, Dec 13, 2007
    #2
    1. Advertising

  3. Bruce

    Bruce Guest

    "Anthony Jones" <> wrote in message
    news:OB$...
    > "Bruce" <fake_dont_send@anything_.com> wrote in message
    > news:...
    >> 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
     
    Bruce, Dec 13, 2007
    #3
  4. "Bruce" <fake_dont_send@anything_.com> wrote in message
    news:...
    >
    > "Anthony Jones" <> wrote in message
    > news:OB$...
    > > "Bruce" <fake_dont_send@anything_.com> wrote in message
    > > news:...
    > >> 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
     
    Anthony Jones, Dec 13, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pintu

    Asymmetric Encryption

    pintu, Jan 15, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    468
    Karl Seguin [MVP]
    Jan 16, 2007
  2. Replies:
    14
    Views:
    10,556
    Mark Space
    Mar 24, 2009
  3. pintu

    Asymmetric Encryption

    pintu, Jan 15, 2007, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    135
    Mariano Omar Rodriguez
    Jan 16, 2007
  4. snacktime

    asymmetric encryption options

    snacktime, Aug 28, 2006, in forum: Ruby
    Replies:
    8
    Views:
    162
    snacktime
    Aug 29, 2006
  5. stig

    simple encryption/decryption

    stig, Jan 18, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    254
Loading...

Share This Page