Skip to content
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

Provide example definitions for some of the implementation-defined macros #74

Open
athoelke opened this issue Jul 5, 2023 · 0 comments
Labels
Crypto API Issue or PR related to the Cryptography API enhancement New feature or request proposal An RFC, or proposal for discussion

Comments

@athoelke
Copy link
Contributor

athoelke commented Jul 5, 2023

The Crypto API spec provides definitions for most constant-value macros, such as algorithm identifier or key type values. The spec also provides example definitions for some of the function-like macros, typically also for macros that construct or query algorithm identifier or key type values. They are provided as examples because an implementation that implements a subset of the key types or algorithms may be able to simplify the macro definitions; or an implementation that provides additional key types or algorithms might need to extend the definitions.

Many of the macros, particularly the buffer sizing macros, are tagged as implementation-defined values. This is because these might identify limits that are specific to an implementation, or can depend on the implementation strategy.

A review of these macros, however, identifies that if we make a single assumption, most of the macros related to input and output buffer sizes are only dependent on the algorithm and key parameters supported by the implementation. The 'single assumption' is that the implementation does the minimal input and output buffering that is required to support the algorithm.

It might be beneficial for the specification to provide example implementations for all such macros, based on a full implementation of all algorithms and key types, and making that single assumption. Implementers can use, simplify, modify, or ignore these example definitions as appropriate.

Would this be a worthwhile exercise?

@athoelke athoelke added enhancement New feature or request Crypto API Issue or PR related to the Cryptography API proposal An RFC, or proposal for discussion labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crypto API Issue or PR related to the Cryptography API enhancement New feature or request proposal An RFC, or proposal for discussion
Projects
Development

No branches or pull requests

1 participant