Skip to main content

Crate pkcs11_module

Crate pkcs11_module 

Source
Expand description

Raw PKCS#11 provider acquisition and ABI-layout reexports.

With the default native feature, function_list and interface_list call provider exports without calling C_Initialize. Loading a provider can execute foreign code, and pointers returned by acquisition remain usable only while the provider library and its data remain valid.

Without default features, this is a no_std wrapper around pkcs11_abi with no other dependencies. That build provides target-layout APIs; native tables, parameter declarations and acquisition require native.

Re-exports§

pub use acquire::RawInterface;
pub use acquire::function_list;
pub use acquire::interface_list;

Modules§

acquire
Raw function-table acquisition before PKCS#11 initialization.
layout
Allocation-free PKCS#11 function-table layout facts for Linux LP64 and ILP32.
params
Native parameter declarations for little-endian Linux LP64/ILP32.
tables
Compile-time tables mapping function field names to their byte offsets within CK_FUNCTION_LIST, CK_FUNCTION_LIST_3_0, and CK_FUNCTION_LIST_3_2.

Structs§

CK_MU_GEN_PARAMS
Proposed parameters for CKM_ML_DSA_EXTERNAL_MU_GEN.
CK_X9_42_MQV_DERIVE_PARAMS
X9.42 MQV parameters using the published pOtherInfo, pPublicData, and pPublicData2 field names.
FnField
A (field_name, byte_offset) pair for a function pointer field.
InterfaceLayout
Byte offsets and total stride of one CK_INTERFACE entry.
TableSpan
A prefix of one shared field table. The 2.00 ABI reuses the first 67 entries of the 68-entry base table instead of copying their names.
Version
A PKCS#11 major/minor version used for table-prefix selection.

Enums§

LayoutError
Failure while calculating or reading a target layout.
LinuxLayout
A supported little-endian Linux PKCS#11 data model.
Provenance
Caller-asserted route by which a function table was obtained.
Selection
Result of selecting the safely understood portion of a function table.
Surface
Caller-asserted origin and reported version of a function table.
TableSet
The tables that may be walked over a surface, in walk order.

Constants§

CKM_ML_DSA_EXTERNAL_MU
Proposed ML-DSA signing/verification of externally generated mu (0x403c).
CKM_ML_DSA_EXTERNAL_MU_GEN
Proposed ML-DSA external-mu generation identifier (0x403b).

Statics§

FUNCTION_LIST_3_0_EXTRA_FIELDS
The 24 native CK_FUNCTION_LIST_3_0 additions.
FUNCTION_LIST_3_2_EXTRA_FIELDS
The 12 native CK_FUNCTION_LIST_3_2 additions.
FUNCTION_LIST_FIELDS
All 68 native CK_FUNCTION_LIST function fields.
FUNCTION_NAMES
All standard function names in table order. The slice index is the ordinal.

Functions§

detect_null_functions⚠
Check a function list struct for NULL function pointers.
function_name
Return the name for an ordinal in the shared 104-field catalog.
function_offset
Return a target byte offset for a function-pointer ordinal.
read_fn_pointers
Read every function-pointer field from an owned table snapshot.
read_function_pointer
Read a complete function pointer by ordinal from a target snapshot.
read_word_le
Read one complete little-endian target word, zero-extending ILP32 words to u64.
select
Bind validated version and provenance to the safe function-list prefix.
table_bytes
Return the exact target bytes occupied by a known function-list prefix.
tables_for
Select the native field-table spans that are safe for the asserted surface.

Type Aliases§

CK_MU_GEN_PARAMS_PTR
Raw pointer to caller-managed CK_MU_GEN_PARAMS.
CK_X9_42_MQV_DERIVE_PARAMS_PTR
Raw pointer to caller-managed CK_X9_42_MQV_DERIVE_PARAMS.