Skip to content

crypto: Add Crypto API documentation #983

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
merged 1 commit into from
Mar 7, 2019

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Feb 28, 2019

Add a Crypto API page which gives an overview of Mbed Crypto, links to
the PSA Crypto API specification, links to the Crypto repo and its
documents, and explains a bit about how Mbed Crypto is integrated with
Mbed OS for boards with secure environments.

Copy link

@dgreen-arm dgreen-arm left a comment

Choose a reason for hiding this comment

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

I'm not a docs person, but I think I found two grammar issues. Otherwise, looks good to me.

@@ -0,0 +1,49 @@
## Crypto

Arm Mbed Crypto is reference implementation of the cryptography interface of

Choose a reason for hiding this comment

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

Adding 'the' between 'is' and 'reference' will make the sentence flow better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks your review.

We have adapted and [integrated Mbed Crypto with Mbed
OS](https://github.com/ARMmbed/mbed-os/blob/master/features/mbedtls/mbedcrypto).
On PSA platforms that support it, Mbed Crypto is pre-integrated with Mbed OS to
take advantage of a platform's segmented architecture and isolate cryptographic

Choose a reason for hiding this comment

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

I think 'a' should be 'the' here.

@Patater
Copy link
Contributor Author

Patater commented Feb 28, 2019

Rebased to improve grammars.

@AnotherButler
Copy link
Contributor

Does this have a code dependency?

@AnotherButler
Copy link
Contributor

I don't have access to edit this, even though it's in the docs repo, so I'm going to leave my changes in the form of comments today. If possible, please give me access.

Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

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

Please address my comments and queries.


### Other resources

The [Mbed Crypto website](https://github.com/ARMmbed/mbed-crypto) contains [an
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this website be live by 5.12? If not, let's not call it a website.


The [Mbed Crypto website](https://github.com/ARMmbed/mbed-crypto) contains [an
overview of the PSA Crypto
API](https://github.com/ARMmbed/mbed-crypto/blob/psa-api-1.0-beta/docs/PSA_Crypto_API_Overview.pdf),
Copy link
Contributor

Choose a reason for hiding this comment

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

Please put these in bullet form instead of a list, to match our other pages.

repository](https://github.com/ARMmbed/mbed-os-example-mbed-crypto).


### Configuring Mbed Crypto features
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move this section above the examples.


### Configuring Mbed Crypto features

The Mbed TLS configuration system configures Mbed Crypto. Refer to [Mbed TLS
Copy link
Contributor

Choose a reason for hiding this comment

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

... Crypto. Please refer to...


The Mbed TLS configuration system configures Mbed Crypto. Refer to [Mbed TLS
documentation for how to configure Mbed TLS and Mbed
Crypto](TLS.md#configuring-mbed-tls-features).
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work with the engine. Please use this link (and include the two periods and starting slash):
../apis/tls.html#configuring-mbed-tls-features

fully ported to Arm Mbed OS. You can read more about this in our [porting
guide](../contributing/index.html).</span>


Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the extra line between sections.


We have adapted and [integrated Mbed Crypto with Mbed
OS](https://github.com/ARMmbed/mbed-os/blob/master/features/mbedtls/mbedcrypto).
On PSA platforms that support it, Mbed Crypto is pre-integrated with Mbed OS to
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the hyphen in "preintegrated".

Copy link
Contributor

Choose a reason for hiding this comment

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

Or even change "is pre-integrated with" to "comes integrated with".

We have adapted and [integrated Mbed Crypto with Mbed
OS](https://github.com/ARMmbed/mbed-os/blob/master/features/mbedtls/mbedcrypto).
On PSA platforms that support it, Mbed Crypto is pre-integrated with Mbed OS to
take advantage of the platform's segmented architecture and isolate
Copy link
Contributor

Choose a reason for hiding this comment

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

"take advantage of" has a negative connotation to me. What do you think about replacing it with "make the most of" or "use"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tried "leverage".

@@ -0,0 +1,49 @@
## Crypto
Copy link
Contributor

Choose a reason for hiding this comment

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

Query: Should this be "Mbed Crypto" for proper branding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TLS used only "TLS", so I did the same. I'll add Mbed.

## Crypto

Arm Mbed Crypto is the reference implementation of the cryptography interface
of the Arm Platform Security Architecture (PSA). This is a preview release of
Copy link
Contributor

Choose a reason for hiding this comment

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

What is a preview release of Mbed Crypto? 5.12? This document? Please clarify.

I ask because I want this document to be maintainable. If this statement will change by the next feature release, we should remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no stable PSA Crypto API yet, so as the PSA Crypto API changes (somewhat out of our control), we need to adapt and follow suit in order to pass compliance tests. This may mean API breaks for our users, hence the warning. I'm open to suggestions as to how to word this better.

@Patater
Copy link
Contributor Author

Patater commented Mar 1, 2019

Rebased to address comments raised so far.

Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

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

Thanks so much for making those changes 👍 I've left two more comments.

Arm Mbed Crypto is the reference implementation of the cryptography interface
of the Arm Platform Security Architecture (PSA). The version of Mbed Crypto
shipping with Mbed OS is a preview release of Mbed Crypto, provided for
evaluation purposes only.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please replace the second sentence with:

Note: The version of Mbed Crypto shipping with Mbed OS is a preview release, provided for evaluation purposes only. Its contents may change in the next release.

(Feel free to update it if you think it's wrong/could be better.) Then, could you please tag @ndevillard for approval? I'd likehim to sign off on our wording for this one.


The [Mbed Crypto project homepage on
GitHub](https://github.com/ARMmbed/mbed-crypto) contains the following
resources:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a line after the colon, so the bullets render properly. Then, please add a period at the end of each bullet. (I'd make these changes myself, but I still can't edit your PR directly.)

@GuyWi GuyWi mentioned this pull request Mar 3, 2019
@Patater
Copy link
Contributor Author

Patater commented Mar 4, 2019

Rebased to make requested changes.

@Patater
Copy link
Contributor Author

Patater commented Mar 4, 2019

Rebased to update with more changes.

Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

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

Thanks for all the fixes 👍

implements PSA Crypto API v1.0b1.</span>

We have adapted and [integrated Mbed Crypto with Mbed
OS](https://github.com/ARMmbed/mbed-os/blob/master/features/mbedtls/mbedcrypto).
Copy link
Contributor

Choose a reason for hiding this comment

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

@AnotherButler
Copy link
Contributor

@Patater @dgreen-arm I'm fine making the remaining fix on my end once the PR is merged.

I'd like to transclude the Doxygen for this API. Do you know where I can find it here?https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/annotated.html

Is it under modules or data structures or somewhere else?

Add a Crypto API page which gives an overview of Mbed Crypto, links to
the PSA Crypto API specification, links to the Crypto repo and its
documents, and explains a bit about how Mbed Crypto is integrated with
Mbed OS for boards with secure environments.
@Patater
Copy link
Contributor Author

Patater commented Mar 5, 2019

Rebased to fix link.

I'm not sure where the Mbed OS Doxygen would be. Our Doxygen is currently only used to generate the PSA Crypto API specification, as already transcluded by https://github.com/ARMmbed/mbed-crypto/blob/psa-api-1.0-beta/docs/PSA_Crypto_API_Reference.pdf

@AnotherButler
Copy link
Contributor

@SenRamakri Could someone on your team please help us look into this?

@Patater
Copy link
Contributor Author

Patater commented Mar 6, 2019

Regarding code dependency, yes, there is one. We've merged the necessary code into Mbed OS master, via ARMmbed/mbed-os#9856 and a few previous PRs for Mbed Crypto 1.0.0dN versions (development snapshots).

@AnotherButler AnotherButler merged commit 005af18 into ARMmbed:development Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants