eddsaDuoKeyExport function
- required String serverEncryptionPublicKey,
- required SchnorrEncryptionKey clientEncryptionKeys,
Export(Duo) both parties key by merging them and create a private key.
keyshare is the keyshare of the client.
serverEncrptedKeyshare is the encrypted keyshare of the server.
serverEncryptionPublicKey is the public key of the server.
clientEncryptionKey is the SchnorrEncryptionKey key of the client.
returns the private key in hex format.
Implementation
Future<String> eddsaDuoKeyExport({
required schnorr.SchnorrKeyshare keyshare,
required String serverEncrptedKeyshare,
required String serverEncryptionPublicKey,
required schnorr.SchnorrEncryptionKey clientEncryptionKeys,
}) async {
return hex.encode(await schnorr.eddsaKeyExport(
clientKeyShare: keyshare.handle,
recvDecKey: clientEncryptionKeys.privateKeyHandle,
serverEncrptedKeyshare:
Uint8List.fromList(hex.decode(serverEncrptedKeyshare)),
senderEncKey: Uint8List.fromList(hex.decode(serverEncryptionPublicKey)),
));
}