Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / January 2006

Tip: Looking for answers? Try searching our database.

RSACryptoServiceProvider throw exception on .net 2.0?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rongping - 10 Jan 2006 16:32 GMT
I am working on signing and encrypting XML file with certificate in smart
card. The following code I used on .net 1.1, it works fine
  CspParameters CSPParam = new CspParameters();
  CSPParam.KeyContainerName = "MY";
  CSPParam.ProviderName = DATAKEY_RSA_SCARD_PROV; //Smart card CSP
                                                                           
        //"Datakey RSA CSP"
  CSPParam.ProviderType = (int)CryptoCom.PROV_RSA_FULL;
  CSPParam.KeyNumber = 2;  // (int)KeyNumber.Signature;
  RSACryptoServiceProvider Key = new RSACryptoServiceProvider(CSPParam);

Since I want to use .net 2.0 XML encryption API. I switch the same code to
.net 2.0 platform. It throw anexception at last statement with error "More
data uis available". Anyone knows what is the problem? Thanks.
Senshodan - 25 Jan 2006 17:41 GMT
I have exactly the same problem. Did you finally found a solution? Ma
be this problem is related with this bug:

http://tinyurl.com/ceoc

--
Senshoda
rongping - 25 Jan 2006 18:41 GMT
I didn’t get feed back yet. I send a bug report to MS, but didn’t get
response either. Are you working on encryption of XML file? Actually, I try
to encrypt XML element in XML, it works ok, but when I decrypt the file, it
throws same error “More data is available”. Do you have same problem?

Rongping

> I have exactly the same problem. Did you finally found a solution? May
> be this problem is related with this bug:
>
> http://tinyurl.com/ceoct
Senshodan - 26 Jan 2006 14:28 GMT
It's clear that the problem is when trying to access to the private ke
stored in the card.

My guess (I can't assure that) is that is necessary to set the passwor
of the card somehow. May be this problem is related with the followin
bug:
http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?t=4zfE56fk3Dz5g8
mnr3LFPWwE0DlEMUi5uBjkMYWuGD2!NjuVBbMrPZouzgA2R4Co5kLcysAULQAysOnykqsHUn6g$$&p=4
WdaqFpbwEP12R8CrPLG5RiTs3!PQPlUJ*MdOqkGRpe93NFjDmbgOTWWSZbXeHmL8UGtUSkkjIKnU1CVj
iurFt3ppRx00MIz5VMVMBYv49XTM$&t=4Z4NsPdduDST2YG1iqB05SqYNEu4hGOh*WxrdHC2IYc0K8X6
TN8ChuArBUUxpUyr3UxWI0vkDZdj*dA6hB0WIFdw$$&p=41QaaHYaNEGOl9PzbXi9IFylbgU8Txlx0ZH
tgB5kj9aHcD7Ln756HQuQozd3s5twqBdYozNCD1OwkE!6GCmpfWrpAdZDi8HsFC34HnYPztpIw$&feed
backid=5c46bf4a-2a0b-4e3d-9c81-e0b014ada229


But I cannot asure that. So I will think moving back to version 1.1. D
you know how can I set Visual Studio 2005 to work with version 1.1 o
the framework?

Thanks

--
Senshoda
rongping - 26 Jan 2006 18:10 GMT
If you prefer, would you please send me email directly. We can disscuss this
in more detail and faster. After we find something valuable, we can post back
to this group
My email is Rongping.Yan@gdsinc.com. Thanks.

Rongping

> It's clear that the problem is when trying to access to the private key
> stored in the card.
[quoted text clipped - 9 lines]
>
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.