Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3490706
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:32:55+00:00 2026-05-18T11:32:55+00:00

On Win 2003 32 bit, I successfully export a PRIVATEKEYBLOB with a CryptExportKey call

  • 0

On Win 2003 32 bit, I successfully export a PRIVATEKEYBLOB with a CryptExportKey call (dwFlags=0). Then I attempt to import the key blob on a Win Server 2008 64 bit with a 64 bit executable, the call to CryptImportKey fails with NTE_BAD_DATA.

In both cases the crypto provider is initialized with a call to

CryptAcquireContext(&hProv,
szContainer, NULL, PROV_RSA_AES,
CRYPT_MACHINE_KEYSET)

The passwords to export/import match. The public key is based on a CryptDeriveKey of an md5 hash of passwords that are identical in their plain text represetnation. I’m not sure whether the public keys end up being equal in the two systems.

Are the different types of systems (Win 2003 32 bit vs Win 2008 64 bit) the expected cause of failure, and is there a way of getting this to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:32:55+00:00Added an answer on May 18, 2026 at 11:32 am

    As conjectured the public keys produced by ATL’s CCryptDerivedKey were not equal on the two systems. The default settings of CCryptDerivedKey must be different in the two versions of ATL library.

    Since I had access to both the source and destination servers, I could reexported and imported the key in a consistent manner – specifying algorithm, key size and presence of salt.

    It would be nice to know what the exact settings of CCryptDerivedKey::Initialize method were in earlier version of ATL library (Visual Studio 2005, I believe).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have win server 2003 and IIS 6. After publish my web app to
We have two servers, a development/test server (Win Server 2008) and a live server
I have a win forms application that contains a Web Browser control. I need
This is main program.cs LogError.WriteError(Application started: + DateTime.Now + Environment.NewLine); try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false);
My application need to save event viewer logs to a specified directory and it
I have some java code as follows: try { String outString =java -jar C:\\ami\\bin\\ImmediateSubmit.jar
Can I run a Grails war under Tomcat in a machine without JDK (Only
I have this ASP.NET MVC app that I've deployed on IIS6/Win2003 as a virtual
This is odd, and I hope I explain it correctly. When I debug locally
I've run into a particularly nasty bug where an ASP.NET website attempts to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.