question

VasanthMp-7863 avatar image
0 Votes"
VasanthMp-7863 asked JunjieZhu-MSFT commented

Driver failing to load, if Bcrypt library is used

I want to use SHA256 hash in my driver, that I need to run on ARM64 platform.

After including bcrypt.h file in my driver source code and linking Bcrypt.lib. I used BCryptOpenAlgorithmProvider function in my driver source code.

When I load the driver, I get
"Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)

Object Name not found"

Question 1. Can we use Bcrypt api for ARM64 platform or should it be used only for WIN32 platform?

Question 2. If it can be used for ARM64 platform, can someone point how to resolve the loading error?

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JunjieZhu-MSFT avatar image
1 Vote"
JunjieZhu-MSFT answered JunjieZhu-MSFT commented

Hello,
Welcome to Microsoft Q&A!

In ARM, The device drivers run in ring 0.
In ring zero, device drivers don't have access to Windows APIs: instead they have access to various NT kernel APIs.

Thank you.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the reply.

Can you point out the documentation for NT kernel APIs?

I am looking for api's to do sha256 specifically.

0 Votes 0 ·

Whether RtlHashUnicodeString can meet your needs?


0 Votes 0 ·