generateEncryptionDecryptionKeyPair

Generates a keypair for encrypting/decrypting keyshare backups.

Use this to create encryption keys for secure keyshare export/import operations. The encryption key should be kept secure, while the decryption key can be shared with the other party for import operations.

Example:

// Party A generates encryption keys
val (encryptionKey, decryptionKey) = SilentShard.ECDSA.generateEncryptionDecryptionKeyPair()

// Party A exports keyshare with their encryption key
val exportedData = session.export(
hostKeyshare = keyshare,
otherEncryptedKeyshare = peerEncryptedKeyshare,
hostEncryptionKey = encryptionKey,
otherDecryptionKey = peerDecryptionKey
).getOrThrow()

Return

Pair of (encryptionKey, decryptionKey) as ByteArray