I’ve recently started using the OSR Driver Loader and I’ve hit a wall.
I’m currently implementing some hashing using the BCrypt API. Before
using BCrypt my driver would load fine, I could install and start it as
a service with the OSR Driver Loader without trouble.
As soon as I make a call to the BCrypt API the driver loader will not
load my driver correctly anymore. I’m hit with the message “The system
cannot find the file specified.”. I checked the path in the registry and
it is correct.
I am linking against bcrypt.lib and currently call
“BCryptOpenAlgorithmProvider” in my driver entry and
“BCryptCloseAlgorithmProvider” in my driver unload as required. Simply
removing these two calls makes my driver load normally again.
I’ve read quite a few threads on the OSR forums but none gave me the
solution or answer to my problem, has anyone had this problem before
and/or could help me solve this ?
Regards,
-Yonathan
Hello Yonathan,
for a kernel driver you should link against ‘ksecdd.lib’ instead of ‘bcrypt.lib’
I know exactly nothing about BCryptOpenAlgorithmProvider. But I do know how to read the documentation, which says:
Vide: http://msdn.microsoft.com/en-us/library/windows/desktop/aa375479(v=vs.85).aspx
Peter
OSR
@OSRDrivers
Ah… I was linking against the userland version still, linking against ksecdd.lib solved my problem. Still a newbie at kernel development, read bcrypt.lib on the MSDN and didn’t think much of it 
Thanks kt133a!
Completely skipped it, went straight for the headers and libs at the
bottom. Should have properly read the page, my apologies.
Thanks as well
On May 12, 2014 3:35 PM, wrote:
> I know exactly nothing about BCryptOpenAlgorithmProvider. But I do know
> how to read the documentation, which says:
>
>
>
> Vide:
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa375479(v=vs.85).aspx
>
> Peter
> OSR
> @OSRDrivers
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
oops, yes, ‘cng.lib’ is a documented way, i’ve just found ‘ksecdd’ among others with a raw search in the ddk lib directory and the dumpbin…