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

Documentation and encoding of non-standardized formats #17

Open
cjpatton opened this issue Jan 6, 2021 · 1 comment
Open

Documentation and encoding of non-standardized formats #17

cjpatton opened this issue Jan 6, 2021 · 1 comment

Comments

@cjpatton
Copy link
Collaborator

cjpatton commented Jan 6, 2021

draft-ietf-tls-subcerts-09 specifies the wire format of the DC but not the corresponding key. Similarly, draft-ietf-tls-esni-09 specifies the wire format of the ECH configs used by the client, but not how the config and corresponding key are stored by the server. Interop tests will require these values to be generated prior to spinning up servers, so we will need to agree on how these values will be encoded.

I propose that the format of each artifact be specified in TLS syntax, then encoded in base64 before writing it to disk. Concretely, the following seems reasonable for an ECH key:

struct {
     opaque sk<0..2^16-1>;
     ECHConfig config<0..2^16>; // draft-ietf-tls-esni-09
} ECHKey;

The format of sk is specific to the KEM algorithm. For example, for DHKEM(X25519, HKDF-SHA256), this would simply be the clamped, 32-byte scalar as defined in RFC7748. (As for the NIST curves, I believe NIST has a standard encoding of scalars.)

@cjpatton
Copy link
Collaborator Author

cjpatton commented Feb 2, 2021

In #25 it was suggested to use PKCS#8 as the format for private keys. This is convenient for NSS, and is pretty straightforward to implement for cloudflare-go. BoringSSL and rustls may not want to have to support PKCS#8, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant