These recipes use the Fe11 0.1.0 public API. Each explains the application inputs, the native operation, the result and the ownership needed to handle failure. The complete Rust sources are in examples/how_to.rs and its modules: setup, operations, keys, lifecycle and PQC. They are ordinary library examples: the functions run only when your application calls them.
| Task | Guide |
|---|---|
| Load a module, choose a token and open a session | Module setup |
| Authenticate and preserve cleanup errors | Authentication and lifecycle |
| Hash messages and obtain random bytes | Hashing and random data |
| Find RSA objects, generate a pair and sign | Keys and signatures |
| Encrypt and authenticate application records | AES-GCM |
| Generate ML-DSA or SLH-DSA keys and sign | PQC signatures |
| Select external prehash or native message hashing | PQC prehash modes |
| Establish native shared keys with ML-KEM | ML-KEM |
| Select software public-key verification | Verification engine |
| Preserve native errors and incomplete outcomes | Error handling |
An application using all examples can declare:
[dependencies]
fe11 = "=0.1.0"
fe11-sys = "=0.1.0"The direct fe11-sys dependency supplies standardized attribute constants in the
search example. The optional verification engine is built and loaded separately.
Choose a native module matching your application target and the required PKCS#11
interface. Module capability discovery helps select operations; their native
results determine whether a particular key and parameter combination succeeds.
From the Fe11 source workspace, type-check every recipe with:
cargo check -p fe11 --example how_toThis command compiles the example library and its dependencies without calling a PKCS#11 module. Supply paths, resource budgets, identities, credentials and key policies from application configuration when integrating a recipe. Budget values describe memory, handles and input sizes; derive them from the application workload. The examples intentionally accept those values as arguments.