Interface: Crypto
Secure MPC signature algorithms for ECDSA and EDDSA systems
Describes both closed and open execution environments, where temporary and permanent data are stored within the environment itself and may not be imported or exported. For software implementations, that means using StorageDrivers to keep data storage opaque and compatible with HSM/TEE implementations.
Implemented by
Methods
checkSecret
▸ checkSecret(secretId
): Promise
<boolean
>
Check whether or not a secretId is occupied
Parameters
Name | Type | Description |
---|---|---|
secretId |
string |
ID (UUID) of a secret in question |
Returns
Promise
<boolean
>
true if provided secretId is occupied
exportSecret
▸ exportSecret(secretId
): Promise
<null
| string
>
Export stored secret as string
Note
Actual ability to import/export secrets may depend on implementation.
Parameters
Name | Type | Description |
---|---|---|
secretId |
string |
ID (UUID) of a secret in question |
Returns
Promise
<null
| string
>
64 bytes of base64-encoded data or null if no secret is present under secretId
generateSecret
▸ generateSecret(secretId
): Promise
<void
>
Generate a new random secret under the provided secretId
Note
throws if secretId is already in use
Parameters
Name | Type | Description |
---|---|---|
secretId |
string |
externally provided ID (UUID) to bind secret to |
Returns
Promise
<void
>
getCompoundEcdsaPublicKey
▸ getCompoundEcdsaPublicKey(secretId
, syncSessionId
): Promise
<string
>
Parameters
Name | Type |
---|---|
secretId |
string |
syncSessionId |
string |
Returns
Promise
<string
>
getCompoundEddsaPublicKey
▸ getCompoundEddsaPublicKey(secretId
, syncSessionId
): Promise
<string
>
Parameters
Name | Type |
---|---|
secretId |
string |
syncSessionId |
string |
Returns
Promise
<string
>
importSecret
▸ importSecret(secretId
, secret
): Promise
<void
>
Import an existing secret under the specified secretId
Note
throws if secretId is already in use
Note
Actual ability to import/export secrets may depend on implementation.
Parameters
Name | Type | Description |
---|---|---|
secretId |
string |
externally provided ID (UUID) to bind secret to |
secret |
string |
64 bytes of base64-encoded data |
Returns
Promise
<void
>