mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
add UX flow dedicated to the 'churn' operation
This commit is contained in:
parent
0a4702d6c3
commit
e40a109f6c
2 changed files with 18 additions and 2 deletions
|
|
@ -29,6 +29,12 @@
|
||||||
"zh": "⚠ PDDB 需要重新加密。⚠\n为了安全地执行此操作,您现在必须解锁所有秘密基地。 任何被锁定的基础都可以被覆盖。",
|
"zh": "⚠ PDDB 需要重新加密。⚠\n为了安全地执行此操作,您现在必须解锁所有秘密基地。 任何被锁定的基础都可以被覆盖。",
|
||||||
"en-tts": "⚠ PDDB needs to be keyed to this device. ⚠\nYou must enumerate all secret Bases now. Any Basis not disclosed could be overwritten."
|
"en-tts": "⚠ PDDB needs to be keyed to this device. ⚠\nYou must enumerate all secret Bases now. Any Basis not disclosed could be overwritten."
|
||||||
},
|
},
|
||||||
|
"pddb.churn.request": {
|
||||||
|
"en": "⚠ PDDB `churn` requested. ⚠\nYou must enumerate all secret Bases now. Any Basis not disclosed could be overwritten.",
|
||||||
|
"ja": "⚠ PDDBの「チャーン」が要求されました。 ⚠\nこれを安全に行うには、今すぐすべてのシークレットベースのロックを解除する必要があります。 ロックされたままのベーシスは上書きされる可能性があります。",
|
||||||
|
"zh": "⚠ 请求 PDDB `churn`。⚠\n为了安全地执行此操作,您现在必须解锁所有秘密基地。 任何被锁定的基础都可以被覆盖。",
|
||||||
|
"en-tts": "⚠ PDDB `churn` requested. ⚠\nYou must enumerate all secret Bases now. Any Basis not disclosed could be overwritten."
|
||||||
|
},
|
||||||
"pddb.freespace.enumerate": {
|
"pddb.freespace.enumerate": {
|
||||||
"en": "Enumerate a Basis?",
|
"en": "Enumerate a Basis?",
|
||||||
"ja": "根拠を開示しますか?",
|
"ja": "根拠を開示しますか?",
|
||||||
|
|
@ -71,6 +77,12 @@
|
||||||
"zh": "继续重新加密?",
|
"zh": "继续重新加密?",
|
||||||
"en-tts": "Enumeration finished.\n\nShall we proceed to rekeying?"
|
"en-tts": "Enumeration finished.\n\nShall we proceed to rekeying?"
|
||||||
},
|
},
|
||||||
|
"pddb.churn.finished": {
|
||||||
|
"en": "Enumeration finished.\n\nShall we proceed to churning? This process takes about 20 minutes.",
|
||||||
|
"ja": "列挙が終了しました。\n\n攪拌に進みましょうか? このプロセスには約20分かかります。",
|
||||||
|
"zh": "枚举完成。\n\n我们要继续搅拌吗? 这个过程大约需要 20 分钟。",
|
||||||
|
"en-tts": "Enumeration finished.\n\nShall we proceed to churning? This process takes about 20 minutes."
|
||||||
|
},
|
||||||
"pddb.okay": {
|
"pddb.okay": {
|
||||||
"en": "Okay",
|
"en": "Okay",
|
||||||
"ja": "OK",
|
"ja": "OK",
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ impl Deref for StaticCryptoData {
|
||||||
#[derive(Eq, PartialEq)]
|
#[derive(Eq, PartialEq)]
|
||||||
enum DnaMode {
|
enum DnaMode {
|
||||||
Normal,
|
Normal,
|
||||||
|
Churn,
|
||||||
Migration,
|
Migration,
|
||||||
}
|
}
|
||||||
#[derive(Zeroize)]
|
#[derive(Zeroize)]
|
||||||
|
|
@ -685,7 +686,7 @@ impl PddbOs {
|
||||||
aad.extend_from_slice(PDDB_FAST_SPACE_SYSTEM_BASIS.as_bytes());
|
aad.extend_from_slice(PDDB_FAST_SPACE_SYSTEM_BASIS.as_bytes());
|
||||||
aad.extend_from_slice(&PDDB_VERSION.to_le_bytes());
|
aad.extend_from_slice(&PDDB_VERSION.to_le_bytes());
|
||||||
match self.dna_mode {
|
match self.dna_mode {
|
||||||
DnaMode::Normal => aad.extend_from_slice(&self.dna.to_le_bytes()),
|
DnaMode::Normal | DnaMode::Churn => aad.extend_from_slice(&self.dna.to_le_bytes()),
|
||||||
DnaMode::Migration => aad.extend_from_slice(&self.migration_dna.to_le_bytes()),
|
DnaMode::Migration => aad.extend_from_slice(&self.migration_dna.to_le_bytes()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1237,7 +1238,7 @@ impl PddbOs {
|
||||||
aad.extend_from_slice(&name.as_bytes());
|
aad.extend_from_slice(&name.as_bytes());
|
||||||
aad.extend_from_slice(&PDDB_VERSION.to_le_bytes());
|
aad.extend_from_slice(&PDDB_VERSION.to_le_bytes());
|
||||||
match self.dna_mode {
|
match self.dna_mode {
|
||||||
DnaMode::Normal => aad.extend_from_slice(&self.dna.to_le_bytes()),
|
DnaMode::Normal | DnaMode::Churn => aad.extend_from_slice(&self.dna.to_le_bytes()),
|
||||||
DnaMode::Migration => aad.extend_from_slice(&self.migration_dna.to_le_bytes()),
|
DnaMode::Migration => aad.extend_from_slice(&self.migration_dna.to_le_bytes()),
|
||||||
}
|
}
|
||||||
aad
|
aad
|
||||||
|
|
@ -1854,6 +1855,7 @@ impl PddbOs {
|
||||||
log::info!("migrating from dna 0x{:x} -> 0x{:x}", self.migration_dna, self.dna);
|
log::info!("migrating from dna 0x{:x} -> 0x{:x}", self.migration_dna, self.dna);
|
||||||
self.fast_space_read(); // we hawe to re-read the FSCB, because it would have failed previously with lots of warnings
|
self.fast_space_read(); // we hawe to re-read the FSCB, because it would have failed previously with lots of warnings
|
||||||
},
|
},
|
||||||
|
PddbRekeyOp::Churn => self.dna_mode = DnaMode::Churn,
|
||||||
_ => (),
|
_ => (),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2113,6 +2115,7 @@ impl PddbOs {
|
||||||
match self.dna_mode {
|
match self.dna_mode {
|
||||||
DnaMode::Normal => t!("pddb.freespace.request", xous::LANG),
|
DnaMode::Normal => t!("pddb.freespace.request", xous::LANG),
|
||||||
DnaMode::Migration => t!("pddb.rekey.request", xous::LANG),
|
DnaMode::Migration => t!("pddb.rekey.request", xous::LANG),
|
||||||
|
DnaMode::Churn => t!("pddb.churn.request", xous::LANG),
|
||||||
},
|
},
|
||||||
None).ok();
|
None).ok();
|
||||||
self.tt.sleep_ms(SWAP_DELAY_MS).unwrap();
|
self.tt.sleep_ms(SWAP_DELAY_MS).unwrap();
|
||||||
|
|
@ -2194,6 +2197,7 @@ impl PddbOs {
|
||||||
match self.dna_mode {
|
match self.dna_mode {
|
||||||
DnaMode::Normal => t!("pddb.freespace.finished", xous::LANG),
|
DnaMode::Normal => t!("pddb.freespace.finished", xous::LANG),
|
||||||
DnaMode::Migration => t!("pddb.rekey.finished", xous::LANG),
|
DnaMode::Migration => t!("pddb.rekey.finished", xous::LANG),
|
||||||
|
DnaMode::Churn => t!("pddb.churn.finished", xous::LANG),
|
||||||
}) {
|
}) {
|
||||||
Some(ret)
|
Some(ret)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue