Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DRAFT: Support for key wrapping#215

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
athoelke wants to merge11 commits intoARM-software:main
base:main
Choose a base branch
Loading
fromathoelke:crypto-key-wrapping

Conversation

@athoelke
Copy link
Contributor

@athoelkeathoelke commentedSep 10, 2024
edited
Loading

[Added 24/10/24] Superseded by#224 - which provides just the simplified key wrapping and unwrapping functionality. The wrapped-key format support will be represented in a later PR.


Building on the key formats in#207, this PR defines an API for wrapping and unwrapping keys.

The first attempt explores an approach which extends thepsa_import_formatted_key() andpsa_export_formatted_key() APIs, and adds a key wrapping key and algorithm to the process. The idea is that it could support wrapping keys using a general key-wrapping algorithm (such as AES-KW) with existing clear-text key formats, and wrapping keys in wrapped-key data formats, such asEncryptedPrivateKeyInfo.

I am publishing this as an initial draft to provoke discussion around the challenges and undecided issues with this approach, including the policy integration issue that affects import of formatted keys.

The first commit specific to this PR (not in#207) is192eb55

Fixes#50.

* Decided to do public key export via a dedicated function* Removed ECPoint as a format* Required public keys in key pair formats* Added options for domain parameters* Individual boolean options override defaults instead of providing both option elements* Added references for everything* Defined new terms for ASN.1, DER and PEM
* Open issue regarding handling of encoded policy in key data
@athoelkeathoelke added enhancementNew feature or request API designRelated the design of the API Crypto APIIssue or PR related to the Cryptography API DO NOT MERGE labelsSep 10, 2024
@athoelke
Copy link
ContributorAuthor

This approach does not handle non-standard approaches for wrapping keys: e.g. using an application-specific format for key meta-data with a standard AEAD algorithm. Ideas for handling such scenarios:

  1. Left to the application: export the key data and drive AEAD from the application. This has the key material in plaintext (for a time) in the application memory.
  2. Handled as a custom wrapped-key format: the implementation has to provide built-in support for the application design.
  3. Use a different (or additional) Crypto API design. For example, add an input function to an AEAD multi-part operation that updates the operation with a formatted key.

@athoelke
Copy link
ContributorAuthor

I think we need to identify a representative set of use cases to cover the important ways in which the API needs to support key wrapping. And ensure we consider agility for future key types (PAKE, PQC, etc.) as part of the process.

It may be that we need more than one API to handle standard wrapped-key formats that are self-describing (in terms of wrapping algorithm(s)); general purpose key wrapping algorithms (typically specialized AEAD algorithms); and applications that use AEAD algorithms to create non-standard key-wrapping schemes.

@athoelke
Copy link
ContributorAuthor

athoelke commentedOct 9, 2024
edited
Loading

I'm thinking about a change of plan here. Seemy comment in Issue#50.

@athoelkeathoelke mentioned this pull requestOct 24, 2024
3 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

API designRelated the design of the APICrypto APIIssue or PR related to the Cryptography APIDO NOT MERGEenhancementNew feature or request

Projects

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add APIs to support wrapped keys

1 participant

@athoelke

[8]ページ先頭

©2009-2025 Movatter.jp