code: func ParseEd25519PublicKey(der []byte) (crypto.PublicKey, error) {
  	var spki subjectPublicKeyInfo
  	if rest, err := asn1.Unmarshal(der, &spki); err != nil {
  		return nil, err
  	} else if len(rest) > 0 {
  		return nil, errors.New("SubjectPublicKeyInfo too long")
  	}
  
  	if !spki.Algorithm.Algorithm.Equal(ed25519OID) {
  		return nil, errEd25519WrongID
  	}
  
  	if spki.PublicKey.BitLength != ed25519.PublicKeySize*8 {
  		return nil, errors.New("SubjectPublicKeyInfo PublicKey length mismatch")
  	}
  
  	return ed25519.PublicKey(spki.PublicKey.Bytes), nil
  }
docs: // ParseEd25519PublicKey returns the Ed25519 public key encoded by the input.