confium 0.3.2-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +183 -0
  3. data/Cargo.lock +2635 -0
  4. data/Cargo.toml +9 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.adoc +139 -0
  7. data/Rakefile +30 -0
  8. data/confium.gemspec +56 -0
  9. data/lib/confium/audit.rb +125 -0
  10. data/lib/confium/cfm.rb +23 -0
  11. data/lib/confium/crypto.rb +50 -0
  12. data/lib/confium/digest.rb +62 -0
  13. data/lib/confium/errors/coerce.rb +47 -0
  14. data/lib/confium/errors/crypto_error.rb +15 -0
  15. data/lib/confium/errors/index_error.rb +15 -0
  16. data/lib/confium/errors/not_found_error.rb +15 -0
  17. data/lib/confium/errors/parse_error.rb +15 -0
  18. data/lib/confium/errors/policy_violation_error.rb +15 -0
  19. data/lib/confium/errors/threshold_error.rb +16 -0
  20. data/lib/confium/errors/unresolved_signer_error.rb +14 -0
  21. data/lib/confium/errors/validation_error.rb +17 -0
  22. data/lib/confium/errors/verification_error.rb +15 -0
  23. data/lib/confium/errors.rb +26 -0
  24. data/lib/confium/ffi.rb +23 -0
  25. data/lib/confium/lib.rb +33 -0
  26. data/lib/confium/openpgp.rb +34 -0
  27. data/lib/confium/pki/certificate_builder.rb +60 -0
  28. data/lib/confium/pki/cms/signed_data_builder.rb +92 -0
  29. data/lib/confium/pki/cms.rb +15 -0
  30. data/lib/confium/pki/cnml.rb +80 -0
  31. data/lib/confium/pki.rb +13 -0
  32. data/lib/confium/policy.rb +138 -0
  33. data/lib/confium/secure_bytes.rb +126 -0
  34. data/lib/confium/tc/coordinator.rb +68 -0
  35. data/lib/confium/tc/session.rb +51 -0
  36. data/lib/confium/tc/session_stub.rb +43 -0
  37. data/lib/confium/tc/share_file.rb +87 -0
  38. data/lib/confium/tc.rb +17 -0
  39. data/lib/confium/transparency/ots.rb +63 -0
  40. data/lib/confium/version.rb +5 -0
  41. data/lib/confium.rb +71 -0
  42. data/lib/confium_native/3.1/confium_native.so +0 -0
  43. data/lib/confium_native/3.2/confium_native.so +0 -0
  44. data/lib/confium_native/3.3/confium_native.so +0 -0
  45. metadata +178 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4b1a5944432b621cc52219514c8457b749239b0bb5a496757e9a6b9f799475b3
