Skip to content

OneCryptoPkg Documentation#163

Open
Flickdm wants to merge 8 commits intomicrosoft:dev/openssl-3.0.15from
Flickdm:pr/documentation
Open

OneCryptoPkg Documentation#163
Flickdm wants to merge 8 commits intomicrosoft:dev/openssl-3.0.15from
Flickdm:pr/documentation

Conversation

@Flickdm
Copy link
Member

@Flickdm Flickdm commented Nov 7, 2025

Description

This PR is just documentation and can be merged in any order.

Each file here is another description of how OneCryptoPkg works and can be referenced during the review.

For any additional information request, this repo will be updated to add the additional documentation.

For details on how to complete these options and their meaning refer to CONTRIBUTING.md.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

N/A

Integration Instructions

N/A

Add comprehensive architecture documentation explaining the OneCrypto
dependency injection model and how it enables shared crypto binaries.
Add documentation for the CreateCryptoProtocol API and how platforms
use it to provide crypto services to the shared crypto binary.
Add platform integration guide explaining how to integrate OneCrypto
into UEFI platforms and configure the dependency injection.
Add main documentation index explaining the OneCrypto project and
providing links to detailed documentation files.
Add RNG security model documentation explaining how random number
generation is handled securely in the OneCrypto architecture.
@github-actions github-actions bot added impact:non-functional Does not have a functional impact type:documentation Improvements or additions to documentation labels Nov 7, 2025
@Flickdm Flickdm mentioned this pull request Nov 7, 2025
5 tasks
@@ -0,0 +1,309 @@
# OneCrypto RNG Security Model

This document describes the Random Number Generation (RNG) security model implemented across different UEFI execution phases, including the technic### Library Dependencies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text is messed up here technic###.


This approach was developed to solve critical boot hanging issues while maintaining security when possible.

## Technical Problem Solved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section seems out of place in the security model document. It's talking about an implementation issue that existed in the past.

…nsive document

- Combined Architectural.md and Architecture.md into Architecture.md
- Added X64-only platform warning at top
- Integrated platform integration section with FV placement diagrams
- Added platform and architecture considerations (X64 vs AArch64)
- Added troubleshooting section with common issues
- Added build process details
- Maintained well-organized structure from Architectural.md
- Preserved all mermaid diagrams and detailed runtime behavior
- Removed duplicate Architectural.md file
@makubacki
Copy link
Member

I recommend calling "OneCryptoBinMm" just "OneCryptoBin".

Platforms using OneCrypto must include the following components:

### 1. **OneCryptoMmBin** - Phase Independent Binary (REQUIRED)
- **Path**: `$(SHARED_SHARED_CRYPTO_PATH)/bin/shared/OneCryptoMmBin.inf`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest dropping SHARED_SHARED, that's confusing in itself but also now that "OneCrypto" is being used more often.


- **`OneCryptoMmBin/`**
- Main binary application that provides crypto services
- Links against OpensslPkg's BaseCryptLib and OpensslLib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: This should just be BaseCryptLib. How that instance is satisfied (whether with OpenSSL or something else) is beyond the scope of this module's details.

- Null implementation that returns errors for all functions
- Used when crypto is not available or during early boot phases

### CryptoBinPkg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what you've mentioned before, CryptoBinPkg is planned to be dropped so it should be removed from here.

### Key Benefits

1. **Simplified Updates**: Make it much easier to update crypto for many platforms and stay current with minimal validation
2. **Reduced Build Cost**: No need to download and compile OpenSSL for every platform build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd reduce directly referencing OpenSSL throughout the document since the design is intended to allow crypto providers to be swapped out.

Suggested change
2. **Reduced Build Cost**: No need to download and compile OpenSSL for every platform build
2. **Reduced Build Cost**: No need to download and compile a crypto provider like OpenSSL for every platform build

- Publishes `ONE_CRYPTO_PROTOCOL`

- **`Support/OneCryptoDxeLoader.inf`** and **`Support/OneCryptoLoaderMm.inf`**
- Library-style INF files for platform integration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are not actual libraries, then refrain from "library-style inf". My understanding is that the loader INF is just collecting the FFS sections for a module build.

- **`Library/BaseCryptCrtLibOneCrypto/`**
- CRT (C Runtime) library implementation using injected dependencies
- Stores `ONE_CRYPTO_DEPENDENCIES` pointer as static member
- Provides malloc, free, memcpy, etc. using dependency functions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Provides malloc, free, memcpy, etc. using dependency functions
- Provides malloc, free, memcpy, etc. using dynamically linked functions

- Routes to dependency-provided functions

**Build Output:**
- `OneCryptoMmBin.efi` - Standalone MM binary (~1.4 MB)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main role of OneCryptoMmBin, is to export functionality. I think simple descriptions like this should focus on that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also prevents conflict with descriptions like "Phase-independent, relocatable PE32 binary" in the list below describing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some information is repeated. Can you please check for places to reduce duplication to make the file easier to read through?

@mu-automation
Copy link
Contributor

mu-automation bot commented Jan 19, 2026

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@mu-automation mu-automation bot added the state:stale Has not been updated in a long time label Jan 19, 2026
@makubacki makubacki removed the state:stale Has not been updated in a long time label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants