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

Keystore signing done #1737

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 87 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions sdk/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ bech32 = "0.9"
itertools = "0.13.0"
pem = "3.0.2"
log = "0.4.17"
scrypt = "0.11"
aes = "0.8"
ctr = "0.9.2"
35 changes: 35 additions & 0 deletions sdk/core/src/data/keystore.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct CryptoParams {
pub iv: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct KdfParams {
pub dklen: u32,
pub salt: String,
pub n: u32,
pub r: u32,
pub p: u32,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Crypto {
pub ciphertext: String,
pub cipherparams: CryptoParams,
pub cipher: String,
pub kdf: String,
pub kdfparams: KdfParams,
pub mac: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Keystore {
pub version: u32,
pub kind: String,
pub id: String,
pub address: String,
pub bech32: String,
pub crypto: Crypto,
}
1 change: 1 addition & 0 deletions sdk/core/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pub mod account_storage;
pub mod address;
pub mod esdt;
pub mod hyperblock;
pub mod keystore;
pub mod network_config;
pub mod network_economics;
pub mod network_status;
Expand Down
Loading
Loading