Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
It looks like you're new here. If you want to get involved, click one of these buttons!
Upcoming OSR Seminars | ||
---|---|---|
Writing WDF Drivers | 21 Oct 2019 | OSR Seminar Space & ONLINE |
Internals & Software Drivers | 18 Nov 2019 | Dulles, VA |
Kernel Debugging | 30 Mar 2020 | OSR Seminar Space |
Developing Minifilters | 27 Apr 2020 | OSR Seminar Space & ONLINE |
Comments
http://www.microsoft.com/downloads/details.aspx?familyid=1ef399e9-b018-49db-a98b-0ced7cb8ff6f&displaylang=en
Briefly, CNG is officially supported started from Vista (in both, user and kernel mode). In kernel mode it's implemented as an export driver (ksecdd.sys, with ksecdd.lib import library). IRQL and other info can be found in documentation for each function separately:
http://msdn.microsoft.com/en-us/library/aa833130(VS.85).aspx
nowhere does it document what IRQL's you can call functions at, even
though if you search enough on microsoft.com it implies some functions
can be called at DISPATCH_LEVEL just not which functions they are.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Posted At: Wednesday, June 02, 2010 1:42 PM
> Posted To: ntdev
> Conversation: Bcrypt in the kernel
> Subject: RE: Bcrypt in the kernel
>
> You may want to get CNG SDK with samples, containing kernel mode usage
> examples along with other stuff:
>
>
http://www.microsoft.com/downloads/details.aspx?familyid=1ef399e9-b018-4
9db-
> a98b-0ced7cb8ff6f&displaylang=en
>
> Briefly, CNG is officially supported started from Vista (in both, user
and
> kernel mode). In kernel mode it's implemented as an export driver
(ksecdd.sys,
> with ksecdd.lib import library). IRQL and other info can be found in
> documentation for each function separately:
>
> http://msdn.microsoft.com/en-us/library/aa833130(VS.85).aspx
>
>
>
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 5167 (20100602) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
"Depending on what processor modes a provider supports, BCryptEncrypt can be called either from user mode or kernel mode. Kernel mode callers can execute either at PASSIVE_LEVEL IRQL or DISPATCH_LEVEL IRQL. If the current IRQL level is DISPATCH_LEVEL, the handle provided in the hKey parameter must be derived from an algorithm handle returned by a provider that was opened with the BCRYPT_PROV_DISPATCH flag, and any pointers passed to the BCryptEncrypt function must refer to nonpaged (or locked) memory."
http://msdn.microsoft.com/en-us/library/aa375421(VS.85).aspx
..........
Depending on what processor modes a provider supports, BCryptEncrypt can be called either from user mode or kernel mode. Kernel mode callers can execute either at PASSIVE_LEVEL IRQL or DISPATCH_LEVEL IRQL. If the current IRQL level is DISPATCH_LEVEL, the handle provided in the hKey parameter must be derived from an algorithm handle returned by a provider that was opened with the BCRYPT_PROV_DISPATCH flag, and any pointers passed to the BCryptEncrypt function must refer to nonpaged (or locked) memory.
To call this function in kernel mode, use Ksecdd.lib, which is part of the Driver Development Kit (DDK).
..........
Peter Viscarola
OSR
@OSRDrivers
I'll go back to sleep now,
Peter
OSR
Peter Viscarola
OSR
@OSRDrivers