Research icon indicating copy to clipboard operation
Research copied to clipboard

Type for SSKR config parameters

Open simonratner opened this issue 2 years ago • 3 comments

To help with guided recovery on clients, and metadata for collaborative recovery services (https://github.com/BlockchainCommons/Community/issues/149), it is useful to have a type encoding just the config parameters of a unique SSKR split, without the share values.

The following parameters from https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-011-sskr.md would be useful as part of this type:

  • identifier (id)
  • group-threshold (Gt)
  • group-count (g)
  • member-threshold (t) per group

simonratner avatar Jun 29 '22 20:06 simonratner

Quick sketch if we want to keep a similar compact format (and re-use some parsing logic):

crypto-sskr-params = bytes

Bit fields of data field:

pack the id, group and member data into (3+g) bytes:
76543210        76543210        76543210
        76543210        76543210
----------------====----====----====----
identifier: 16
                group-threshold: 4
                    group-count: 4
                        repeat (× g):
                        group-index: 4
                            member-threshold: 4
                                ....
                                    ....

Alternatively, this can be a proper CBOR struct since it probably doesn't have the same pressure to optimize for size.

simonratner avatar Jul 01 '22 18:07 simonratner

If there is a plan to use the reserved bits of crypto-sskr for versioning, that should probably be included too.

simonratner avatar Jul 01 '22 18:07 simonratner

I expect that when we do choose to update the SSKR format, we will indicate this using one of the reserved bits.

wolfmcnally avatar Dec 02 '22 01:12 wolfmcnally