Skip to content

crypto: provide guidance on how to interchange keys #45726

Description

@AGWA

Here's a blog post from Tim Bray describing his experience trying to do something that should be fairly simple: interchange an Ed25519 public key between a Go and a Java app.

https://www.tbray.org/ongoing/When/202x/2021/04/19/PKI-Detective

This ended up being quite a struggle, and on the Go side he ended up basically implementing his own versions of x509.MarshalPKIXPublicKey and x509.ParsePKIXPublicKey.

The Godocs for crypto/ed25519, crypto/rsa, and crypto/ecdsa don't provide any guidance for this, and it's not very intuitive that you have to look in crypto/x509 for functions to marshal and unmarshal keys. Perhaps the Godocs should mention the functions in crypto/x509?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions