Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions zk-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ mod sigma_proofs;
pub mod transcript;
pub mod zk_elgamal_proof_program;

/// Global transcript domain separator.
///
/// This string MUST be changed for any fork or separate deployment to prevent
/// cross-chain proof replay attacks.
Comment on lines +34 to +35
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just so I'm sure I understand, we're not differentiating this for different networks, ie testnet vs devnet vs mainnet?

If we wanted to be pedantic, we may want to include the genesis hash in the domain, but this should be fine

Copy link
Copy Markdown
Contributor Author

@samkim-crypto samkim-crypto Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we encountered this issue for alpenglow BLS as well and I thought about this briefly. I think it adds a lot of extra complications if we differentiate between testnet, devnet, and mb. We probably need to add different features (in both solana-zk-sdk and agave) that has different hardcoded domain separator targeted at different networks and validators will need to deploy network specific builds of the zk-elgamal proof program.

I guess we can have the program directly look up the genesis hash inside the program and add it as an input to the verification function, but this probably adds another set of complications. I think keeping it uniform across different networks probably simplifies testing and maintenance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep that's fine, just wanted to make sure

pub const TRANSCRIPT_DOMAIN: &[u8] = b"solana-zk-elgamal-proof-program-v1";

/// Byte length of a compressed Ristretto point or scalar in Curve255519
const UNIT_LEN: usize = 32;
/// Byte length of a compressed Ristretto point in Curve25519
Expand Down
6 changes: 3 additions & 3 deletions zk-sdk/src/range_proof/inner_product.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ mod tests {
G.iter().chain(H.iter()).chain(iter::once(&Q)),
);

let mut prover_transcript = Transcript::new(b"innerproducttest");
let mut verifier_transcript = Transcript::new(b"innerproducttest");
let mut prover_transcript = Transcript::new_zk_elgamal_transcript(b"innerproducttest");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"innerproducttest");

let proof = InnerProductProof::new(
&Q,
Expand Down Expand Up @@ -532,7 +532,7 @@ mod tests {
.is_ok());

let proof = InnerProductProof::from_bytes(proof.to_bytes().as_slice()).unwrap();
let mut verifier_transcript = Transcript::new(b"innerproducttest");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"innerproducttest");
assert!(proof
.verify(
n,
Expand Down
22 changes: 11 additions & 11 deletions zk-sdk/src/range_proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ mod tests {
fn test_single_rangeproof() {
let (comm, open) = Pedersen::new(55_u64);

let mut transcript_create = Transcript::new(b"Test");
let mut transcript_verify = Transcript::new(b"Test");
let mut transcript_create = Transcript::new_zk_elgamal_transcript(b"Test");
let mut transcript_verify = Transcript::new_zk_elgamal_transcript(b"Test");

let proof =
RangeProof::new(vec![55], vec![32], vec![&open], &mut transcript_create).unwrap();
Expand All @@ -551,8 +551,8 @@ mod tests {
let (comm_2, open_2) = Pedersen::new(77_u64);
let (comm_3, open_3) = Pedersen::new(99_u64);

let mut transcript_create = Transcript::new(b"Test");
let mut transcript_verify = Transcript::new(b"Test");
let mut transcript_create = Transcript::new_zk_elgamal_transcript(b"Test");
let mut transcript_verify = Transcript::new_zk_elgamal_transcript(b"Test");

let proof = RangeProof::new(
vec![55, 77, 99],
Expand Down Expand Up @@ -580,8 +580,8 @@ mod tests {
fn range_proof_bytes_roundtrip() {
let (comm, open) = Pedersen::new(42_u64);

let mut transcript_create = Transcript::new(b"Test");
let mut transcript_verify = Transcript::new(b"Test");
let mut transcript_create = Transcript::new_zk_elgamal_transcript(b"Test");
let mut transcript_verify = Transcript::new_zk_elgamal_transcript(b"Test");

let bits: usize = 8;

Expand All @@ -602,23 +602,23 @@ mod tests {

#[test]
fn test_range_proof_string() {
let commitment_1_str = "dDaa/MTEDlyI0Nxx+iu1tOteZsTWmPXAfn9QI0W9mSc=";
let commitment_1_str = "qtkYT/O6bSJ9y7mtqxjZ7dOqloJwLGTcTaeG+5GlBWo=";
let pod_commitment_1 = PodPedersenCommitment::from_str(commitment_1_str).unwrap();
let commitment_1: PedersenCommitment = pod_commitment_1.try_into().unwrap();

let commitment_2_str = "tnRILjKpogi2sXxLgZzMqlqPMLnCJmrSjZ5SPQYhtgg=";
let commitment_2_str = "pCdHYFSN7yMEK9Li01M1w1OeRzbaVgQ8xYHlxPTUtF0=";
let pod_commitment_2 = PodPedersenCommitment::from_str(commitment_2_str).unwrap();
let commitment_2: PedersenCommitment = pod_commitment_2.try_into().unwrap();

let commitment_3_str = "ZAC5ZLXotsMOVExtrr56D/EZNeyo9iWepNbeH22EuRo=";
let commitment_3_str = "gqs3gA6CqT3Uvpb2eCW/lo6m/A2RxHSSopObQkv3DCU=";
let pod_commitment_3 = PodPedersenCommitment::from_str(commitment_3_str).unwrap();
let commitment_3: PedersenCommitment = pod_commitment_3.try_into().unwrap();

let proof_str = "AvvBQL63pXMXsmuvuNbs/CqXdzeyrMpEIO2O/cI6/SyqU4N+7HUU3LmXai9st+DxqTnuKsm0SgnADfpLpQCEbDDupMb09NY8oHT8Bx8WQhv9eyoBlrPRd7DVhOUsio02gBshe3p2Wj7+yDCpFaZ7/PMypFBX6+E+EqCiPI6yUk4ztslWY0Ksac41eJgcPzXyIx2kvmSTsVBKLb7U01PWBC+AUyUmK3/IdvmJ4DnlS3xFrdg/mxSsYJFd3OZA3cwDb0jePQf/P43/2VVqPRixMVO7+VGoMKPoRTEEVbClsAlW6stGTFPcrimu3c+geASgvwElkIKNGtYcjoj3SS+/VeqIG9Ei1j+TJtPhOE9SG4KNw9xBGwecpliDbQhKjO950EVcnOts+a525/frZV1jHJmOOrZtKRV4pvk37dtQkx4sv+pxRmfVrjwOcKQeg+BzcuF0vaQbqa4SUbzbO9z3RwIMlYIBaz0bqZgJmtPOFuFmNyCJaeB29vlcEAfYbn5gdlgtWP50tKmhoskndulziKZjz4qHSA9rbG2ZtoMHoCsAobHKu2H9OxcaK4Scj1QGwst+zXBEY8uePNbxvU5DMJLVFORtLUXkVdPCmCSsm1Bz4TRbnls8LOVW6wqTgShQMhjNM3RtwdHXENPn5uDnhyvfduAcL+DtI8AIJyRneROefk7i7gjal8dLdMM/QnXT7ctpMQU6uNlpsNzq65xlOQKXO71vQ3c2mE/DmxVJi6BTS5WCzavvhiqdhQyRL61ESCALQpaP0/d0DLwLikVH3ypuDLEnVXe9Pmkxdd0xCzO6QcfyK50CPnV/dVgHeLg8EVag2O83+/7Ys5oLxrDad9TJTDcrT2xsRqECFnSA+z9uZtDPujhQL0ogS5RH4agnQN4mVGTwOLV8OKpn+AvWq6+j1/9EXFkLPBTU5wT0FQuT2VZ8xp5GeqdI13Zey1uPrxc6CZZ407y9OINED4IdBQ==";
let proof_str = "lLDpeo97bHU8A34ruX/wKUY4SJgCKLZf7HiBy6Tz5R8EGdLQuqleOmGWWt+tWO9XMqww1vBNDSADFTMONLWsNLrsArLR2ALxpqUSo/Kw9LG3gH+YApSZksWrYuk7RG1K0JtVnt6j9hYSoLiuinkIm3iWTyfrVZooiX1FMoRAnD5SyPYNJxV4e4POb6WpJvkgXVZuNUC5DF0SK2yVihGmBu05fpG8eHhMcekSPUfIVjNfSQImJ09YvVUgVJvGAcAKBIbB/L2bOfUcmRcrun/F8cOnV5MuSJ0IzYcl9SkEPgEKiC5qv4oep2fWg4Ch0RUM9uWBxI+FXbM/xesdvTzfC3bIhntvws8f5BON6hm/6reWR/7J+z+8rSM0pbpFDalaWLXYxM7uSm4sHzvZtU+Z6/eDvpmNJyVCfFbkcETQsQ/OMzavDAbhpbsvcOPHIgTiesOtgDFBYWarJSrWSmckcaqQ1bEftaSkB+Kbs6zvfc0Pl0LfOy5zt3a3Nqh0a5BwgFEerolBgu/ZX5sptjTnu2psvgBPDzOsUYtRKhY1sXPyg2t9KhFVJ/Riw1+AlnQuAL0GJYCFPUVSkJX2dRVzHQ41kdti6pMsTh/ifBLLlSf5AYk9jiYeHk1HCokBITcwXL36nI3B1HQl6g3/nsx//Jd7w17hJuuIYkOhNuz7iTtisvnCNZdiDkFcTky8ya8oJBM1kJrdakdesStWTXzJOvKfs5jUrl5yVksq+E/jM/oU09cYSoesUQMxAgHqJmkvipRlx71+/YgL1349W4wJ3oPd6kkYx0YVwEHjqiZTvnJEVyUvQxc6X0ddUpNBrjfRxKJ5OV+axOaz76S22PokJh6LNbwa7EUVEwVW0BIABytN9fOe7y+2w4+k73Q8LuFE5QIaqcWX/9IRHey5wEbKtF4ARD6pot92nqXZLxUP1whvrMYNlbFeYLGBX6T6J5+7j3c3fHgCZAhMWSU+MNuGBQ==";
let pod_proof = PodRangeProofU128::from_str(proof_str).unwrap();
let proof: RangeProof = pod_proof.try_into().unwrap();

let mut transcript_verify = Transcript::new(b"Test");
let mut transcript_verify = Transcript::new_zk_elgamal_transcript(b"Test");

proof
.verify(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ mod test {
handles: [first_handle_hi, second_handle_hi],
};

let mut prover_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new(b"Test");
let mut prover_transcript = Transcript::new_zk_elgamal_transcript(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

let proof = BatchedGroupedCiphertext2HandlesValidityProof::new(
first_pubkey,
Expand Down Expand Up @@ -254,32 +254,32 @@ mod test {

#[test]
fn test_batched_grouped_ciphertext_2_handles_validity_proof_string() {
let first_pubkey_str = "wiRFV9DBwFjq0VAhE0nIqReYYUp8ONNL8o2btZ7vMyA=";
let first_pubkey_str = "cvkvHnlr6h8V9V1Q2mGj5+XH6SBvJRR3dMdDYtgnpwk=";
let pod_first_pubkey = PodElGamalPubkey::from_str(first_pubkey_str).unwrap();
let first_pubkey: ElGamalPubkey = pod_first_pubkey.try_into().unwrap();

let second_pubkey_str = "4NXmE874oiZ5ZnId2pjT3G4PpIiZ+XXQ/S6CN7X3L0k=";
let second_pubkey_str = "evcjLw8+v2mcWRisCCKXbjWVNRsC0JufOoSV5cR9ixg=";
let pod_second_pubkey = PodElGamalPubkey::from_str(second_pubkey_str).unwrap();
let second_pubkey: ElGamalPubkey = pod_second_pubkey.try_into().unwrap();

let grouped_ciphertext_lo_str = "znf5HkMod0lFyQIXs/vEh5y/XupcB0BFWpifP3r9ty/yKqpQckmCu346CR0mz6c8UsCno340HpNHnXWgEu2BFuKo/7SDXpRBPwexGl1p2XWr4gzRA2mq02w7lGyKmXBD";
let grouped_ciphertext_lo_str = "MsnlU3s9YjWFaC3IjIKS52yl41X1xH+mre0BbAwE2j3E28wjWQPZn4B4nM+eV0zgihHq7uUSY57a4l42HJRULIBlCR/8G2Wfuq63WVbBroxmRbbJzZFGgdpGVLoFA8Aw";
let pod_grouped_ciphertext_lo =
PodGroupedElGamalCiphertext2Handles::from_str(grouped_ciphertext_lo_str).unwrap();
let grouped_ciphertext_lo: GroupedElGamalCiphertext<2> =
pod_grouped_ciphertext_lo.try_into().unwrap();

let grouped_ciphertext_hi_str = "8K38lmBNf4fym6a5VXtimvCeOl7+WnRy0flw4c8bEnOQkH+KjCuq49eoBFLWYj1qBl3z4T1oX0jqVMUV7Q56TSChJHie1HFJ/2JA0lNNLAGHFN2wWvi/oIsydgkHofov";
let grouped_ciphertext_hi_str = "2kpzTKaOoiNM/zZimt9g5uX60GFCes355lM4S2QvWx46YMpuGWoU5gG5G9hoCuY5T9PwGTiIQashf6mUFuulPWr0EYKatR7Q8dfyeFpJl2pdZ2Imwmf5LDqDUXSt9Zg3";
let pod_grouped_ciphertext_hi =
PodGroupedElGamalCiphertext2Handles::from_str(grouped_ciphertext_hi_str).unwrap();
let grouped_ciphertext_hi: GroupedElGamalCiphertext<2> =
pod_grouped_ciphertext_hi.try_into().unwrap();

let proof_str = "/nHixPF/ne2Wo67Ga4Jk/H1BkD0Erf/aqKqiUSjb71liado8WGgY0He29iKYeDUoq5NMASG/Qd9YGNg4IDr+ZLL4uTGGv4+Gdu2oXsTDgVM1rfu8K27vb5k7crDw7DN15CHXR+vjrVR0VxajwlBNWQAFWB8rEkSIDZUoJOU28gGjWK3TpJ3mBwY2YgntcHT1+GgeRmdnSrieU6wo45oHAw==";
let proof_str = "GqVxS3sISd9hw3r0jDx3qwNFArLpiXMcySvtQqu5PSGoZDTtRgXMDiSEPSRoTER7/pjI/z2G8yNWYBMS6E28U8rnVCAS6k1K8anbrTF4n7TRmAac4CdpKCh8AZPzvi40kpWskl20Fogq8WPVf1r2i6nesQGTrMsKXH5j7ShC8QZbPtTn878eTdB7K9DNWFxGshxL8KzMh0dLMlj7IAJnAg==";
let pod_proof =
PodBatchedGroupedCiphertext2HandlesValidityProof::from_str(proof_str).unwrap();
let proof: BatchedGroupedCiphertext2HandlesValidityProof = pod_proof.try_into().unwrap();

let mut verifier_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

proof
.verify(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ mod test {
handles: [first_handle_hi, second_handle_hi, third_handle_hi],
};

let mut prover_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new(b"Test");
let mut prover_transcript = Transcript::new_zk_elgamal_transcript(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

let proof = BatchedGroupedCiphertext3HandlesValidityProof::new(
first_pubkey,
Expand Down Expand Up @@ -280,36 +280,36 @@ mod test {

#[test]
fn test_batched_grouped_ciphertext_3_handles_validity_proof_string() {
let first_pubkey_str = "wHNY5XvUo78IXLa1cUlUihKFtGc4MBYNa2owsDMUeGY=";
let first_pubkey_str = "mv/4oSby3PfTEG9gG4SDDlkN3b0YTpuyjdX9+40FKQY=";
let pod_first_pubkey = PodElGamalPubkey::from_str(first_pubkey_str).unwrap();
let first_pubkey: ElGamalPubkey = pod_first_pubkey.try_into().unwrap();

let second_pubkey_str = "gFcPVz9K6hrmZaIIxZCzUReAaslmoeG+iYgqgAjYIik=";
let second_pubkey_str = "hPehNW3wI5YdK5b4yeIM+t9zS5oBtGILLiltFUui1UA=";
let pod_second_pubkey = PodElGamalPubkey::from_str(second_pubkey_str).unwrap();
let second_pubkey: ElGamalPubkey = pod_second_pubkey.try_into().unwrap();

let third_pubkey_str = "BDq8H0zNhWN4a33SbBS9VeKkaPHH+XpEuOtQKmVoHhY=";
let third_pubkey_str = "hlACCsmVJVIZxa25qpKbjBO11wg/Tdtcz954OtHOWVw=";
let pod_third_pubkey = PodElGamalPubkey::from_str(third_pubkey_str).unwrap();
let third_pubkey: ElGamalPubkey = pod_third_pubkey.try_into().unwrap();

let grouped_ciphertext_lo_str = "iKQ6Z39F6m4aax7LZT6fOSj4zCVRtymxFoUHnZ5y3ypWwQDK5BwI0tB+T/D+GKe9xL2RLLCp3a0DFh6Wa3HUMQ5TGnwZSqpqvx4+G9LUVYhLsIJgkm9+ugn8W2xI7IsgtKVtI25e728L3RuNlVuPTFpo6JBpeQu6JVKLFlND+Cg=";
let grouped_ciphertext_lo_str = "ksKg6KXMBA9iFSh/PMqV9k03AGz5eigsm2+TT6RZplg2HCExsRJJQCpHbCu+ab7aj5hMEWhNLokKB2S2uEsnEF7w6HriN99/+vKbkGg7613d2+TzX8gxjeC6boZWtGFCqH00JXSvbZIjbvOPffhGy/Y7u/zh1r+aeDmuQRd7vmM=";
let pod_grouped_ciphertext_lo =
PodGroupedElGamalCiphertext3Handles::from_str(grouped_ciphertext_lo_str).unwrap();
let grouped_ciphertext_lo: GroupedElGamalCiphertext<3> =
pod_grouped_ciphertext_lo.try_into().unwrap();

let grouped_ciphertext_hi_str = "XIMFG7lp3lvF/6AhQPdnKiNITBBZFC18ldeZ8WcH9Hvan3Af1pmZKpCGYNmVq6o08rdp/GVLsousKle927xgJORqagQIJJRI9m3ycxsNnVNQp3xH6j2fFCTMGV1WRP4XJuS9DLkByIqDaKZzAJX1NiHCoQr32W9Pn+aHVo5d+Co=";
let grouped_ciphertext_hi_str = "DMNBOrDAamfntobNpK1EXJ/dSA44Qmhc5EeVcZTz/gQOnxO4GYRSpeiu7IwujAPPalnuaWkQYlzfS8b79OfNJRganJZYVQg4aU2Ul+OjKrETKdhCo7K3qFhMoJiZGJFKnHLFCGyDsCPyvc2FQopxjbaDjrVsmDTMEJPStpZZAH8=";
let pod_grouped_ciphertext_hi =
PodGroupedElGamalCiphertext3Handles::from_str(grouped_ciphertext_hi_str).unwrap();
let grouped_ciphertext_hi: GroupedElGamalCiphertext<3> =
pod_grouped_ciphertext_hi.try_into().unwrap();

let proof_str = "Xuc6mdJ9uwShYmmxOti6mkyYsL7sbvoAQGCZabm6e2wGeIPORDtsQt1s4lnEtPodoFGBOjw/GH7qNtwcTBewWnrvfRA7ZzYbb1kTO7NfCthxunu7YQ9S3kemdIJlYKM3aoYkJp7/vLm7FE6Tuhr128I9nYIUcrYoRIuDVSMeTHpMBaLkfKHJGI95IPiCBHWtE0KeNKZLWUpM/CFdELJECNDJ68dG169GKLANMQh8rxMIgHyasVuG/bP11JAvgAwF";
let proof_str = "tA4eOWOFFKF50h5vEGUdh7znZDV2KY/PJN8aFsqtyVuOvHoJQTyxMA8f1PTYa39rTkiVEYz3r2eV4Es8gvDMXCZdQoSc/mHE5QsPLT02ArpTSsFoZ1z4E9DZOxIuoqQ5EBc4Zy/brk2NWbpJua4FtPQB7fLHWIS/YgK7v6/cKlKhz64iyKeZxmNFKi12awd5s9vRGDGZvv0inoF+QoqgBB5PRTCR933/r4+Alkx340oFTQnZG7HABG4ora3i0KwK";
let pod_proof =
PodBatchedGroupedCiphertext3HandlesValidityProof::from_str(proof_str).unwrap();
let proof: BatchedGroupedCiphertext3HandlesValidityProof = pod_proof.try_into().unwrap();

let mut verifier_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

proof
.verify(
Expand Down
20 changes: 10 additions & 10 deletions zk-sdk/src/sigma_proofs/ciphertext_ciphertext_equality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ mod test {
.pubkey()
.encrypt_with(message, &second_opening);

let mut prover_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new(b"Test");
let mut prover_transcript = Transcript::new_zk_elgamal_transcript(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

let proof = CiphertextCiphertextEqualityProof::new(
&first_keypair,
Expand Down Expand Up @@ -359,8 +359,8 @@ mod test {
.pubkey()
.encrypt_with(second_message, &second_opening);

let mut prover_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new(b"Test");
let mut prover_transcript = Transcript::new_zk_elgamal_transcript(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

let proof = CiphertextCiphertextEqualityProof::new(
&first_keypair,
Expand Down Expand Up @@ -390,27 +390,27 @@ mod test {

#[test]
fn test_ciphertext_ciphertext_equality_proof_string() {
let first_pubkey_str = "XKhsxbC3XUsUTSUHeGYtPhT1pKzh+6d+Pg0uZdR3Ywo=";
let first_pubkey_str = "GIKnIiKI6A6BbzxToDRqzotS8CyzKZbQzvYMkk1WQjs=";
let pod_first_pubkey = PodElGamalPubkey::from_str(first_pubkey_str).unwrap();
let first_pubkey: ElGamalPubkey = pod_first_pubkey.try_into().unwrap();

let second_pubkey_str = "+pWhNz5/aD4ilMW51l/+pRky8quQp3LOwLidNG0sbw0=";
let second_pubkey_str = "Iph2rhdueZ+zu80qqol50HpCDSZUi8Dsnj5HgG1SLxo=";
let pod_second_pubkey = PodElGamalPubkey::from_str(second_pubkey_str).unwrap();
let second_pubkey: ElGamalPubkey = pod_second_pubkey.try_into().unwrap();

let first_ciphertext_str = "rFxGWbBfME9OPMbbM0+Rva6fHR36QSk7HBpaRigT/y+wQiuDcdvox90nDXBB6JItVzCz+1CcOJS8yGL0LEiuIg==";
let first_ciphertext_str = "JN53y4eNNDlLVT9/K1RaEmduNZGes/8tJYN9IxI6519cyvae5bOZEEGWeHmxaTRwV/84/yw54AdezYWIl1KDeg==";
let pod_first_ciphertext = PodElGamalCiphertext::from_str(first_ciphertext_str).unwrap();
let first_ciphertext: ElGamalCiphertext = pod_first_ciphertext.try_into().unwrap();

let second_ciphertext_str = "ZCfDdEUJpdGkoDKL6ykMAhR42HZldHXHs7CFS4mBiRFc4vGZr2I833MqKA+QBmoD/A+qZEQn/E7oTcHhUtywXA==";
let second_ciphertext_str = "Vl51YOwSgLntr5MKMV9pTeRYzfnaCinVc/P7MSzggGRO7kkmtm3mmwG+aRrb2jSrCrW/570S/5euiEVV7Lg0dQ==";
let pod_second_ciphertext = PodElGamalCiphertext::from_str(second_ciphertext_str).unwrap();
let second_ciphertext: ElGamalCiphertext = pod_second_ciphertext.try_into().unwrap();

let proof_str = "vGlON1XF9o0HGm6RKTiwzdcqv+Z9TloHeJdFHZfC7EZkk4b+BuoLckiYmKN8AirgrO3Lq2fStuXToPW1l9PbMB71G61bA2lM1jI2NdBc3N2cHgjPhsZh6Z2sUH9vg1cbtIquvawYevRFb4+cssT3HmNRW3bc2Tfrf0DpPIM/1g87+QrwziKG3OUqDVw+GK/p/SncS7b4aLOXMPVBhP5CCO3R/KVaeTzNz0WHljfUp7LPial2zTpRbic2dbUC1PgPAsqvnZzSEQQ3NM3IVCt5cEIF5xq/S4aDrolvKAjCZwM=";
let proof_str = "ij/fhClZeoguA0RvwPqbzU0Df3lqWwZgQdOLCiRmq2KA79t4/EOaHeWlXNugCRDC/SMdbVLt1k32Ko3P3BjNA7zXoI19g4ex61/UGL4+ScL9xpcsJRVheqFENxhbZjZ7CLRWXkYAl+UvVcvHjSuO2bVHPpuHBoBONlUt5rP5K2cxrg1sgH7wXvrV2cMEtZOqA9MQ0WYemEb2N9c77BycArJgGc/wlRu58VygHmbEuwbmWsrfc1xdpjb5LFSBuaoEeCvywXJmR7iL9JgfkIhvv//jvDCeK6BkqsfStocFrQQ=";
let pod_proof = PodCiphertextCiphertextEqualityProof::from_str(proof_str).unwrap();
let proof: CiphertextCiphertextEqualityProof = pod_proof.try_into().unwrap();

let mut verifier_transcript = Transcript::new(b"Test");
let mut verifier_transcript = Transcript::new_zk_elgamal_transcript(b"Test");

proof
.verify(
Expand Down
Loading
Loading