4
+ data.tar.gz: 49487dabd46eef4970fb6faae1a9ecee127dff6273fcbc33d3f59112a9e347c4
5
+ SHA512:
6
+ metadata.gz: fdecd90d9bc5129d844db6e8f33ebdbce6f97fcf6c1a5fd830ebc46d821065e840d635c6dde593e5d1d98ae65f8072f8c5aa764aa3fd77fa604b36243088c440
7
+ data.tar.gz: 74158c7ac2f918919f18da5588c32fbfcd37fcc8f779c5c644de0c2a2748b0e70dbad7927939b281d89bd6029f9c01e63e72eb947bfe90961d3fd3e4e7d91b1e
data/CHANGELOG.md ADDED
@@ -0,0 +1,183 @@
1
+ # Changelog
2
+
3
+ ## [0.3.2] — 2026-08-22
4
+
5
+ Native platform gems (linux x86_64/aarch64, macOS x86_64/arm64) ship
6
+ alongside the source gem — `gem install` no longer needs a Rust
7
+ toolchain on those platforms.
8
+
9
+ The 0.3.0/0.3.1 native-gem builds never actually produced platform
10
+ gems: the cross-compile task targeted a nonexistent rake task inside
11
+ a container whose shell swallowed the failure, and the fallback
12
+ `gem build` stamped platform=ruby. RubyGems blocks re-pushing a
13
+ version that ever existed, so the native gems first appear here.
14
+
15
+ ### Fixed
16
+
17
+ - Platform gems now build on native-arch runners (one per target
18
+ platform). Cross-compilation via rake-compiler-dock is impossible
19
+ for this gem: the dock images are Ubuntu 20.04 (gcc 9.4) while the
20
+ vendored RNP stack needs Botan 3.12, which requires gcc 11+.
21
+ - Each platform gem carries one extension per C-ABI window — exact
22
+ minors 3.1 and 3.2, plus 3.3 (loads on 3.3+) — because Ruby 3.2
23
+ broke the 3.1 ABI (a 3.1-built extension segfaults on 3.2) and
24
+ rb-sys references `ruby_current_vm_ptr` when built against
25
+ Ruby <= 3.2, which libruby stopped exporting in 3.3.
26
+ `lib/confium.rb` picks the window for the running Ruby; source
27
+ builds keep the flat extension path.
28
+ - The release workflow no longer builds a source gem (that burned
29
+ the 0.3.1 version slots against test-and-release.yml's publish),
30
+ refuses to push any gem stamped platform=ruby, and installs each
31
+ packaged gem on Ruby 3.1 through 3.4 before publishing.
32
+ - Windows remains unsupported: the vendored RNP (json-c + botan)
33
+ build has no MSVC/mingw story.
34
+
35
+ ## [0.3.1] — 2026-08-21
36
+
37
+ Shipped as a source gem only (the intended native platform gems
38
+ failed to materialize; see 0.3.2).
39
+
40
+ ### Added
41
+
42
+ - ERS archival binding (`Confium::EvidenceRecord`, RFC 4998) and the
43
+ `CONFIUM_LIB` explicit dylib path override.
44
+ - Audit log bindings with sign-triggered autofire and an Enumerable
45
+ `MemorySink`.
46
+ - Typed error hierarchy across all subsystems with native-error
47
+ coercion.
48
+ - CMP20/GG18 in-process threshold ECDSA (`Confium::TC::Cmp20`,
49
+ `Confium::TC::Gg18`) and TC share files with the documented
50
+ envelope shape.
51
+ - Twenty worked examples plus the examples and CNML-profile guides.
52
+
53
+ ### Fixed
54
+
55
+ - The PKI CSR spec no longer shells out to the openssl CLI (it
56
+ generated its fixture with a key file that was never created).
57
+ - CI: first `.rubocop.yml`, Ruby-3.1-compatible lockfile, and a test
58
+ matrix matching the shipped platforms.
59
+
60
+ ## [0.3.0] — 2026-08-04
61
+
62
+ Synced with Confium Rust workspace v0.3.0 (product restructuring).
63
+
64
+ ### Changed
65
+
66
+ - **Rust edition bumped to 2024** (was 2021). Requires Rust 1.85+.
67
+ - **All confium dependencies now from crates.io** (removed path deps for
68
+ `confium-tc-cmp20` and `confium-tc-gg18`). `gem install confium` now works
69
+ without a local workspace checkout.
70
+ - **Version synced to 0.3.0** (was 0.1.0) to match the workspace version.
71
+
72
+ ### Added
73
+
74
+ - Dependencies on newly published shared crypto crates:
75
+ `confium-tc-core`, `confium-crypto-vss`, `confium-crypto-zk`,
76
+ `confium-privacy`, `confium-observability`.
77
+
78
+ ### Migration from 0.1.0
79
+
80
+ - Update `Gemfile`: `gem "confium", "~> 0.3"`
81
+ - Ensure Rust 1.85+ is installed (`rustup update stable`)
82
+ - Run `bundle exec rake compile` to rebuild the native extension
83
+
84
+ ## [0.1.0] — 2026-07-27
85
+
86
+ First public release of the Ruby bindings. Replaces the previous FFI-based
87
+ prototype with a Rust native extension built via `rb_sys` + `magnus`
88
+ (parsanol-ruby pattern). The extension is compiled at `gem install` time
89
+ and exposes the high-value Confium subsystems directly to Ruby.
90
+
91
+ ### Added
92
+
93
+ - **Native extension scaffold** (`ext/confium_native/`). cdylib built via
94
+ `rb_sys` and `magnus`; required by `lib/confium.rb` at load time.
95
+ `Confium::Native.version`, `Confium::Native.loaded?`, and
96
+ `Confium.core_version` provide a smoke-test surface.
97
+
98
+ - **`Confium::Transparency::MerkleTree`** — append-only RFC 6962 Merkle
99
+ tree. `#append(artifact_hash)`, `#root`, `#length`, `#empty?`,
100
+ `#inclusion_proof(seq)`. `Confium::Transparency::InclusionProof` with
101
+ `#sequence`, `#steps`, `#verify(root)`.
102
+
103
+ - **`Confium::Composite`** — PQ-migration composite signatures.
104
+ `.generate_ed25519_keypair`, `.sign_ed25519(private_key, message)`.
105
+ `Confium::Composite::Signature.new(components)` + `#verify(message)` +
106
+ `#component_count` + `#algorithms`.
107
+ `Confium::Composite::VerificationResult#all_verified?` + `#per_component`.
108
+
109
+ - **`Confium::Attributes`** — attribute-based threshold-signing policy DSL.
110
+ `.parse(expr)` + `Confium::Attributes::Predicate#satisfied_by?(signers)`.
111
+ `Confium::Attributes::Signer.new` + `#add(key, value)` + `#has?(key)` +
112
+ `#values(key)`. DSL covers `min_count`, `min_distinct`, `any`, `all`,
113
+ `none`, `and`, `or`, `not`.
114
+
115
+ - **`Confium::PKI::Certificate`** — X.509 v3 certificate parse + inspect.
116
+ `.from_der(binary)` / `.from_pem(string)`. `#to_der`, `#to_pem`,
117
+ `#fingerprint_sha256`, `#serial_hex`, `#not_before`, `#not_after`,
118
+ `#valid_at?(iso8601)`, `#public_key_bytes`.
119
+
120
+ - **`Confium::PKI::CSR`** — PKCS#10 certificate signing request.
121
+ `.from_der` / `.from_pem` / `#to_der` / `#to_pem`.
122
+
123
+ - **`Confium::PKI::CMS::SignedData`** — JSON-backed RFC 5652 model.
124
+ `.from_json` / `#to_json` / `#signer_count` / `#content_type` /
125
+ `#content` / `#certificate_count` / `#certificate_at(index)`.
126
+
127
+ - **`Confium::PKI::CMS::Content`** — value object for optional content.
128
+ `#bytes`, `#length`.
129
+
130
+ - **`Confium::PKI::XMLDSig`** — Canonical XML (RFC 3076) and Exclusive
131
+ C14N. `.canonicalize(xml)`, `.canonicalize_exclusive(xml)`.
132
+
133
+ - **`Confium::Identity::Actor`** — actor identity from JSON.
134
+ `.from_json` / `#to_json` / `#actor_id` / `#actor_type` / `#quorum_id` /
135
+ `#registered_at` / `#expires_at` / `#certificate_count`.
136
+ `Confium::Identity.actor_types` returns the six canonical role strings
137
+ (`manufacturer`, `testing_lab`, `issuing_authority_officer`,
138
+ `biml_director`, `quorum_coordinator`, `verifier`).
139
+
140
+ - **`Confium::Config::Manifest`** — deployment manifest parse + validate.
141
+ `.from_toml` / `#deployment_name` / `#operator` / `#manifest_version` /
142
+ `#tier_count` / `#tier_name_at` / `#quorum_count` / `#validate` /
143
+ `#valid?`.
144
+
145
+ - **`Confium::TC::FrostP256`** — real P-256 Shamir + ECDSA.
146
+ `.generate_keypair`, `.split_secret(secret, t, n)`,
147
+ `.recover_secret([{x:, y:}, ...])`, `.sign(private_key, message)`.
148
+ `Confium::TC::FrostP256::Share#x` / `#y_bytes`.
149
+
150
+ - **`Confium::TC::ElGamalP256`** — threshold ElGamal-P256 KEM.
151
+ `.encapsulate(public_key)` → `{ ciphertext: { c1:, c2: }, shared_secret: }`,
152
+ `.partial_decrypt(party_index, share_bytes, ciphertext)`,
153
+ `.aggregate_partials(partials, threshold, ciphertext)`.
154
+
155
+ ### Changed
156
+
157
+ - `confium.gemspec` switched from `ffi` (pure-Ruby FFI to C ABI) to
158
+ `rb_sys` (Rust native extension). Required Ruby version bumped to 3.1.
159
+ - `lib/confium.rb` now requires `confium_native/confium_native` instead
160
+ of declaring autoloads for hand-written FFI wrappers.
161
+ - All binary inputs and outputs use `Encoding::ASCII_8BIT` Strings
162
+ (binary), the idiomatic Ruby shape for cryptographic data.
163
+
164
+ ### Removed
165
+
166
+ - The `ffi`-based modules (`Confium::FFI`, `Confium::CFM`, `Confium::Lib`,
167
+ `Confium::Crypto`, `Confium::Digest`) — replaced by the magnus-based
168
+ classes above. Old spec files deleted.
169
+
170
+ ### Known limitations
171
+
172
+ - v0.1.0 ships as a **source gem** — `gem install` requires Rust + cargo
173
+ on the host. Cross-platform binary gems for Linux/Windows via
174
+ `rake-compiler-dock` will follow in v0.2.0.
175
+ - The threshold-cryptography surface covers Shamir + Lagrange + ECDSA +
176
+ threshold ElGamal. Full multi-party FROST/CMP20/GG18 session
177
+ orchestration (the async coordinator) is not yet exposed — lands in
178
+ v0.2.0.
179
+ - The composite-signature surface verifies Ed25519 components only.
180
+ ML-DSA-65 / SLH-DSA verifiers will land when the underlying Rust
181
+ crates ship.
182
+ - RBS type signatures in `sig/` are not yet provided — planned for v0.2.0
183
+ once the API stabilizes.