Home All Groups Group Topic Archive Search About

Encrypt/Decrypt Username Password using Public Key

Author
5 Sep 2006 4:50 PM
sachdeva.rajesh
I want to encrypt the username and password using public key. Decrypt
it using private key. Any help or code is very helpful.

Thanks in advance for your help.

Author
6 Sep 2006 10:57 AM
Valery Pryamikov
Hi,
Since you told us nothing about the requirements, then how about: USE
SSL!
Wtih SSL, the information is transmitted from client to server (and
back) in encrypted form.

-Valery.
http://www.harper.no/valery

sachdeva.raj***@gmail.com wrote:
Show quoteHide quote
> I want to encrypt the username and password using public key. Decrypt
> it using private key. Any help or code is very helpful.
>
> Thanks in advance for your help.
Author
6 Sep 2006 6:20 PM
sachdeva.rajesh
Sorry! If I was not too clear on the requirements. basically the client
will send username and password on SSL. We take the user name and
password encrypt the user name and password using public key and then
create the auth token.


I also need help creating the auth token usinf
microsoft.web.service3.security.token.


Any help is very much appreciated.



Valery Pryamikov wrote:
Show quoteHide quote
> Hi,
> Since you told us nothing about the requirements, then how about: USE
> SSL!
> Wtih SSL, the information is transmitted from client to server (and
> back) in encrypted form.
>
> -Valery.
> http://www.harper.no/valery
>
> sachdeva.raj***@gmail.com wrote:
> > I want to encrypt the username and password using public key. Decrypt
> > it using private key. Any help or code is very helpful.
> >
> > Thanks in advance for your help.
Author
6 Sep 2006 6:40 PM
Dominick Baier
Why do you want to encrypt? Why decrypt?

WSE has all the mechanics for creating tokens based on username/password
- and if you run over SSL that's totally fine.

I guess you are looking for a WSE UsernameToken.

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Sorry! If I was not too clear on the requirements. basically the
> client will send username and password on SSL. We take the user name
> and password encrypt the user name and password using public key and
> then create the auth token.
>
> I also need help creating the auth token usinf
> microsoft.web.service3.security.token.
> Any help is very much appreciated.
>
> Valery Pryamikov wrote:
>
>> Hi,
>> Since you told us nothing about the requirements, then how about: USE
>> SSL!
>> Wtih SSL, the information is transmitted from client to server (and
>> back) in encrypted form.
>> -Valery.
>> http://www.harper.no/valery
>> sachdeva.raj***@gmail.com wrote:
>>
>>> I want to encrypt the username and password using public key.
>>> Decrypt it using private key. Any help or code is very helpful.
>>>
>>> Thanks in advance for your help.
>>>
Author
7 Sep 2006 1:01 PM
sachdeva.rajesh
Our requirements are that we have to encrypt the user name and the
password before creating the user token, Yes! I am using WSE3.0.


Basically we are doing double encryption.

We will usertoken later to access the webservices.


Any idea or help is appreciated.



Dominick Baier wrote:
Show quoteHide quote
> Why do you want to encrypt? Why decrypt?
>
> WSE has all the mechanics for creating tokens based on username/password
> - and if you run over SSL that's totally fine.
>
> I guess you are looking for a WSE UsernameToken.
>
> ---
> Dominick Baier, DevelopMentor
> http://www.leastprivilege.com
>
> > Sorry! If I was not too clear on the requirements. basically the
> > client will send username and password on SSL. We take the user name
> > and password encrypt the user name and password using public key and
> > then create the auth token.
> >
> > I also need help creating the auth token usinf
> > microsoft.web.service3.security.token.
> > Any help is very much appreciated.
> >
> > Valery Pryamikov wrote:
> >
> >> Hi,
> >> Since you told us nothing about the requirements, then how about: USE
> >> SSL!
> >> Wtih SSL, the information is transmitted from client to server (and
> >> back) in encrypted form.
> >> -Valery.
> >> http://www.harper.no/valery
> >> sachdeva.raj***@gmail.com wrote:
> >>
> >>> I want to encrypt the username and password using public key.
> >>> Decrypt it using private key. Any help or code is very helpful.
> >>>
> >>> Thanks in advance for your help.
> >>>
Author
7 Sep 2006 1:09 PM
Dominick Baier
Well -

i still don't understand what you are doing, but

you will find all crypto classes in the System.Security.Cryptography namespace.
For certificates based crypto there are two child namespaces called .X509Certificates
and .Pkcs.

Have a look at the SignedData and EnvelopedData classes for X509
and RSACryptoServiceProvider for raw RSA keys.

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Our requirements are that we have to encrypt the user name and the
> password before creating the user token, Yes! I am using WSE3.0.
>
> Basically we are doing double encryption.
>
> We will usertoken later to access the webservices.
>
> Any idea or help is appreciated.
>
> Dominick Baier wrote:
>
>> Why do you want to encrypt? Why decrypt?
>>
>> WSE has all the mechanics for creating tokens based on
>> username/password - and if you run over SSL that's totally fine.
>>
>> I guess you are looking for a WSE UsernameToken.
>>
>> ---
>> Dominick Baier, DevelopMentor
>> http://www.leastprivilege.com
>>> Sorry! If I was not too clear on the requirements. basically the
>>> client will send username and password on SSL. We take the user name
>>> and password encrypt the user name and password using public key and
>>> then create the auth token.
>>>
>>> I also need help creating the auth token usinf
>>> microsoft.web.service3.security.token.
>>> Any help is very much appreciated.
>>> Valery Pryamikov wrote:
>>>
>>>> Hi,
>>>> Since you told us nothing about the requirements, then how about:
>>>> USE
>>>> SSL!
>>>> Wtih SSL, the information is transmitted from client to server (and
>>>> back) in encrypted form.
>>>> -Valery.
>>>> http://www.harper.no/valery
>>>> sachdeva.raj***@gmail.com wrote:
>>>>> I want to encrypt the username and password using public key.
>>>>> Decrypt it using private key. Any help or code is very helpful.
>>>>>
>>>>> Thanks in advance for your help.
>>>>>
Author
7 Sep 2006 5:56 PM
Valery Pryamikov
I'll second Dominick's advise - if you have to do that - use
EnvelopedData class - it will do the things right for you.

-Valery.
http://www.harper.no/valery

sachdeva.raj***@gmail.com wrote:
Show quoteHide quote
> Our requirements are that we have to encrypt the user name and the
> password before creating the user token, Yes! I am using WSE3.0.
>
>
> Basically we are doing double encryption.
>
> We will usertoken later to access the webservices.
>
>
> Any idea or help is appreciated.
>