ggmpc.serialization.eddsa¶
Serialization functions for EdDSA data.
Module Contents¶
Functions¶
|
Serialize a secret. |
|
Deserialize a secret. |
|
Serialize a u-share. |
|
Deserialize a u-share. |
|
Serialize a y-share. |
|
Deserialize a y-share. |
|
Serialize a p-share. |
|
Deserialize a p-share. |
|
Serialize a j-share. |
|
Deserialize a j-share. |
|
Serialize an x-share. |
|
Deserialize an x-share. |
|
Serialize an r-share. |
|
Deserialize an r-share. |
|
Serialize a g-share. |
|
Deserialize a g-share. |
|
Serialize a signature. |
Deserialize a signature. |
- ggmpc.serialization.eddsa.serialize_secret(sk)¶
Serialize a secret.
- Parameters:
sk (dict) – The secret to serialize.
- Returns:
Serialization of secret.
- Return type:
bytes
- ggmpc.serialization.eddsa.deserialize_secret(ser)¶
Deserialize a secret.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of serialized data and the deserialized secret.
- Return type:
tuple
Serialize a u-share.
- Parameters:
share (dict) – U-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize a u-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized u-share.
- Return type:
tuple
Serialize a y-share.
- Parameters:
share (dict) – Y-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize a y-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized y-share.
- Return type:
tuple
Serialize a p-share.
- Parameters:
share (dict) – P-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize a p-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized p-share.
- Return type:
tuple
Serialize a j-share.
- Parameters:
share (dict) – J-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize a j-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized j-share.
- Return type:
tuple
Serialize an x-share.
- Parameters:
share (dict) – X-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize an x-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized x-share.
- Return type:
tuple
Serialize an r-share.
- Parameters:
share (dict) – R-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize an r-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized r-share.
- Return type:
tuple
Serialize a g-share.
- Parameters:
share (dict) – G-share to serialize.
- Returns:
Serialization of share.
- Return type:
bytes
Deserialize a g-share.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized g-share.
- Return type:
tuple
- ggmpc.serialization.eddsa.serialize_signature(signature)¶
Serialize a signature.
- Parameters:
share (dict) – Signature to serialize.
- Returns:
Serialization of signature.
- Return type:
bytes
- ggmpc.serialization.eddsa.deserialize_signature(ser)¶
Deserialize a signature.
- Parameters:
ser (bytes) – Serialized data.
- Returns:
The remainder of the serialized data and the deserialized signature.
- Return type:
tuple