-
Notifications
You must be signed in to change notification settings - Fork 33
Encapsulation and ECIES (v2) #222
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
Merged
athoelke
merged 19 commits into
ARM-software:main
from
athoelke:crypto-encapsulation-ecies
Nov 4, 2024
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
43bdb83
Addition of key encapsulation API
athoelke f929cae
typo
athoelke 597699d
Terminology alignment:
athoelke cbe0894
Clarify explicit/implicit decapsulation failure:
athoelke b5840cd
Reallocate the algorithm category for key-encapsulation
athoelke 387f6ac
Use 'ciphertext' instead of 'encapsulation data'
athoelke 7e5b410
Consistent hyphenation of "key-establishment xxx"
athoelke a1faff3
Dehyphenate pseduorandom, and qualify as 'uniformly' when appropriate
athoelke 742cedb
Be clear about key sizes being in bits
athoelke c894eae
Add missing error status codes
athoelke e8cc973
Terminology: use 'shared secret key' consistently
athoelke 37e3986
Clarifying the particpants in a KEM
athoelke 4803420
Clarified the security of ECIES authentication
athoelke 3cec851
Improved description of potential for mismatched KEM key values
athoelke 680933f
Improve wording in encapsulation usage flags
athoelke be852a7
More missing error status codes
athoelke ec3e511
Fixup: missed some of the ciphertext-related changes
athoelke ac0282a
Suggestion: use USAGE_ENCRYPT/DECRYPT instead of adding USAGE_ENCAPSU…
athoelke e99d9e0
Improve description of key encapsulation
athoelke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| .. SPDX-FileCopyrightText: Copyright 2018-2023 Arm Limited and/or its affiliates <[email protected]> | ||
| .. SPDX-FileCopyrightText: Copyright 2018-2024 Arm Limited and/or its affiliates <[email protected]> | ||
| .. SPDX-License-Identifier: CC-BY-SA-4.0 AND LicenseRef-Patent-license | ||
|
|
||
| .. header:: psa/crypto | ||
|
|
@@ -86,7 +86,16 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`. | |
| * The extractable flag `PSA_KEY_USAGE_EXPORT` determines whether the key material can be extracted from the cryptoprocessor, or copied outside of its current security boundary. | ||
| * The copyable flag `PSA_KEY_USAGE_COPY` determines whether the key material can be copied into a new key, which can have a different lifetime or a more restrictive policy. | ||
| * The cacheable flag `PSA_KEY_USAGE_CACHE` determines whether the implementation is permitted to retain non-essential copies of the key material in RAM. This policy only applies to persistent keys. See also :secref:`key-material`. | ||
| * The other usage flags, for example, `PSA_KEY_USAGE_ENCRYPT` and `PSA_KEY_USAGE_SIGN_MESSAGE`, determine whether the corresponding operation is permitted on the key. | ||
| * The following usage flags determine whether the corresponding operations are permitted with the key: | ||
|
|
||
| - `PSA_KEY_USAGE_ENCRYPT` | ||
| - `PSA_KEY_USAGE_DECRYPT` | ||
| - `PSA_KEY_USAGE_SIGN_MESSAGE` | ||
| - `PSA_KEY_USAGE_VERIFY_MESSAGE` | ||
| - `PSA_KEY_USAGE_SIGN_HASH` | ||
| - `PSA_KEY_USAGE_VERIFY_HASH` | ||
| - `PSA_KEY_USAGE_DERIVE` | ||
| - `PSA_KEY_USAGE_VERIFY_DERIVATION` | ||
|
|
||
| .. typedef:: uint32_t psa_key_usage_t | ||
|
|
||
|
|
@@ -142,31 +151,33 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`. | |
| :definition: ((psa_key_usage_t)0x00000100) | ||
|
|
||
| .. summary:: | ||
| Permission to encrypt a message with the key. | ||
| Permission to encrypt a message, or perform key encapsulation, with the key. | ||
|
|
||
| This flag is required to use the key in a symmetric encryption operation, in an AEAD encryption-and-authentication operation, or in an asymmetric encryption operation. The flag must be present on keys used with the following APIs: | ||
| This flag is required to use the key in a symmetric encryption operation, in an AEAD encryption-and-authentication operation, in an asymmetric encryption operation, or in a key-encapsulation operation. The flag must be present on keys used with the following APIs: | ||
|
|
||
| * `psa_cipher_encrypt()` | ||
| * `psa_cipher_encrypt_setup()` | ||
| * `psa_aead_encrypt()` | ||
| * `psa_aead_encrypt_setup()` | ||
| * `psa_asymmetric_encrypt()` | ||
| * `psa_encapsulate()` | ||
|
|
||
| For a key pair, this concerns the public key. | ||
|
|
||
| .. macro:: PSA_KEY_USAGE_DECRYPT | ||
| :definition: ((psa_key_usage_t)0x00000200) | ||
|
|
||
| .. summary:: | ||
| Permission to decrypt a message with the key. | ||
| Permission to decrypt a message, or perform key decapsulation, with the key. | ||
|
|
||
| This flag is required to use the key in a symmetric decryption operation, in an AEAD decryption-and-verification operation, or in an asymmetric decryption operation. The flag must be present on keys used with the following APIs: | ||
| This flag is required to use the key in a symmetric decryption operation, in an AEAD decryption-and-verification operation, in an asymmetric decryption operation, or in a key-decapsulation operation. The flag must be present on keys used with the following APIs: | ||
|
|
||
| * `psa_cipher_decrypt()` | ||
| * `psa_cipher_decrypt_setup()` | ||
| * `psa_aead_decrypt()` | ||
| * `psa_aead_decrypt_setup()` | ||
| * `psa_asymmetric_decrypt()` | ||
| * `psa_decapsulate()` | ||
|
|
||
| For a key pair, this concerns the private key. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,6 @@ Cryptographic operation reference | |
| signature | ||
| pk-encryption | ||
| key-agreement | ||
| key-encapsulation | ||
| pake | ||
| rng | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.