Skip to content

Commit 3199f88

Browse files
committed
Update docs
Signed-off-by: Denis Varlakov <[email protected]>
1 parent e97c900 commit 3199f88

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

CGGMP21_MIGRATION.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,13 @@ keys. This makes it a one-time setup cost.
4747

4848
### Recovering Existing Key Shares
4949

50-
If you have stored a complete `cggmp24::KeyShare` from a previous version, you will not be able to
51-
deserialize it directly. To recover the essential data, you must first extract the core "incomplete"
52-
key share.
53-
54-
Use the `cggmp24::key_share::cggmp21_compat::ExtractCoreShare` utility. This type implements
55-
the `serde::Deserialize` trait, which allows it to deserialize a full key share from the
56-
previous version, discard the incompatible auxiliary data, and lets you retrieve the
57-
`cggmp24::key_share::IncompleteKeyShare`.
50+
If you have stored a complete `cggmp24::KeyShare` from a previous version, you will not be
51+
able to deserialize it directly. To recover the essential data from serialized key shares,
52+
you need to extract the "incomplete" key share from them. To do that, you can use the
53+
`cggmp24::key_share::cggmp21_compat::ExtractCoreShare` utility structure: it provides a
54+
`serde::Deserialize` implementation that is compatible with the `cggmp21::KeyShare` format. This
55+
allows you, while still using the new version of the library, to read an old version of a key share,
56+
and extract the "core".
5857

5958
Once you have the core key share, you can combine it with your newly generated auxiliary data to
6059
reconstruct a complete, compatible key share.

key-share/src/trusted_dealer.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ impl<E: Curve> TrustedDealerBuilder<E> {
9595

9696
/// Generates [`CoreKeyShare`]s
9797
///
98-
/// Returns error if provided inputs are invalid, or if internal
99-
/// error has occurred.
100-
///
10198
/// For Shamir secret sharing, it's shared at points `1` to `n`
10299
///
103100
/// Returns error if provided inputs are invalid, or if internal
@@ -115,9 +112,6 @@ impl<E: Curve> TrustedDealerBuilder<E> {
115112

116113
/// Generates [`CoreKeyShare`]s shared at random points
117114
///
118-
/// Returns error if provided inputs are invalid, or if internal
119-
/// error has occurred.
120-
///
121115
/// For Shamir secret sharing, the points at which the value is shared at
122116
/// are chosen at random between `1` and `u16::MAX`. For additive shares,
123117
/// this is the same as [`TrustedDealerBuilder::generate_shares`]

0 commit comments

Comments
 (0)