From 2cc15410a30aab02ada38f85f2f03dcafc5770a7 Mon Sep 17 00:00:00 2001 From: Erin Abicht Date: Tue, 18 Apr 2023 07:19:16 -0400 Subject: [PATCH] More info --- src/SUMMARY.md | 2 +- src/development/README.md | 1 + src/development/design/filesystem.md | 6 +++++- src/development/design/kernel.md | 12 +++++++++++- src/development/design/security.md | 10 ++++++++++ 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 29134bb..4f6fe9e 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -6,7 +6,7 @@ - [Development](development/README.md) - [Understanding the Design Goals](development/design/README.md) - [Actor System]() - - [Security Features]() + - [Security Features](development/design/security.md) - [Microkernel](development/design/kernel.md) - [GUI]() - [Filesystem](development/design/filesystem.md) diff --git a/src/development/README.md b/src/development/README.md index bcb828c..6dc3e2b 100644 --- a/src/development/README.md +++ b/src/development/README.md @@ -44,6 +44,7 @@ A thorough series of steps might be: 3. Complete the [rustlings](https://github.com/rust-lang/rustlings) exercises 4. Take a quick look through the [Embedded Rust Book](https://docs.rust-embedded.org/book/intro/index.html) 5. Read the [RISC-V Guide](https://github.com/mikeroyal/RISC-V-Guide)/[RISC-V Bytes](https://danielmangum.com/categories/risc-v-bytes/) to learn more about the **RISC-V** architecture +6. Read the OSDev Wiki entries on [Microkernels](https://wiki.osdev.org/Microkernel) and [Message Passing](https://wiki.osdev.org/Message_Passing) Additionally you might want to learn about **Vulkan** if you're going to be hacking on the [GUI](/development/design/gui.md): 1. Go through the [Vulkan Tutorial (Rust)](https://kylemayes.github.io/vulkanalia/introduction.html) to learn some of the basics diff --git a/src/development/design/filesystem.md b/src/development/design/filesystem.md index 2a4c385..2b7ef05 100644 --- a/src/development/design/filesystem.md +++ b/src/development/design/filesystem.md @@ -62,7 +62,7 @@ The `kernel` then reads in bytes from the first partition *(as the **BOOT** part From here, as we have a fixed `CHUNK_SIZE`, and know how many chunks are in our first partition, we can read from any chunk on any partition now. On startup, an *Actor* can request to read data from the disk. If it has the right [capabilities](/development/design/actor.md#ocap), we find the chunk it's looking for[^find_chunk], parse the data (using `bincode` again), and send it back. -Also, we are able to verify data. Before passing off the data, we re-hash it using [ahash](https://lib.rs/crates/ahash) to see if it matches. +Also, we are able to verify data. Before passing off the data, we re-hash it using [HighwayHash](https://lib.rs/crates/highway) to see if it matches. If it does, we simply pass it along like normal. If not, we refuse, and send an error [message](/development/design/actor.md#messages). ### Writing @@ -77,6 +77,10 @@ Again, whether actors can: will be determined via [capabilities](/development/design/actor.md#ocap) +### To-Do +- Snapshots +- Isolation + [^encryption]: Specific details to be figured out later [^find_chunk]: Currently via magic. I have no idea how to do this other than a simple search. Maybe generate an index, or use a **UUID**? diff --git a/src/development/design/kernel.md b/src/development/design/kernel.md index 801332a..89b66d5 100644 --- a/src/development/design/kernel.md +++ b/src/development/design/kernel.md @@ -1,6 +1,6 @@ # Microkernel The core `kernel` of **Mercury** will be highly limited, implementing only necessary portions. -This allows other functionality to be delegated to other code. How this will be done is still to be figured out. +This allows other functionality to be simply run in userspace. Additionally, most code should be put into separate libraries then pulled into the `kernel` code. This will likely be done via `git submodules`. @@ -9,3 +9,13 @@ Initially, it will be built for `RISC-V`, then `ARM` *(focused on running in a [ Afterwards, we can put focus towards building out various features. Support for multiple targets will be done via `Cargo.toml` targets, cross-compilation, and [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html). + +## Boot Process +*To be implemented* + +## Memory Management +*To-Do* + +## Processes +*To-Do* +- [postcard](https://lib.rs/crates/postcard) for message passing diff --git a/src/development/design/security.md b/src/development/design/security.md index 8e9a41d..e9665fb 100644 --- a/src/development/design/security.md +++ b/src/development/design/security.md @@ -1 +1,11 @@ # Security Features +**Mercury** is designed with security in mind from the beginning. + +- First, we will be using [Orion](https://lib.rs/crates/orion) - a pure **Rust** crypto library. +- There is built in support for checksums and **AES** encryption in the [filesystem](/development/design/filesystem.md). +- **HMAC**[^hmac] will be used for message passing - which additionally allows for encrypted messages. +- [nanorand](https://lib.rs/crates/nanorand) RNG +- [HighwayHash](https://lib.rs/crates/highway) is used for checksums +- [Argon2id](https://lib.rs/crates/argon2) is used for key-derivation + +[^hmac]: https://cryptobook.nakov.com/mac-and-key-derivation