Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
add comment on the Pod ElGamal type constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Aug 16, 2024
1 parent a7aeb97 commit 27d98a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/pod/src/optional_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,13 @@ mod tests {

const OPTIONAL_NONZERO_ELGAMAL_PUBKEY_LEN: usize = 32;

// Unfortunately, the `solana-zk-sdk` does not exporse a constructor interface
// Unfortunately, the `solana-zk-sdk` does not expose a constructor interface
// to construct `PodRistrettoPoint` from bytes. As a work-around, encode the
// bytes as base64 string and then convert the string to a
// `PodElGamalCiphertext`.
//
// The constructor will be added (and this function removed) with
// `solana-zk-sdk` 2.1.
fn elgamal_pubkey_from_bytes(bytes: &[u8]) -> PodElGamalPubkey {
let string = BASE64_STANDARD.encode(bytes);
std::str::FromStr::from_str(&string).unwrap()
Expand Down

0 comments on commit 27d98a8

Please sign in to comment.