feat(storage): add PKCS#11 KEK provider crate#917
Merged
Conversation
7ec29d5 to
517dacc
Compare
|
🦢 Load Test Results Goose Attack ReportPlan Overview
Request Metrics
Response Time Metrics
Status Code Metrics
Transaction Metrics
Scenario Metrics
Error Metrics
|
|
| Branch | claude/raft-pkcs11-tpm-support-tc29i2 |
| Testbed | ubuntu-latest |
🚨 3 Alerts
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
|---|---|---|---|---|
| Command_Serde/apply/remove | Latency milliseconds (ms) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 3.72 ms(+1,198.18%)Baseline: 0.29 ms | 1.67 ms (222.46%) |
| Raft_1Node_Latency/remove/1node | Latency milliseconds (ms) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 4.48 ms(+689.46%)Baseline: 0.57 ms | 2.31 ms (194.04%) |
| Raft_1Node_Latency/write/1node | Latency milliseconds (ms) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 2.24 ms(+284.78%)Baseline: 0.58 ms | 2.10 ms (106.72%) |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| Command_Serde/apply/remove | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 3,717,400.00 ns(+1,198.18%)Baseline: 286,354.47 ns | 1,671,037.21 ns (222.46%) |
| Command_Serde/apply/set | 📈 view plot 🚷 view threshold | 833,710.00 ns(+253.11%)Baseline: 236,101.89 ns | 930,130.79 ns (89.63%) |
| Command_Serde/pack/delete | 📈 view plot 🚷 view threshold | 72.27 ns(-40.74%)Baseline: 121.94 ns | 145.59 ns (49.64%) |
| Command_Serde/pack/delete_index | 📈 view plot 🚷 view threshold | 66.07 ns(-40.08%)Baseline: 110.27 ns | 130.99 ns (50.44%) |
| Command_Serde/pack/set | 📈 view plot 🚷 view threshold | 119.74 ns(-38.97%)Baseline: 196.20 ns | 238.02 ns (50.31%) |
| Command_Serde/pack/set_index | 📈 view plot 🚷 view threshold | 65.07 ns(-40.95%)Baseline: 110.19 ns | 130.63 ns (49.81%) |
| Command_Serde/unpack/delete | 📈 view plot 🚷 view threshold | 106.93 ns(-44.26%)Baseline: 191.84 ns | 235.42 ns (45.42%) |
| Command_Serde/unpack/delete_index | 📈 view plot 🚷 view threshold | 93.25 ns(-41.65%)Baseline: 159.82 ns | 199.22 ns (46.81%) |
| Command_Serde/unpack/set | 📈 view plot 🚷 view threshold | 143.37 ns(-46.85%)Baseline: 269.73 ns | 332.25 ns (43.15%) |
| Command_Serde/unpack/set_index | 📈 view plot 🚷 view threshold | 89.39 ns(-43.71%)Baseline: 158.81 ns | 196.79 ns (45.42%) |
| Payload_encryption/pack/remove_cmd | 📈 view plot 🚷 view threshold | 64.13 ns(-44.95%)Baseline: 116.50 ns | 141.49 ns (45.33%) |
| Payload_encryption/pack/set_cmd | 📈 view plot 🚷 view threshold | 123.98 ns(-39.46%)Baseline: 204.77 ns | 268.58 ns (46.16%) |
| Payload_encryption/unpack/remove_cmd | 📈 view plot 🚷 view threshold | 113.11 ns(-44.74%)Baseline: 204.69 ns | 256.48 ns (44.10%) |
| Payload_encryption/unpack/set_cmd | 📈 view plot 🚷 view threshold | 152.77 ns(-45.90%)Baseline: 282.41 ns | 352.50 ns (43.34%) |
| Raft_1Node_Latency/prefix/1node | 📈 view plot 🚷 view threshold | 214,490.00 ns(-92.17%)Baseline: 2,739,551.25 ns | 6,172,649.98 ns (3.47%) |
| Raft_1Node_Latency/read/1node | 📈 view plot 🚷 view threshold | 22,880.00 ns(+5.52%)Baseline: 21,683.73 ns | 70,319.78 ns (32.54%) |
| Raft_1Node_Latency/remove/1node | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 4,475,400.00 ns(+689.46%)Baseline: 566,896.25 ns | 2,306,480.28 ns (194.04%) |
| Raft_1Node_Latency/write/1node | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 2,238,400.00 ns(+284.78%)Baseline: 581,730.16 ns | 2,097,403.07 ns (106.72%) |
| build_snapshot/default | 📈 view plot 🚷 view threshold | 101,230.00 ns(-7.29%)Baseline: 109,186.53 ns | 145,345.63 ns (69.65%) |
| fernet token/project | 📈 view plot 🚷 view threshold | 914.01 ns(-34.05%)Baseline: 1,385.93 ns | 1,628.50 ns (56.13%) |
| get_data_keyspace | 📈 view plot 🚷 view threshold | 0.24 ns(-24.81%)Baseline: 0.31 ns | 0.36 ns (64.91%) |
| get_db | 📈 view plot 🚷 view threshold | 0.24 ns(-24.86%)Baseline: 0.31 ns | 0.36 ns (64.90%) |
| get_fernet_token_timestamp/project | 📈 view plot 🚷 view threshold | 87.81 ns(-39.01%)Baseline: 143.98 ns | 180.72 ns (48.59%) |
| get_keyspace | 📈 view plot 🚷 view threshold | 9.97 ns(+99.50%)Baseline: 5.00 ns | 10.66 ns (93.54%) |
Step 3 of ADR 0016-v2 §2.5: storage-crypto-pkcs11, a feature-isolated crate providing Pkcs11Kek, a KekProvider backed by CKM_AES_GCM against a non-extractable AES-256 key on a PKCS#11 token. Wire format matches EnvKek exactly, so nothing downstream of KekProvider changes. Built on cryptoki 0.12 (pure Rust, dlopen at runtime) — no system PKCS#11 headers needed to build. Slot selection by numeric id or token label. Key lookup by CKA_LABEL, with opt-in auto_generate (explicit param, not default). Adds PKCS11(String) to CryptoError; wrap/unwrap failures still map to existing AesEncrypt/AesDecrypt so tag- and ciphertext-tamper cases stay indistinguishable from other AEAD failures. Assisted-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
517dacc to
4ee1c8a
Compare
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3 of ADR 0016-v2 §2.5: storage-crypto-pkcs11, a
feature-isolated crate providing Pkcs11Kek, a KekProvider backed
by CKM_AES_GCM against a non-extractable AES-256 key on a PKCS#11
token. Wire format matches EnvKek exactly, so nothing downstream
of KekProvider changes. Built on cryptoki 0.12 (pure Rust, dlopen
at runtime) — no system PKCS#11 headers needed to build.
Slot selection by numeric id or token label. Key lookup by
CKA_LABEL, with opt-in auto_generate (explicit param, not
default). Adds PKCS11(String) to CryptoError; wrap/unwrap
failures still map to existing AesEncrypt/AesDecrypt so tag- and
ciphertext-tamper cases stay indistinguishable from other AEAD
failures.
Assisted-By: Claude Sonnet 5 noreply@anthropic.com
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com