Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evm event should add FHE params #61

Closed
ryardley opened this issue Sep 13, 2024 · 4 comments
Closed

Evm event should add FHE params #61

ryardley opened this issue Sep 13, 2024 · 4 comments
Labels
Ciphernode Related to the ciphernode package enhancement New feature or request evm Related to the EVM package

Comments

@ryardley
Copy link
Contributor

In the Ciphernode Poc the CommitteeSelected event looks like the following:

pub struct CommitteeRequested {
    pub e3_id: E3id,
    pub nodecount: usize,
    pub threshold: usize,
    pub sortition_seed: u64, // Should actually be much larger eg [u8;32]

    // fhe params
    pub moduli: Vec<u64>,
    pub degree: usize,
    pub plaintext_modulus: u64,
    pub crp: Vec<u8>,
}

We can get away with hard coding for demo but should try to aim for parity with evm.

@ryardley ryardley added evm Related to the EVM package Ciphernode Related to the ciphernode package enhancement New feature or request labels Sep 13, 2024
@auryn-macmillan
Copy link
Member

auryn-macmillan commented Sep 19, 2024

@hmzakhalid, how are we handling this for the RiscZero prototype?
Are you just decoding the FHE params from the e3PragramParams emitted in the Encalve.e3Requested() event?

Wondering how best to generalize this.

What I'm thinking is that perhaps we add an extra parameter to that event to define which encryption scheme is being used. This way, we can concretely know how to decode the e3ProgramParams based on which encryption scheme was selected, and we can just always assume that the FHE params are encoded at the start of the E3PragramParams.

@auryn-macmillan
Copy link
Member

Had a first crack at this in #101

@hmzakhalid
Copy link
Member

@hmzakhalid, how are we handling this for the RiscZero prototype? Are you just decoding the FHE params from the e3PragramParams emitted in the Encalve.e3Requested() event?

Yes I'm using the params emitted by e3Requested() and passing that onto the Risc0 guest code.

@ryardley
Copy link
Contributor Author

ryardley commented Oct 1, 2024

This has been closed by #117 and #119

@ryardley ryardley closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ciphernode Related to the ciphernode package enhancement New feature or request evm Related to the EVM package
Projects
None yet
Development

No branches or pull requests

3 participants