-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add share encryption [skip-line-limit] #1114
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bd4f54b
feat: add share encryption (merge commits)
hmzakhalid 16ef3d0
chore: formatting
hmzakhalid ef1b9b5
chore: trigger CI
hmzakhalid d4be5d3
chore: update max document payload size
hmzakhalid 4c7a3c0
feat: add document chunking
hmzakhalid 0b2de3e
feat: inject params during init
hmzakhalid 96acb34
chore: formatting
hmzakhalid c61c80d
chore: remove duplicate comments
hmzakhalid 7a6506c
chore: remove duplicate comments
hmzakhalid 47ba25f
chore: add external marking and info comments
hmzakhalid 4e70a98
Merge branch 'main' into feat/share-encryption
hmzakhalid de0d8c8
fix: extract shares
hmzakhalid c623ce0
chore: remove option
hmzakhalid 30b8010
chore: revert chunking
hmzakhalid aa55989
Merge branch 'main' into feat/share-encryption
hmzakhalid 0b84ea0
Update crates/events/src/enclave_event/threshold_share_created.rs
hmzakhalid 0db7342
Merge branch 'main' into feat/share-encryption
hmzakhalid 195d589
Merge branch 'main' into feat/share-encryption
hmzakhalid 195a891
Merge branch 'main' into feat/share-encryption
hmzakhalid 999d5ac
feat: move spliting to threshold keyshare
hmzakhalid 9c5aea8
fix: make event buffer key a composite
hmzakhalid c3a4405
feat: add bookend events
hmzakhalid 4aba96e
chore: formatting
hmzakhalid 3349109
fix: add E3 Completed to Threshold keyshare
hmzakhalid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
crates/events/src/enclave_event/encryption_key_collection_failed.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
| // | ||
| // This file is provided WITHOUT ANY WARRANTY; | ||
| // without even the implied warranty of MERCHANTABILITY | ||
| // or FITNESS FOR A PARTICULAR PURPOSE. | ||
|
|
||
| use crate::E3id; | ||
| use actix::Message; | ||
| use serde::{Deserialize, Serialize}; | ||
| use std::fmt::{self, Display}; | ||
|
|
||
| #[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] | ||
| #[rtype(result = "()")] | ||
| pub struct EncryptionKeyCollectionFailed { | ||
| pub e3_id: E3id, | ||
| pub reason: String, | ||
| pub missing_parties: Vec<u64>, | ||
| } | ||
|
|
||
| impl Display for EncryptionKeyCollectionFailed { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| write!(f, "{:?}", self) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
| // | ||
| // This file is provided WITHOUT ANY WARRANTY; | ||
| // without even the implied warranty of MERCHANTABILITY | ||
| // or FITNESS FOR A PARTICULAR PURPOSE. | ||
|
|
||
| use crate::E3id; | ||
| use actix::Message; | ||
| use derivative::Derivative; | ||
| use e3_utils::utility_types::ArcBytes; | ||
| use serde::{Deserialize, Serialize}; | ||
| use std::{ | ||
| fmt::{self, Display}, | ||
| sync::Arc, | ||
| }; | ||
|
|
||
| #[derive(Derivative, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] | ||
| #[derivative(Debug)] | ||
| pub struct EncryptionKey { | ||
| pub party_id: u64, | ||
| #[derivative(Debug(format_with = "e3_utils::formatters::hexf"))] | ||
| pub pk_bfv: ArcBytes, | ||
| } | ||
|
|
||
| #[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] | ||
| #[rtype(result = "()")] | ||
| pub struct EncryptionKeyCreated { | ||
| pub e3_id: E3id, | ||
| pub key: Arc<EncryptionKey>, | ||
| pub external: bool, | ||
| } | ||
|
|
||
| impl Display for EncryptionKeyCreated { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| write!(f, "{:?}", self) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
crates/events/src/enclave_event/threshold_share_collection_failed.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
| // | ||
| // This file is provided WITHOUT ANY WARRANTY; | ||
| // without even the implied warranty of MERCHANTABILITY | ||
| // or FITNESS FOR A PARTICULAR PURPOSE. | ||
|
|
||
| use crate::E3id; | ||
| use actix::Message; | ||
| use serde::{Deserialize, Serialize}; | ||
| use std::fmt::{self, Display}; | ||
|
|
||
| #[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] | ||
| #[rtype(result = "()")] | ||
| pub struct ThresholdShareCollectionFailed { | ||
| pub e3_id: E3id, | ||
| pub reason: String, | ||
| pub missing_parties: Vec<u64>, | ||
| } | ||
|
|
||
| impl Display for ThresholdShareCollectionFailed { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| write!(f, "{:?}", self) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.