-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move api module and dependencies into trussed-core
- Loading branch information
1 parent
0beb6ef
commit 82d354e
Showing
13 changed files
with
441 additions
and
410 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,15 @@ | ||
pub const MAX_MESSAGE_LENGTH: usize = 1024; | ||
pub const MAX_MEDIUM_DATA_LENGTH: usize = 256; | ||
pub const MAX_SHORT_DATA_LENGTH: usize = 128; | ||
pub const MAX_SIGNATURE_LENGTH: usize = 512 * 2; | ||
// FIXME: Value from https://stackoverflow.com/questions/5403808/private-key-length-bytes for Rsa2048 Private key | ||
pub const MAX_KEY_MATERIAL_LENGTH: usize = 1160 * 2 + 72; | ||
pub const MAX_USER_ATTRIBUTE_LENGTH: usize = 256; | ||
|
||
// request size is chosen to not exceed the largest standard syscall, Decrypt, so that the Request | ||
// enum does not grow from this variant | ||
pub const SERDE_EXTENSION_REQUEST_LENGTH: usize = | ||
2 * MAX_MESSAGE_LENGTH + 2 * MAX_SHORT_DATA_LENGTH; | ||
// reply size is chosen to not exceed the largest standard syscall, Encrypt, so that the Reply enum | ||
// does not grow from this variant | ||
pub const SERDE_EXTENSION_REPLY_LENGTH: usize = MAX_MESSAGE_LENGTH + 2 * MAX_SHORT_DATA_LENGTH; |
File renamed without changes.
This file contains 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.