SSSS

SSSS stands for Shamir Secret's Sharing Store, a metadata-rich format for Shamir's secret sharing algorithm and the “shares” created using it. Usually used for distributing private information (a "secret") among a group (individuals or devices), the secret is revealed once the threshold of shares has been combined.

JSON Schema

{
$schema: "http://json-schema.org/draft-07/schema#"
type: "object"
properties: {
version: {
type: "number"
description: "The version of the schema."
}
id: {
type: "string"
description: "A unique identifier."
}
share: {
type: "object"
description: "Information about the share."
properties: {
total: {
type: "number"
description: "Total number of shares."
}
threshold: {
type: "number"
description: "Minimum number of shares required."
}
encrypted: {
type: "boolean"
description: "Indicates if the share is encrypted."
}
share_sha512: {
type: "string"
description: "SHA512 hash of the share."
}
secret_sha512: {
type: "string"
description: "SHA512 hash of the secret."
}
}
required: [
0: "total"
1: "threshold"
2: "encrypted"
3: "share_sha512"
4: "secret_sha512"
]
}
crypto: {
type: "object"
description: "Cryptographic parameters associated with the share."
properties: {
ciphertext: {
type: "string"
description: "The encrypted text."
}
cipherparams: {
type: "object"
description: "Parameters for the encryption cipher."
properties: {
iv: {
type: "string"
description: "Initialization vector for encryption."
}
name: {
type: "string"
description: "Name of the cipher."
}
length: {
type: "number"
description: "Length of the cipher."
}
}
required: [
0: "iv"
1: "name"
2: "length"
]
}
kdf: {
type: "string"
description: "Key derivation function used."
}
kdfparams: {
type: "object"
description: "Parameters for the key derivation function."
properties: {
salt: {
type: "string"
description: "Salt value for key derivation."
}
iterations: {
type: "number"
description: "Number of iterations for key derivation."
}
hash: {
type: "string"
description: "Hash function used in key derivation."
}
}
required: [
0: "salt"
1: "iterations"
2: "hash"
]
}
}
required: [
0: "ciphertext"
1: "cipherparams"
2: "kdf"
3: "kdfparams"
]
}
algorithm: {
type: "string"
description: "Name of the algorithm used."
}
}
required: [
0: "version"
1: "id"
2: "share"
3: "crypto"
4: "algorithm"
]
}

PoC by 0xjjpa