code: func MarshalEd25519PrivateKey(sk crypto.PrivateKey) ([]byte, error) {
  	priv, ok := sk.(ed25519.PrivateKey)
  	if !ok {
  		return nil, errEd25519WrongKeyType
  	}
  
  	// Marshal the innter CurvePrivateKey.
  	curvePrivateKey, err := asn1.Marshal(priv.Seed())
  	if err != nil {
  		return nil, err
  	}
  
  	// Marshal the OneAsymmetricKey.
  	asym := oneAsymmetricKey{
  		Version: 0,
  		Algorithm: pkix.AlgorithmIdentifier{
  			Algorithm: ed25519OID,
  		},
  		PrivateKey: curvePrivateKey,
  	}
  	return asn1.Marshal(asym)
  }
docs: // MarshalEd25519PrivateKey returns a DER encdoing of the input private key as
  // specified in https://tools.ietf.org/html/draft-ietf-curdle-pkix-04.