Commit graph

850 commits

Author SHA1 Message Date
Gilles Peskine
5feac959a5 Correct and clarify discussion of AES-CMAC-PRF-128
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-12 19:20:45 +01:00
Gilles Peskine
0308d79a34 Fix some MAC-related function names
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-12 19:20:30 +01:00
Ryan Everett
177a45f556 Small clarifications in documentation
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-07 11:24:30 +00:00
Manuel Pégourié-Gonnard
b8c4254f44 Update cipher light -> block cipher definition
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-12-07 12:12:39 +01:00
Ryan Everett
204c852442 Move psa-thread-safety.md
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-07 11:05:37 +00:00
Ryan Everett
1e9733c6a8 Add graph
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-07 11:05:37 +00:00
Ryan Everett
9f06681cb4 Update psa-thread-safety.md
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-07 11:05:37 +00:00
Manuel Pégourié-Gonnard
303121eb16 Fix a typo
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-12-07 12:05:07 +01:00
Valerio Setti
acd7bafcbb driver-only-build: update AEADs section
Note: this section shouldn't actually be updated in #8357, but
rather in #8358 which is the wrapup related to cipher and AEADs
accelaration. As a consequence we start the AEAD section with
a disclaimer explaining that the information written there will
be updated soon by a follow up PR.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-06 15:17:12 +01:00
Gilles Peskine
9f55e8e442 Add a section about ALT implementations
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-05 22:21:09 +01:00
Gilles Peskine
e5044a0eb2 Add a generic section about key management
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:19 +01:00
Gilles Peskine
32dfaf485c More information about output buffer sizes
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:19 +01:00
Gilles Peskine
76bc64e101 Diffie-Hellman: several clarifications and corrections
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:19 +01:00
Gilles Peskine
d921391bf4 Note a few things about PAKE (thanks Manuel)
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:19 +01:00
Gilles Peskine
5eeca33749 Use "workflow" rather than "flow" for clarity
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:19 +01:00
Gilles Peskine
06002c5624 typos and minor clarifications
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:19 +01:00
Gilles Peskine
2fffc45feb fixup! Correct function names prefixes where they diverge from module names
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-04 23:17:16 +01:00
Valerio Setti
20e93a2a9d driver-only-builds: update documentation for AEADs
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-04 15:24:25 +01:00
Gilles Peskine
1097d4e731 Minor clarification
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 21:18:10 +01:00
Gilles Peskine
c3fd0958ce typo
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 21:18:04 +01:00
Gilles Peskine
02112cc9a1 Update PBKDF2 availability for 3.5
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 21:17:55 +01:00
Gilles Peskine
3ea22dcb51 Correct function names prefixes where they diverge from module names
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 21:07:24 +01:00
Gilles Peskine
dbcfc7dd95 Be more informative about "No change"
Distinguish between interfaces that won't change in 4.0, and interfaces that
have no PSA equivalent but are likely to change in 4.0.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 21:04:06 +01:00
Gilles Peskine
d79854b3f7 That's not what mbedtls_ecdh_get_params does
Keep the discussion of how to retrieve information about a key exchange.
This doesn't seem to have equivalent legacy ECDH APIs.

Add a todo item for mbedtls_ecdh_get_params(). At this point I don't know
where it fits.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 14:01:59 +01:00
Gilles Peskine
f7746bdd79 Correct lists of sign/verify functions
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 14:01:44 +01:00
Gilles Peskine
951cf39b3f Corrections and clarifications around asymmetric key formats
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 14:01:20 +01:00
Gilles Peskine
4d234f1ede Editorial corrections
Fix typos, copypasta, and other minor clarifications.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 13:59:49 +01:00
Gilles Peskine
396a2a3dcb Explain interruptible operations
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-30 11:02:06 +01:00
Gilles Peskine
d96aa1b5cd Say who to contact
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-29 21:13:02 +01:00
Gilles Peskine
dfe6707fc7 Fix typos and make minor style improvements
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-29 21:12:39 +01:00
Gilles Peskine
d372da6201 Expand on the removal of RNG boilerplate
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-28 18:03:53 +01:00
Gilles Peskine
601d3a0bd7 Add links to newly added functions
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-28 18:03:16 +01:00
Gilles Peskine
5403cb340a typos
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-28 18:03:03 +01:00
Gilles Peskine
677285a299 Clarify "functions that facilitate the transition"
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-28 16:45:50 +01:00
Gilles Peskine
7ee4cc302a Create legacy-API bridge API design document
Do the analysis for hashes.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-11-28 16:08:26 +01:00
Dave Rodgman
16799db69a update headers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-02 19:47:20 +00:00
Tom Cosgrove
6dcb63bc6d Fix broken link to psa-driver-example-and-guide in psa-driver-wrappers-codegen-migration-guide.md
Fixes #8453

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-10-31 15:39:25 +00:00
Manuel Pégourié-Gonnard
4823d2c94e Extend design discussion
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-26 12:56:39 +02:00
Janos Follath
a365efc6f1 Threading design: fix internal links
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-26 10:22:55 +01:00
Manuel Pégourié-Gonnard
6b3643117b Document chosen goals and priorities for 3.x
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-26 11:02:17 +02:00
Manuel Pégourié-Gonnard
3bcda449c0 Things forgotten in the previous commit
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-26 10:03:49 +02:00
Janos Follath
54bd71b40f Update operation threading strategy
The library does not need to provide protection, leave it to the crypto
service.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-23 10:30:50 +01:00
Janos Follath
e604269a59 Threading Design: emphasise performance requirement
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-23 10:16:58 +01:00
Janos Follath
23f7e41633
Threading design: improve language
Co-authored-by: Paul Elliott <62069445+paul-elliott-arm@users.noreply.github.com>
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-23 10:11:18 +01:00
Janos Follath
49d467c37d Threading design: update and clarify 3.6 plan
- Separation of attr and slot state is added
- Driver support is cut back

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 15:41:40 +01:00
Janos Follath
de0e3e352d Threading design: Update empty slot tracking
Using a dedicated field allows clean separatin between key attributes
and slot state. This allows us to use the same mechanics for attributes
and key content. Which in turn means lower code size and easier
maintenance.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 15:12:42 +01:00
Janos Follath
52586895f7 Clarify threading design document structure
Separate design analysis from plans and make the distinction clear
between what is implemented, what is planned to be implemented soon,
what is planned to be implemented in the future, and what is ideas that
are rejected.

(The distinction between the last two categories doesn't have to be
clear, we can't and shouldn't plan that far ahead.)

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 14:26:57 +01:00
Janos Follath
19192a5158 Clarify reentrancy requirements for drivers
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-20 13:16:48 +01:00
Janos Follath
d7a39ae21e Add plan for 3.6 to threading design
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-17 14:34:26 +01:00
Janos Follath
574100bb0d Add clarifications to thread safety design
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-17 12:50:28 +01:00
Janos Follath
811a954383 Add reentrancy section to thread safety design
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-17 12:50:21 +01:00
Manuel Pégourié-Gonnard
f1878d8974 Update to only serve GCM and CCM
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-12 11:19:00 +02:00
Janos Follath
28b4da954b Add PSA threading design
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-10-10 15:15:55 +01:00
Manuel Pégourié-Gonnard
301d2a29a7 Update to MD light section
Mostly to reflect this has been implemented, and remove references to
temporary remains from the previous strategy (hash_info, legacy_or_psa)
which would probably be more confusing than helpful at this point.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-10 10:04:07 +02:00
Manuel Pégourié-Gonnard
2daee0410e Update list of modules using hashes
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-10 10:04:07 +02:00
Manuel Pégourié-Gonnard
ca18b7747e Update definition of Cipher light
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-10 10:04:07 +02:00
Manuel Pégourié-Gonnard
839d3580bd Update details of modules using cipher operations
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-10-10 09:22:59 +02:00
Gilles Peskine
32743619a2
Merge pull request #8114 from yanesca/threading_requirements_update
Refine thread safety requirements
2023-10-09 11:22:59 +00:00
Manuel Pégourié-Gonnard
8c40f3dfad Formatting fixes
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 11:06:09 +02:00
Manuel Pégourié-Gonnard
140c08e325 Minor clarifications.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 11:02:37 +02:00
Manuel Pégourié-Gonnard
89ae266e5a Update docs/driver-only-builds.md
Latest changes:
- logic about the relationship between curves, key types and algs (8075)
- building without bignum is no longer "coming soon", it's there :)

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 08:53:05 +02:00
Manuel Pégourié-Gonnard
dfa42b34ab Improve documentation about driver-only p256-m.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 08:53:05 +02:00
Manuel Pégourié-Gonnard
789000b2be Update list of p256-m entry points
There was a bit of a race condition between #8041 which introduced the
new entry points, and #8203 which documented the list of entry points.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28 08:51:51 +02:00
Dave Rodgman
0fc86b2ddf
Merge pull request #8075 from valeriosetti/issue8016
driver-only ECC: curve acceleration macros
2023-09-27 14:39:02 +00:00
Manuel Pégourié-Gonnard
f7dc6cfef1 Document limitation on "mixed" builds
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-27 10:34:52 +02:00
Xiaokang Qian
db3035b8bc Fix a typo in psa-crypto-implementation-structure.md
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
76e55a20dd Change the documenti about psa_crypto_driver_wrappers.c{h}
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
1198e43644 Change the description of auto-generated driver dispatch files
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
845693c513 Change comments to psa_crypto_driver_wrappers.h
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Manuel Pégourié-Gonnard
030f11b0b1 Type fixes and wording improvements
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-24 09:48:47 +02:00
Manuel Pégourié-Gonnard
1f61b7b8ea Document driver-only hashes
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-24 09:48:46 +02:00
Gilles Peskine
efaee9a299 Give a production-sounding name to the p256m option
Now that p256-m is officially a production feature and not just an example,
give it a more suitable name.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-20 20:49:47 +02:00
Gilles Peskine
452beb9076
Merge pull request #8203 from gilles-peskine-arm/p256-m-production
Declare p256-m as ready for production
2023-09-20 09:36:05 +00:00
Paul Elliott
3d0bffb257 Improve statement in driver-only-builds.md
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-09-13 15:15:37 +01:00
Gilles Peskine
6f784dff49 Reflect the fact p256-m has been integrated into Mbed TLS
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-13 15:32:30 +02:00
Valerio Setti
7373a6644d driver-only-builds.md: fix text
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-09-04 16:16:11 +02:00
Janos Follath
b4527fbd82 Add clarifications to the threading requirements
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-31 14:01:24 +01:00
Janos Follath
b6954730f0
Fix typo
Co-authored-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-31 13:54:21 +01:00
Janos Follath
35633dd977 Add threading non-requirement
State explicitly the non-requirement that it's ok for psa_destroy_key to
block waiting for a driver.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-31 08:31:19 +01:00
Janos Follath
15d9ec29be Improve thread safety presentation
- Use unique section titles so that there are unique anchors
- Make list style consistent between similar sections

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-31 08:22:21 +01:00
Janos Follath
0385c2815c Tighten thread safety requirements
We shouldn't violate the requirement that the key identifier can be
reused. In practice, a key manager may destroy a key that's in use by
another process, and the privileged world containing the key manager and
the crypto service should not be perturbed by an unprivileged process.

With respect to blocking, again, a key manager should not be blocked
indefinitely by an unprivileged application.

These are desirable properties even in the short term.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-30 16:44:04 +01:00
Janos Follath
7ec993d804 Refine thread safety requirements
Split and refine short term requirements for key deletion.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-23 16:04:48 +01:00
Valerio Setti
d31b28485b driver-only-builds: update EC and FFDH sections
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-17 12:36:40 +02:00
Manuel Pégourié-Gonnard
36cd3f9f8e Add tentative definition of Cipher light
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-08-11 10:06:42 +02:00
Manuel Pégourié-Gonnard
948137be59 Add details on use of ciphers from other modules
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-08-10 16:58:30 +02:00
Gilles Peskine
33291ba35f
Merge pull request #5538 from gilles-peskine-arm/psa-thread_safety-doc
PSA thread safety requirements
2023-08-10 16:21:55 +02:00
Manuel Pégourié-Gonnard
0b6d021069 Adjust presence of warning/link.
- the codegen migration document is already a migration document, so
doesn't need the extra warning about work in progress;
- the driver interface can use a link to the more practical guide too.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-08-08 09:37:11 +02:00
Gilles Peskine
9aa93c8e78 Added a note about new primitives for secure destruction
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-07 16:32:09 +02:00
Gilles Peskine
584bf985f5 Elaborate on psa_destroy_key requirements
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-07 16:29:19 +02:00
Manuel Pégourié-Gonnard
de24ba6cfd Add link to examples in relevant places
Some documents about driver describe a state of things that is ahead of
the reality. They already contain a warning about it, but no way to know
that the current reality is; add a pointer to a document that describes
it.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-08-07 11:36:14 +02:00
Manuel Pégourié-Gonnard
b61484947a Fix error in the guide to drivers
There is no export_key entry point for transparent drivers.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-08-07 11:32:51 +02:00
Gilles Peskine
d3a797710a psa_is_key_slot_occupied: change to using the key identifier
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 18:36:06 +02:00
Valerio Setti
ab02d391cb test: use only rev-parse for getting the current branch
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 16:47:07 +02:00
Valerio Setti
ccb0344969 test: add GIT alternative commands for older GIT versions
The Docker container used for the CI has Git version 2.7.4 which
does not support the "git branch --show-current" command since this
was added in version 2.22.
Therefore this commit adds an alternative version for old Git versions.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 15:07:49 +02:00
Manuel Pégourié-Gonnard
1c739ec277
Merge pull request #7900 from mpg/doc-driver-only
ECPf wrap-up
2023-07-26 10:25:54 +02:00
Manuel Pégourié-Gonnard
fb22c27f1d Misc wording fixes and improvements
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-18 10:40:56 +02:00
Manuel Pégourié-Gonnard
1937cf8143 Improve wording & fix a typo
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-11 11:14:15 +02:00
Manuel Pégourié-Gonnard
c97775162e Fix inaccurate information about FFDH
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-11 11:11:20 +02:00
Dave Rodgman
e183ecef3d
Merge pull request #7136 from yanrayw/5692-record-compatsh-test-cases
Record the outcome of each test case in compat.sh
2023-07-10 12:08:32 +01:00
Manuel Pégourié-Gonnard
7a82e27a10 Add documentation on driver-only ECC
Just one part left for later.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-07 17:09:14 +02:00