From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: creating unibyte strings Date: Mon, 25 Mar 2019 05:41:25 +0200 Message-ID: <8336nboc2i.fsf@gnu.org> References: <83y3b4wdw9.fsf@gnu.org> <83tvhal45r.fsf@gnu.org> <83h8bwt1on.fsf@gnu.org> <83bm24t0hv.fsf@gnu.org> <83wokrs6en.fsf@gnu.org> <837ecrrqdm.fsf@gnu.org> <83sgvfq6yv.fsf@gnu.org> <83ftrcnqp0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="35782"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Elias =?utf-8?Q?M=C3=A5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 25 04:41:38 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8GUT-0009D7-MM for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2019 04:41:37 +0100 Original-Received: from localhost ([127.0.0.1]:35716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8GUS-0007J5-MB for ged-emacs-devel@m.gmane.org; Sun, 24 Mar 2019 23:41:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8GUJ-0007Hd-RA for emacs-devel@gnu.org; Sun, 24 Mar 2019 23:41:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8GUG-0002HD-Mk; Sun, 24 Mar 2019 23:41:24 -0400 Original-Received: from [176.228.60.248] (port=3028 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h8GUE-0000RQ-H3; Sun, 24 Mar 2019 23:41:24 -0400 In-reply-to: (message from Elias =?utf-8?Q?M=C3=A5rtenson?= on Mon, 25 Mar 2019 09:47:26 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234696 Archived-At: > From: Elias MÃ¥rtenson > Date: Mon, 25 Mar 2019 09:47:26 +0800 > Cc: Stefan Monnier , emacs-devel > > Can you tell why the byte buffer needs to be exposed to Lisp in this > case? IOW, what would a Lisp program using this module want to do > with these byte buffers? > > In this particular case, I'm exposing GSSAPI, which is a rather low level interface to Kerberos (well, it supports > multiple systems, but it's mostly used for Kerberos). > > For example, one function is called gss-unwrap, and it takes an encrypted byte array and decrypts it, returning > a new byte array with the decrypted content. > > What the impact is depends on the Elisp code that uses GSS. In the case of IMAP for example, it's not too > bad, since only the initial handshake is passed through these functions (IMAP encryption is handled by TLS, > not Kerberos). However, there are other uses where every single package is passed through the wrap and > unwrap functions. I guess I was asking why is this done in Lisp, not in C. The decrypted stuff is human-readable text, is it not? Then why would a Lisp program want to see the encrypted byte array?