pub fn public_key_from_miracl(
    crypto_public_key: &crypto::PublicKeyWithPop,
) -> (FsEncryptionPublicKey, FsEncryptionPop) {
    let public_key_bytes = {
        let g1 = miracl_g1_to_bytes(&crypto_public_key.key_value);
        FsEncryptionPublicKey(g1)
    };
    let pop_bytes = {
        let pop_key = miracl_g1_to_bytes(&crypto_public_key.proof_data.pop_key);
        let challenge = miracl_fr_to_bytes(&crypto_public_key.proof_data.challenge);
        let response = miracl_fr_to_bytes(&crypto_public_key.proof_data.response);
        FsEncryptionPop {
            pop_key,
            challenge,
            response,
        }
    };
    (public_key_bytes, pop_bytes)
}
/// Serialises a miracl public key to standard form public key + pop
Serialises a miracl public key to standard form public key + pop
Serialises a miracl public key to standard form public key + pop
pub fn public_key_from_miracl(
    crypto_public_key: &crypto::PublicKeyWithPop,
) -> (FsEncryptionPublicKey, FsEncryptionPop) {
    let public_key_bytes = {
        let g1 = miracl_g1_to_bytes(&crypto_public_key.key_value);
        FsEncryptionPublicKey(g1)
    };
    let pop_bytes = {
        let pop_key = miracl_g1_to_bytes(&crypto_public_key.proof_data.pop_key);
        let challenge = miracl_fr_to_bytes(&crypto_public_key.proof_data.challenge);
        let response = miracl_fr_to_bytes(&crypto_public_key.proof_data.response);
        FsEncryptionPop {
            pop_key,
            challenge,
            response,
        }
    };
    (public_key_bytes, pop_bytes)
}
pub fn public_key_from_miracl ( crypto_public_key : & crypto :: PublicKeyWithPop , ) -> ( FsEncryptionPublicKey , FsEncryptionPop ) { let public_key_bytes = { let g1 = miracl_g1_to_bytes ( & crypto_public_key . key_value ) ; FsEncryptionPublicKey ( g1 ) } ; let pop_bytes = { let pop_key = miracl_g1_to_bytes ( & crypto_public_key . proof_data . pop_key ) ; let challenge = miracl_fr_to_bytes ( & crypto_public_key . proof_data . challenge ) ; let response = miracl_fr_to_bytes ( & crypto_public_key . proof_data . response ) ; FsEncryptionPop { pop_key , challenge , response , } } ; ( public_key_bytes , pop_bytes ) }
Serialises a miracl public key to standard form public key + pop
Serialises a miracl public key to standard form public key + pop
crypto_public_key
&crypto::PublicKeyWithPop
crypto_public_key
&crypto::PublicKeyWithPop