mirror of
https://github.com/Sunscreen-tech/Sunscreen.git
synced 2026-04-19 03:00:06 -04:00
removed serialization of sealdata, instead created serializedsealdata struct which contains debugger info about cipher/plaintexts
This commit is contained in:
15
sunscreen_runtime/src/debugger/data.rs
Normal file
15
sunscreen_runtime/src/debugger/data.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct SerializedSealData {
|
||||
value: i64,
|
||||
data_type: SunscreenTypes,
|
||||
noise_budget: f64,
|
||||
coefficients: Vec<u64>,
|
||||
multiplicative_depth: u64
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub enum SunscreenTypes {
|
||||
|
||||
}
|
||||
@@ -111,7 +111,7 @@ pub async fn get_fhe_node_data(
|
||||
SealData::Ciphertext(ct) => {
|
||||
let runtime = Runtime::new_fhe(&curr_session.private_key.0.params).unwrap();
|
||||
|
||||
runtime.decrypt()
|
||||
runtime.decrypt(ct, &curr_session.private_key)
|
||||
},
|
||||
SealData::Plaintext(pt) => pt
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@ impl InnerPlaintext {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
#[derive(Clone)]
|
||||
/**
|
||||
* A type that can be either a SEAL plaintext or a ciphertext.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user