SIMD128-PROVENANCE.json
cdk-rsx/crates/crypto/aes/SIMD128-PROVENANCE.json
1{2 "schema": "cdk-rsx-crypto-source-profile/v1",3 "profile_id": "rustcrypto-aes128-simd128-byte-fixslice-v1",4 "algorithm": "AES-128 encryption, ordinary 16-byte FIPS block encoding",5 "feature": "simd128",6 "parallel_real_blocks": 8,7 "general_key_schedule_bytes": 1408,8 "public_zero_owner_bytes": 0,9 "public_zero_static_schedule_bytes": 1408,10 "upstream": {11 "repository": "https://github.com/RustCrypto/block-ciphers",12 "crate": "aes",13 "version": "0.8.4",14 "git_commit": "f2dbee516b4d0cf4cb4f3045d09e35b5fd80087b",15 "source_path": "aes/src/soft/fixslice32.rs",16 "source_file_sha256": "c69c0fa430cb62c4d88a13d5c3387202e1962b47978a6a7026bd34789f2d2577",17 "copied_function": "sub_bytes",18 "license": "MIT OR Apache-2.0",19 "license_paths": [20 "vendor/LICENSE-MIT",21 "vendor/LICENSE-APACHE"22 ],23 "source_verified_byte_equal": true24 },25 "local_changes": {26 "src/simd128/sbox.rs": "Only signature generalized from u32 slice to a fixed array of Copy + XOR + AND and redundant length assertion removed. Every Boolean expression and assignment is unchanged.",27 "src/simd128/vector.rs": "Existing wide arithmetic unchanged. Adds fixed row shuffles, byte xtime and register-only Wasm swizzle; native swizzle emulation scans all public table positions with branchless masks.",28 "src/simd128.rs": "Keep the qualified baseline and eight-block bitslice path; optional simd128-vpaes routes only one/two/four blocks to byte-vector AES. Decode generic narrow keys from the unchanged private 1408-byte schedule; no new secret owner representation.",29 "src/simd128/zero_keys.rs": "Single immutable public-zero-key preexpanded schedule from independent FIPS polynomial arithmetic, checked against generic model and OpenSSL.",30 "src/simd128/tests.rs": "FIPS 197, SP800-38A, general-key/lane differential corpus, every transpose basis bit, unaligned sentinels and owner contracts.",31 "src/simd128/narrow.rs": "Adapt vpaes input/inversion/output map to standard byte AES rounds for one/two/four blocks; borrow inputs/outputs and wipe state/key scratch owners.",32 "src/simd128/narrow_tables.rs": "Copy six pinned vpaes nibble tables byte-for-byte; generate compact zero-key round bytes with independent FIPS polynomial expansion and absorb the missing affine constant."33 },34 "construction_unchanged": {35 "aes": "standard AES-128 with arbitrary secret key supported",36 "gc_hash": "AES_0(double(L) XOR LE128(t)) XOR double(L) XOR LE128(t)",37 "gf": "little-endian x^128+x^7+x^2+x+1; reduction 0x87",38 "half_gate": "unchanged ZRE TG || TE, 32 bytes",39 "suite_changes": "none"40 },41 "secrets": {42 "generic_schedule": "Private owner; zeroize on Drop. No Clone/Debug/Serde.",43 "named_scratch": "Wide state and reused rotated/sum arrays retain their existing guards. Narrow calls own one/two guarded state vectors plus one guarded round-key vector, wiped on return/unwind. Generic key expansion/Drop are unchanged.",44 "original_key_and_api_buffers": "Caller-owned and never automatically erased.",45 "limits": "No claim to wipe all compiler-generated copies or registers."46 },47 "source_files": {48 "src/simd128/sbox.rs": {49 "bytes": 4509,50 "sha256": "466dc0cbbac51684e62a4aa1e6e2eda0bc10f2ff927ad4d3bd52d1999c8aae82"51 },52 "src/simd128/tests.rs": {53 "bytes": 8747,54 "sha256": "38e6362230cf867156c9c665909feb19fa4061258d928605c7032cc9fa8cf5e7"55 },56 "src/simd128/vector.rs": {57 "bytes": 11361,58 "sha256": "abf14512954ebd46d420f19d04767ca3938bec5c15e3445f3bf6e0a4e22f21c8"59 },60 "src/simd128/zero_keys.rs": {61 "bytes": 9938,62 "sha256": "1d61fc8244fae696fffd88ed33d1fba1d41ef0e56f4f03f0190c8020d72982a1"63 },64 "src/simd128.rs": {65 "bytes": 13277,66 "sha256": "cbd43ac4f54f1b6829060dfc563e4f5dcea22d85f0ba5c165ea93abd573bcc9b"67 },68 "src/simd128/narrow.rs": {69 "bytes": 5717,70 "sha256": "2f66114ee283e94504f653bfb0607051f6d0b08bc09ed50c317fdec0cc2cccf9"71 },72 "src/simd128/narrow_tables.rs": {73 "bytes": 2364,74 "sha256": "89586bc0031aa6d848ce03630b7664d3c003df37363a06ed14e9fe80ab5da075"75 }76 },77 "qualification": {78 "source_model": "PASS; the frozen narrow4 proof checks 14174 real narrow AES blocks against independent FIPS/OpenSSL math. The earlier narrow1/2 packet remains unchanged.",79 "rust_native": "Recorded native known-answer/differential and ownership tests pass; qualification is separate from the installed-Wasm checks and IC measurements.",80 "installed_wasm": "Round5 control and selected images each pass the 32-record AES endpoint, including 1792 repeated API block results across 256 distinct key/input pairs and 32 keys. Borrowed/in-place widths 1/2/4 and wide calls are checked; these are not 1792 unique vectors.",81 "ic_instruction_cost": "Measured round5 public-zero-key GC gates/equality favor the selected aes-narrow image. Generic secret-key narrow API costs and secret-key expansion are not measured by those GC rows.",82 "prepared_wasm_size_delta": "Complete prepared benchmark images: selected 543973 bytes, control 574845 bytes. Selected is 3403 bytes smaller than the earlier narrow1/2 checkpoint and 9210 bytes smaller than round4 selected. These are complete image sizes, not isolated AES code or constant sizes.",83 "evidence": {84 "cost_report": "../../research/benchmarks/2026-10-31-garbled-circuit-round5.md",85 "independent_review": "../../research/experiments/2026-10-31-garbled-circuit/round5/narrow-aes/review/IC-REVIEW.txt",86 "selected_ic_audit": "../../research/experiments/2026-10-31-garbled-circuit/round5/narrow-aes/review/selected-ic-audit.json",87 "source_model": "../../research/experiments/2026-10-31-garbled-circuit/round5/narrow-aes/proofs/narrow4/research/four-proof.json",88 "source_review": "../../research/experiments/2026-10-31-garbled-circuit/round5/narrow-aes/source-review/source-review.json"89 }90 },91 "references": [92 {93 "url": "https://csrc.nist.gov/pubs/fips/197/final",94 "role": "AES round and key expansion specification"95 },96 {97 "url": "https://csrc.nist.gov/pubs/sp/800/38/a/final",98 "role": "AES-128 ECB four-block known answers"99 },100 {101 "url": "https://eprint.iacr.org/2009/129.pdf",102 "title": "Faster and Timing-Attack Resistant AES-GCM",103 "authors": [104 "Emilia Kasper",105 "Peter Schwabe"106 ],107 "role": "Eight-block byte-position bitslice background; no native speed result used as an IC claim"108 },109 {110 "url": "https://eprint.iacr.org/2020/1123.pdf",111 "title": "Fixslicing AES-like Ciphers",112 "role": "Round-dependent state permutation background"113 },114 {115 "url": "https://doc.rust-lang.org/core/arch/wasm64/",116 "role": "Wasm SIMD128 intrinsics; target compiler pinned by root build receipt"117 }118 ],119 "narrow_real_blocks": [120 1,121 2,122 4123 ],124 "wide_real_blocks": [125 8126 ],127 "narrow_public_table_bytes": {128 "sbox_nibble_tables": 96,129 "compact_zero_key_schedule": 176,130 "total": 272131 },132 "narrow_secret_scratch_bytes": {133 "one_block": 32,134 "two_blocks": 48,135 "components": "one/two/four state vectors plus one reusable round-key vector; no additional secret schedule owner",136 "four_blocks": 80137 },138 "vpaes_upstream": {139 "repository": "https://github.com/openssl/openssl",140 "tag": "openssl-3.4.3",141 "commit": "474f0e27bc6b23bbc3ae18543ede9315adfddf1a",142 "files": {143 "vpaes-x86_64.pl": {144 "source_path": "crypto/aes/asm/vpaes-x86_64.pl",145 "url": "https://raw.githubusercontent.com/openssl/openssl/474f0e27bc6b23bbc3ae18543ede9315adfddf1a/crypto/aes/asm/vpaes-x86_64.pl",146 "bytes": 31638,147 "sha256": "ff12f993741652518c42fb16561ea91f82c7ac58d6735288647db01aefaff4db"148 },149 "LICENSE.txt": {150 "source_path": "LICENSE.txt",151 "url": "https://raw.githubusercontent.com/openssl/openssl/474f0e27bc6b23bbc3ae18543ede9315adfddf1a/LICENSE.txt",152 "bytes": 10175,153 "sha256": "7d5450cb2d142651b8afa315b5f238efc805dad827d91ba367d8516bc9d49e7a"154 }155 },156 "license": "Apache-2.0; original Mike Hamburg 2009 core public domain",157 "license_path": "vendor/vpaes/LICENSE-APACHE2"158 },159 "optional_profile_id": "openssl-vpaes-rustcrypto-aes128-simd128-hybrid-v1",160 "narrow_feature": "simd128-vpaes",161 "narrow_enabled_by_default": false,162 "gc_and_bench_narrow_feature": "aes-narrow",163 "constant_time_scope": {164 "baseline": "Existing portable/current SIMD baseline is unchanged; does not use secret swizzle indices.",165 "native_optional_path": "Fixed public masked scan, no secret-indexed address or branch in source.",166 "wasm_optional_path": "Requires hardware SIMD register-swizzle lowering. On x86 Wasmtime may use a secret-indexed software builtin without SSSE3. No runtime host detection is added. No universal constant-time guarantee.",167 "wasmtime_source_commit": "7bac2c2775808aaec5d4aa5627a5e447b51102cf",168 "measured_pocketic_identity": "Round5 uses frozen normal13 PocketIC SHA256 6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6; the recorded source chain remains a conditional lowering argument, not proof of that binary's JIT settings.",169 "engine_configuration_limits": "Reviewed IC/Wasmtime source connects host CPU feature inference to SSSE3/PSHUFB and the local x86_64 host advertises SSSE3. Exact measured PocketIC JIT flags and native assembly were not dumped or proven. Hardware register-swizzle lowering remains an execution assumption; software fallback engines are outside the optional path's constant-time claim.",170 "engine_source_chain": "../../research/experiments/2026-10-31-garbled-circuit/round5/narrow-aes/review/engine-source-chain.json"171 },172 "runtime_lowering_references": [173 {174 "name": "wasmtime-cranelift-func",175 "url": "https://raw.githubusercontent.com/bytecodealliance/wasmtime/7bac2c2775808aaec5d4aa5627a5e447b51102cf/crates/cranelift/src/func_environ.rs",176 "sha256": "6b64dde01235e36e79cae7dbc867abd96986c588dc8df6f258640cb214640078"177 },178 {179 "name": "wasmtime-runtime-builtin",180 "url": "https://raw.githubusercontent.com/bytecodealliance/wasmtime/7bac2c2775808aaec5d4aa5627a5e447b51102cf/crates/wasmtime/src/runtime/vm/libcalls.rs",181 "sha256": "3dcdcaf8ce7281a0498c794275fa5cd0adc0e77f3891ea6b9fbc96ca2802f105"182 },183 {184 "name": "cranelift-x64-lowering",185 "url": "https://raw.githubusercontent.com/bytecodealliance/wasmtime/7bac2c2775808aaec5d4aa5627a5e447b51102cf/cranelift/codegen/src/isa/x64/lower.isle",186 "sha256": "c9593b0169b6c123fdf6163887c304f3138624817da52e1b4e111b649bbf4150"187 }188 ]189}