confium 0.7.2 → 0.8.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/Cargo.lock +28 -28
- data/ext/confium_native/Cargo.toml +5 -5
- data/ext/confium_native/src/tc_mta.rs +27 -34
- data/lib/confium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00021aaa2acda85a9f1cbb381f5184c2524e2663b6f25b71eeb50f755d2547be
|
|
4
|
+
data.tar.gz: 1278d5afb3bebf8a0b3bd6a80f4db594cb2863c3ce12b2d82cb78b0115cbac7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1e8098ac29b79c84b56413b2813839664e10de0b0a4b43417102ac3627fed8664d26e55b4a22b8546b03e85e5d81292566727350c4e310308f4eb09352a7a53
|
|
7
|
+
data.tar.gz: 69e8c20e22b20a92260e13ae8227fba553aa7d27fe69a92c88df1c8e963bb2e94bdcacbb78b15db9fb316e76aac1ba5435baa736dcc2bb1fa5beb5971ecfd686
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.
|
|
3
|
+
## [0.8.0] — UNRELEASED (code on main; release on the owner's tag)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **BREAKING**: `Confium::TC::Cmp20::Mta` follows the upstream
|
|
8
|
+
key-direction inversion (confium-tc-cmp20 0.10): the proved MtA
|
|
9
|
+
exchange now runs under the INITIATOR's Paillier key end to end.
|
|
10
|
+
`party_j_respond` drops its private-key argument — the responder
|
|
11
|
+
needs only the initiator's public material (it can never open the
|
|
12
|
+
ciphertext it operates on) — and `party_i_init` / `party_i_finish` /
|
|
13
|
+
`full` take the initiator's key. The split rounds are therefore
|
|
14
|
+
sound across processes: `alpha` stays with the initiator, `beta`
|
|
15
|
+
with the responder, and neither share holder can recover the
|
|
16
|
+
peer's secret (whoever holds both recovers it exactly). The
|
|
17
|
+
api-reference trust note is replaced by the key-direction
|
|
18
|
+
explanation; new spec: the responder side needs no private
|
|
19
|
+
material.
|
|
20
|
+
- ext crates: `confium-tc` / `confium-tc-cmp20` 0.9 → 0.10.
|
|
21
|
+
|
|
22
|
+
## [0.7.2] — 2026-09-10
|
|
4
23
|
|
|
5
24
|
### Added
|
|
6
25
|
|
data/Cargo.lock
CHANGED
|
@@ -113,9 +113,9 @@ dependencies = [
|
|
|
113
113
|
|
|
114
114
|
[[package]]
|
|
115
115
|
name = "bitflags"
|
|
116
|
-
version = "2.13.
|
|
116
|
+
version = "2.13.2"
|
|
117
117
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
-
checksum = "
|
|
118
|
+
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
|
119
119
|
|
|
120
120
|
[[package]]
|
|
121
121
|
name = "blake2"
|
|
@@ -368,9 +368,9 @@ dependencies = [
|
|
|
368
368
|
|
|
369
369
|
[[package]]
|
|
370
370
|
name = "confium-net-tcp"
|
|
371
|
-
version = "0.8.
|
|
371
|
+
version = "0.8.5"
|
|
372
372
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
373
|
-
checksum = "
|
|
373
|
+
checksum = "6f9dc8ede26a41714ca0d787592395face7551886cc229a8b97f30c34b903b2e"
|
|
374
374
|
dependencies = [
|
|
375
375
|
"confium-net",
|
|
376
376
|
"inventory",
|
|
@@ -406,9 +406,9 @@ dependencies = [
|
|
|
406
406
|
|
|
407
407
|
[[package]]
|
|
408
408
|
name = "confium-tc"
|
|
409
|
-
version = "0.
|
|
409
|
+
version = "0.10.0"
|
|
410
410
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
411
|
-
checksum = "
|
|
411
|
+
checksum = "da7534230988cb45831c6125baa93b122e71b3d9d61b414927068dfe62842bc3"
|
|
412
412
|
dependencies = [
|
|
413
413
|
"chrono",
|
|
414
414
|
"confium-tc-core",
|
|
@@ -428,9 +428,9 @@ dependencies = [
|
|
|
428
428
|
|
|
429
429
|
[[package]]
|
|
430
430
|
name = "confium-tc-cmp20"
|
|
431
|
-
version = "0.
|
|
431
|
+
version = "0.10.0"
|
|
432
432
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
433
|
-
checksum = "
|
|
433
|
+
checksum = "a87ceca32c969982e86304f6c820b1db60d88d668025d86b13f95c4a013e6b7b"
|
|
434
434
|
dependencies = [
|
|
435
435
|
"confium-tc",
|
|
436
436
|
"crypto-bigint 0.7.5",
|
|
@@ -447,9 +447,9 @@ dependencies = [
|
|
|
447
447
|
|
|
448
448
|
[[package]]
|
|
449
449
|
name = "confium-tc-core"
|
|
450
|
-
version = "0.
|
|
450
|
+
version = "0.10.0"
|
|
451
451
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
452
|
-
checksum = "
|
|
452
|
+
checksum = "86a3b3bda8a1453b8b5d02d13e88636dbcf8caa36671327a0ebce6514b97363f"
|
|
453
453
|
dependencies = [
|
|
454
454
|
"chrono",
|
|
455
455
|
"getrandom 0.4.3",
|
|
@@ -482,9 +482,9 @@ dependencies = [
|
|
|
482
482
|
|
|
483
483
|
[[package]]
|
|
484
484
|
name = "confium-tc-frost-ed25519"
|
|
485
|
-
version = "0.
|
|
485
|
+
version = "0.10.0"
|
|
486
486
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
487
|
-
checksum = "
|
|
487
|
+
checksum = "105b6f9d91b532fa118a18c6e2904684d46944db93cb79d2c3be8b13e0b2a680"
|
|
488
488
|
dependencies = [
|
|
489
489
|
"confium-tc",
|
|
490
490
|
"curve25519-dalek 5.0.0",
|
|
@@ -509,9 +509,9 @@ dependencies = [
|
|
|
509
509
|
|
|
510
510
|
[[package]]
|
|
511
511
|
name = "confium-tc-gg18"
|
|
512
|
-
version = "0.
|
|
512
|
+
version = "0.10.0"
|
|
513
513
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
514
|
-
checksum = "
|
|
514
|
+
checksum = "9c7a07f0bac8cffd60dfedd3f786f75c25aad0c9315ac1f6cdfb60ecdcb025e6"
|
|
515
515
|
dependencies = [
|
|
516
516
|
"confium-tc",
|
|
517
517
|
"crypto-bigint 0.7.5",
|
|
@@ -1185,9 +1185,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
|
1185
1185
|
|
|
1186
1186
|
[[package]]
|
|
1187
1187
|
name = "hybrid-array"
|
|
1188
|
-
version = "0.4.
|
|
1188
|
+
version = "0.4.15"
|
|
1189
1189
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1190
|
-
checksum = "
|
|
1190
|
+
checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
|
|
1191
1191
|
dependencies = [
|
|
1192
1192
|
"subtle",
|
|
1193
1193
|
"typenum",
|
|
@@ -1853,9 +1853,9 @@ dependencies = [
|
|
|
1853
1853
|
|
|
1854
1854
|
[[package]]
|
|
1855
1855
|
name = "rnp-rs"
|
|
1856
|
-
version = "0.1.
|
|
1856
|
+
version = "0.1.17"
|
|
1857
1857
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1858
|
-
checksum = "
|
|
1858
|
+
checksum = "f3df383e603a1e920409e1c7fae0a80b829a7b51151ba7854cfb58415f8c9e04"
|
|
1859
1859
|
dependencies = [
|
|
1860
1860
|
"rnp-sys",
|
|
1861
1861
|
"snafu 0.9.2",
|
|
@@ -1863,9 +1863,9 @@ dependencies = [
|
|
|
1863
1863
|
|
|
1864
1864
|
[[package]]
|
|
1865
1865
|
name = "rnp-src"
|
|
1866
|
-
version = "0.
|
|
1866
|
+
version = "0.3.0"
|
|
1867
1867
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1868
|
-
checksum = "
|
|
1868
|
+
checksum = "c4e6f4474772f8f4bfed1d6ba1a465bc524442206fe012257bfdcf8f6e0ab935"
|
|
1869
1869
|
dependencies = [
|
|
1870
1870
|
"botan-src",
|
|
1871
1871
|
"flate2",
|
|
@@ -1875,9 +1875,9 @@ dependencies = [
|
|
|
1875
1875
|
|
|
1876
1876
|
[[package]]
|
|
1877
1877
|
name = "rnp-sys"
|
|
1878
|
-
version = "0.1.
|
|
1878
|
+
version = "0.1.2"
|
|
1879
1879
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1880
|
-
checksum = "
|
|
1880
|
+
checksum = "9ec6224a4e26bf2f71bca848f485aeefbd6bdb1721b6c83e5cb70980563ec982"
|
|
1881
1881
|
dependencies = [
|
|
1882
1882
|
"bindgen",
|
|
1883
1883
|
"pkg-config",
|
|
@@ -2141,9 +2141,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
2141
2141
|
|
|
2142
2142
|
[[package]]
|
|
2143
2143
|
name = "smallvec"
|
|
2144
|
-
version = "1.16.
|
|
2144
|
+
version = "1.16.1"
|
|
2145
2145
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2146
|
-
checksum = "
|
|
2146
|
+
checksum = "ba467056f1b547ed52077911161fc86985becbc60e8e1857c8a144dab0def891"
|
|
2147
2147
|
|
|
2148
2148
|
[[package]]
|
|
2149
2149
|
name = "snafu"
|
|
@@ -2814,18 +2814,18 @@ dependencies = [
|
|
|
2814
2814
|
|
|
2815
2815
|
[[package]]
|
|
2816
2816
|
name = "zerocopy"
|
|
2817
|
-
version = "0.8.
|
|
2817
|
+
version = "0.8.57"
|
|
2818
2818
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2819
|
-
checksum = "
|
|
2819
|
+
checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873"
|
|
2820
2820
|
dependencies = [
|
|
2821
2821
|
"zerocopy-derive",
|
|
2822
2822
|
]
|
|
2823
2823
|
|
|
2824
2824
|
[[package]]
|
|
2825
2825
|
name = "zerocopy-derive"
|
|
2826
|
-
version = "0.8.
|
|
2826
|
+
version = "0.8.57"
|
|
2827
2827
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2828
|
-
checksum = "
|
|
2828
|
+
checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc"
|
|
2829
2829
|
dependencies = [
|
|
2830
2830
|
"proc-macro2",
|
|
2831
2831
|
"quote",
|
|
@@ -42,16 +42,16 @@ confium-attributes = "0.3.1"
|
|
|
42
42
|
confium-pki = "0.5.6"
|
|
43
43
|
confium-store = "0.5.8"
|
|
44
44
|
confium-deployment = "0.3"
|
|
45
|
-
confium-tc = "0.
|
|
45
|
+
confium-tc = "0.10"
|
|
46
46
|
confium-tc-frost-p256 = "0.4"
|
|
47
47
|
confium-tc-elgamal-p256 = "0.4"
|
|
48
|
-
confium-tc-cmp20 = "0.
|
|
49
|
-
confium-tc-gg18 = "0.
|
|
48
|
+
confium-tc-cmp20 = "0.10"
|
|
49
|
+
confium-tc-gg18 = "0.10"
|
|
50
50
|
|
|
51
51
|
# Per-party session protocol: the tc-core 0.4 registry line. The 0.3-era
|
|
52
52
|
# in-process drivers above keep their own registry harmlessly.
|
|
53
|
-
confium-tc-session = { package = "confium-tc-core", version = "0.
|
|
54
|
-
confium-tc-frost-ed25519 = "0.
|
|
53
|
+
confium-tc-session = { package = "confium-tc-core", version = "0.10" }
|
|
54
|
+
confium-tc-frost-ed25519 = "0.10"
|
|
55
55
|
|
|
56
56
|
# P-256 scalar/point types used by the TC surface.
|
|
57
57
|
p256 = { version = "0.13", features = ["ecdsa"] }
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
//! expose the three passes with messages as plain Hashes of hex
|
|
8
8
|
//! integers so rounds can be JSON-encoded onto a transport.
|
|
9
9
|
//!
|
|
10
|
-
//!
|
|
11
|
-
//!
|
|
12
|
-
//!
|
|
13
|
-
//!
|
|
14
|
-
//!
|
|
15
|
-
//!
|
|
16
|
-
//!
|
|
10
|
+
//! Key direction: the exchange runs under the INITIATOR's Paillier
|
|
11
|
+
//! key. Party i encrypts k_i under its own public key, party j
|
|
12
|
+
//! responds using ONLY public material (it can never open the
|
|
13
|
+
//! initiator's ciphertext), and only party i can decrypt the response
|
|
14
|
+
//! — so the split rounds are sound across processes: alpha stays with
|
|
15
|
+
//! the initiator, beta-prime with the responder, and neither share
|
|
16
|
+
//! holder can recover the other's secret. `full` is the in-process
|
|
17
|
+
//! convenience for a coordinator that legitimately holds the
|
|
18
|
+
//! initiator's keypair.
|
|
17
19
|
|
|
18
20
|
use confium_tc::paillier::{
|
|
19
21
|
generate_keypair as generate_paillier_keypair, PaillierKeypair, PaillierPrivateKey,
|
|
@@ -241,12 +243,12 @@ fn mta_generate_commitment_key(ruby: &Ruby, prime_bits: i64) -> Result<RHash, Er
|
|
|
241
243
|
|
|
242
244
|
fn mta_party_i_init(
|
|
243
245
|
ruby: &Ruby,
|
|
244
|
-
|
|
246
|
+
i_public: RHash,
|
|
245
247
|
ck_j: RHash,
|
|
246
248
|
q: String,
|
|
247
249
|
k_i: String,
|
|
248
250
|
) -> Result<RHash, Error> {
|
|
249
|
-
let public = public_from_hash(&
|
|
251
|
+
let public = public_from_hash(&i_public)?;
|
|
250
252
|
let ck = commitment_key_from_hash(&ck_j)?;
|
|
251
253
|
let q = parse_hex(&q, "q")?;
|
|
252
254
|
let k_i = parse_hex(&k_i, "k_i")?;
|
|
@@ -257,33 +259,24 @@ fn mta_party_i_init(
|
|
|
257
259
|
|
|
258
260
|
fn mta_party_j_respond(
|
|
259
261
|
ruby: &Ruby,
|
|
260
|
-
|
|
261
|
-
j_private: RHash,
|
|
262
|
+
i_public: RHash,
|
|
262
263
|
ck_i: RHash,
|
|
263
264
|
ck_j: RHash,
|
|
264
265
|
q: String,
|
|
265
266
|
msg1: RHash,
|
|
266
267
|
x_j: String,
|
|
267
268
|
) -> Result<magnus::RArray, Error> {
|
|
268
|
-
|
|
269
|
-
|
|
269
|
+
// Only the initiator's PUBLIC material: the responder can never
|
|
270
|
+
// open the ciphertext it operates on.
|
|
271
|
+
let public = public_from_hash(&i_public)?;
|
|
270
272
|
let ck_i = commitment_key_from_hash(&ck_i)?;
|
|
271
273
|
let ck_j = commitment_key_from_hash(&ck_j)?;
|
|
272
274
|
let q = parse_hex(&q, "q")?;
|
|
273
275
|
let msg1 = msg1_from_hash(&msg1)?;
|
|
274
276
|
let x_j = parse_hex(&x_j, "x_j")?;
|
|
275
|
-
let (msg2, beta) =
|
|
276
|
-
&
|
|
277
|
-
|
|
278
|
-
private,
|
|
279
|
-
},
|
|
280
|
-
&ck_i,
|
|
281
|
-
&ck_j,
|
|
282
|
-
&q,
|
|
283
|
-
&msg1,
|
|
284
|
-
&x_j,
|
|
285
|
-
)
|
|
286
|
-
.map_err(|e| mta_error(ruby, "tc_cmp20_mta_respond", e))?;
|
|
277
|
+
let (msg2, beta) =
|
|
278
|
+
party_j_respond_proved(&public, &ck_i, &ck_j, &q, &msg1, &x_j)
|
|
279
|
+
.map_err(|e| mta_error(ruby, "tc_cmp20_mta_respond", e))?;
|
|
287
280
|
crate::audit::fire_event("tc_cmp20_mta_respond", "success", Some(ALGORITHM), None, None);
|
|
288
281
|
let out = ruby.ary_new_capa(2);
|
|
289
282
|
out.push(msg2_to_hash(ruby, &msg2)?)?;
|
|
@@ -293,15 +286,15 @@ fn mta_party_j_respond(
|
|
|
293
286
|
|
|
294
287
|
fn mta_party_i_finish(
|
|
295
288
|
ruby: &Ruby,
|
|
296
|
-
|
|
297
|
-
|
|
289
|
+
i_public: RHash,
|
|
290
|
+
i_private: RHash,
|
|
298
291
|
ck_i: RHash,
|
|
299
292
|
q: String,
|
|
300
293
|
msg1_ciphertext: String,
|
|
301
294
|
msg2: RHash,
|
|
302
295
|
) -> Result<RString, Error> {
|
|
303
|
-
let public = public_from_hash(&
|
|
304
|
-
let private = private_from_hash(&
|
|
296
|
+
let public = public_from_hash(&i_public)?;
|
|
297
|
+
let private = private_from_hash(&i_private)?;
|
|
305
298
|
let ck_i = commitment_key_from_hash(&ck_i)?;
|
|
306
299
|
let q = parse_hex(&q, "q")?;
|
|
307
300
|
let ciphertext = parse_hex(&msg1_ciphertext, "message 1 ciphertext")?;
|
|
@@ -314,16 +307,16 @@ fn mta_party_i_finish(
|
|
|
314
307
|
|
|
315
308
|
fn mta_full(
|
|
316
309
|
ruby: &Ruby,
|
|
317
|
-
|
|
318
|
-
|
|
310
|
+
i_public: RHash,
|
|
311
|
+
i_private: RHash,
|
|
319
312
|
ck_i: RHash,
|
|
320
313
|
ck_j: RHash,
|
|
321
314
|
q: String,
|
|
322
315
|
k_i: String,
|
|
323
316
|
x_j: String,
|
|
324
317
|
) -> Result<magnus::RArray, Error> {
|
|
325
|
-
let public = public_from_hash(&
|
|
326
|
-
let private = private_from_hash(&
|
|
318
|
+
let public = public_from_hash(&i_public)?;
|
|
319
|
+
let private = private_from_hash(&i_private)?;
|
|
327
320
|
let ck_i = commitment_key_from_hash(&ck_i)?;
|
|
328
321
|
let ck_j = commitment_key_from_hash(&ck_j)?;
|
|
329
322
|
let q = parse_hex(&q, "q")?;
|
|
@@ -361,7 +354,7 @@ pub fn init(ruby: &Ruby, cmp20: &magnus::RModule) -> Result<(), Error> {
|
|
|
361
354
|
magnus::function!(mta_generate_commitment_key, 1),
|
|
362
355
|
)?;
|
|
363
356
|
mta.define_module_function("party_i_init", magnus::function!(mta_party_i_init, 4))?;
|
|
364
|
-
mta.define_module_function("party_j_respond", magnus::function!(mta_party_j_respond,
|
|
357
|
+
mta.define_module_function("party_j_respond", magnus::function!(mta_party_j_respond, 6))?;
|
|
365
358
|
mta.define_module_function("party_i_finish", magnus::function!(mta_party_i_finish, 6))?;
|
|
366
359
|
mta.define_module_function("full", magnus::function!(mta_full, 7))?;
|
|
367
360
|
Ok(())
|
data/lib/confium/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: confium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Open
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|