HighTechTalks DotNet Forums  

Re: What is exponent?

Dotnet Security microsoft.public.dotnet.security


Discuss Re: What is exponent? in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Valery Pryamikov
 
Posts: n/a

Default Re: What is exponent? - 12-25-2007 , 07:30 AM






On Dec 25, 4:38*am, olduncleamos <oldunclea... (AT) yahoo (DOT) com> wrote:
Quote:
Can somebody help explain this?

RSA algorithm involves modulus, which is a product of two primes of
the same order that are usually called P and Q. Two exponents, one
private and one public that are usually called d and e and related to
each other by being multiplicative inverse to each other mod
(P-1)*(Q-1).

For simple description of RSA algorithm check http://en.wikipedia.org/wiki/RSA

From asymmetric algorithms RSA is one of the simpliest. Other
asymmetric algorithm use different components/parameters of public and
private key. You can find simple description of many algorithms on
wikipedia.

-Valery.


Reply With Quote
  #2  
Old   
Joe Kaplan
 
Posts: n/a

Default Re: What is exponent? - 12-26-2007 , 11:20 PM






Did you look at the classes for SignedData and EnvelopedData in the Pkcs
namespace? I'd suggest using those for doing encryption and signing of
messages as they take care of all of the housekeeping details for handling
the symmetric keys and hashing while using the PKCS#7 standard for building
the messages so that you'll have interoperability with other systems that
can read PKCS#7 messages (SMIME, etc.).

It is totally possible to build up your own system for doing this stuff, but
it is not that easy and only your code will be able to read it. It is also
pretty difficult building your own PKCS#7 messages from scratch, especially
without a low level managed code ASN.1 library to lean on (which the .NET
framework does not have built in, although there are add-ons you can get
that do).

There are good Wikipedia references on all the PKCS stuff if you want to
read up on that more.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"olduncleamos" <olduncleamos (AT) yahoo (DOT) com> wrote

On Dec 25, 8:30 am, Valery Pryamikov <valery.pryami... (AT) q-free (DOT) com>
wrote:
Quote:
On Dec 25, 4:38 am, olduncleamos <oldunclea... (AT) yahoo (DOT) com> wrote:



Can somebody help explain this?

RSA algorithm involves modulus, which is a product of two primes of
the same order that are usually called P and Q. Two exponents, one
private and one public that are usually called d and e and related to
each other by being multiplicative inverse to each other mod
(P-1)*(Q-1).

For simple description of RSA algorithm
checkhttp://en.wikipedia.org/wiki/RSA

From asymmetric algorithms RSA is one of the simpliest. Other
asymmetric algorithm use different components/parameters of public and
private key. You can find simple description of many algorithms on
wikipedia.

-Valery.
Thank you for the wikipedia article. It certainly helped me understand
the concept better.

However, I am more interested in the practical coding in .Net terms.
Specifically there are two routines that I am trying to code:

Given that I represent the sender, thus in possession of the sender's
certificate. I also have the receiver's certificate (public key only).
I need the routines to:
1) Use RSA to encrypt the session key (using receiver's public key)
and
2) Use SHA1 to calculate the cipher text's hash value and then use RSA
to encrypt the message digest (using my private key).

I assume this is the most common scenario that eveybody does. I am
just unsure the function call and libraries that I need to use. I
would love to see some code sample that does exactly the above.

Thanks again for your help.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.