code: func NewSecureChannelSession(card *pcsc.Card, keyData []byte) (*SecureChannelSession, error) {
  	// Generate an ECDSA keypair for ourselves
  	gen := ecdh.NewEllipticECDH(crypto.S256())
  	private, public, err := gen.GenerateKey(rand.Reader)
  	if err != nil {
  		return nil, err
  	}
  
  	cardPublic, ok := gen.Unmarshal(keyData)
  	if !ok {
  		return nil, fmt.Errorf("Could not unmarshal public key from card")
  	}
  
  	secret, err := gen.GenerateSharedSecret(private, cardPublic)
  	if err != nil {
  		return nil, err
  	}
  
  	return &SecureChannelSession{
  		card:      card,
  		secret:    secret,
  		publicKey: gen.Marshal(public),
  	}, nil
  }
docs: // NewSecureChannelSession creates a new secure channel for the given card and public key.