From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: libnettle/libhogweed WIP Date: Wed, 19 Apr 2017 18:49:56 +0200 Message-ID: References: <83a89gq3us.fsf@gnu.org> <87bmtjiv0w.fsf_-_@lifelogs.com> <83o9xjn06c.fsf@gnu.org> <87shmeb5ln.fsf_-_@lifelogs.com> <83y3w5z1ez.fsf@gnu.org> <87lgr6yakj.fsf@lifelogs.com> <87wpamww9k.fsf@lifelogs.com> <8337daggnj.fsf@gnu.org> <87d1cdwxt6.fsf@lifelogs.com> <83tw5pg1q3.fsf@gnu.org> <87zifhulc2.fsf@lifelogs.com> <83h91og80k.fsf@gnu.org> <87pogbuhoe.fsf@lifelogs.com> <834lxndmd9.fsf@gnu.org> <87efwrug6z.fsf@lifelogs.com> <83bmrscvdb.fsf@gnu.org> <871ssos8jp.fsf@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492620614 10778 195.159.176.226 (19 Apr 2017 16:50:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2017 16:50:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 19 18:50:10 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0snu-0002ab-Uv for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2017 18:50:07 +0200 Original-Received: from localhost ([::1]:49401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0so0-000738-Mq for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2017 12:50:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0sns-00072e-L9 for emacs-devel@gnu.org; Wed, 19 Apr 2017 12:50:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0snp-0002Sp-Iw for emacs-devel@gnu.org; Wed, 19 Apr 2017 12:50:04 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:33558) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0snp-0002Rj-C3 for emacs-devel@gnu.org; Wed, 19 Apr 2017 12:50:01 -0400 Original-Received: from cm-84.213.17.174.getinternet.no ([84.213.17.174] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1d0snk-0000xF-B5 for emacs-devel@gnu.org; Wed, 19 Apr 2017 18:49:58 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEWliF8lFxdaTUFNMzTm 0J9tCRgtDRFIJycjEBI7AwxwERx/AAACTklEQVQ4jWWUy27aQBSGT5yxkmUnKfIsh0FV2AJdsHTp sKcVJyUPUKnLuFFltjYinheo2r5t/zO+AO2RsMV88587EDM/BRbbpE94lvsQjc7AO3mWoQOPxx58 TplDZsJ/CgFFNj6Bn72rNfOXrOjBUzjyEafMao0HX4BocLRNz4MHONrxRuVEyhPNBsC7Vw4NK5/C GW9uzsCRfze8zeFsjdeyj8GIvRshp61X+PjEDAAxRhtOlffpRvn82vQFAvzYAqAOhsTnet+BrzuO Z5zKufeiARjx6BGtZSZew5VvnQn4hBLtehPTFQlJv6gsdPH655cl8r21wDqn8dY6GwhJKeQAdJAM K4sz56gDWqyKqTcqH5vqxdL0H1ApPzPh4Oj2BLR5CAZgHKpiTlcDCG8SqySv/Bm37DmQYUQz8/JC ESsWgHnRtBpALaArJE+WTQ9MI/6p1VBioiITIMXlbZScbiR5epkJCM9KgCiIxpXMY7GIAEEkLzBK iiZEsCgX+9BYn1iv0Ch60PMOwAKi3x6cxXZNijt3Bg7k5Yeh8qQs3l6dgAGQXJBrqe+Kdh4TAY1F I2qESCbtWsugQEw1R1SSZK/3AwBZBn2wKjbqwZyAW8wCunCYW0dJt+4tcItQT8tv+P59Yi6AC9UY 21W6UkMbe2XFnGvv1QkiZ62CHHbNuWmFIOG+QNvaS72rSW0TvOZFqK3R0RUlkWQQorMYwKoFMpsV wPJefGJGahW0bDu1Cmxl9eLcPtT+o4mgvd//UYTw3n+Q7eiCT4bzyvurCP4CJNxNr2SRNpkAAAAA SUVORK5CYII= In-Reply-To: <871ssos8jp.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 19 Apr 2017 11:48:10 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 80.91.224.195 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:214134 Archived-At: Ted Zlatanov writes: > Not allow them where? Just the new stuff I'm adding? Or also > `secure-hash' and `md5' etc? Or anything that deals with crypto (which > could also affect EPG)? I was thinking just the new stuff you're adding, because the ship has sailed for the older functions. (I'd expect the older functions to become obsolete after a while...) By just allowing non-multibyte text as input, you avoid stuff like --- If CODING-SYSTEM is nil or omitted, the default depends on OBJECT. If OBJECT is a buffer, the default for CODING-SYSTEM is whatever coding system would be chosen by default for writing this text into a file. If OBJECT is a string, the most preferred coding system (see the command =E2=80=98prefer-coding-system=E2=80=99) is used. If NOERROR is non-nil, silently assume the =E2=80=98raw-text=E2=80=99 codin= g if the guesswork fails. Normally, an error is signaled in such case. --- in the needlessly complicated call signature to `md5'. I mean, we already have these functions for handling characters separately, if the user needs to encode text, and re-stuffing them into the signatures of the encryption functions is just confusing, I think. That is, I think (md5 (encode-coding-string "H=C3=A9llo" 'iso-8859-1)) is a better interface than (md5 "H=C3=A9llo" nil nil 'iso-8859-1) > If it's just the code in my patch, let me know what I need to change in > the way it calls extract_data_from_object() and I'll adjust the code, > the tests, and the docs. IIUC Stefan wants the call to fail if the > string or buffer is mulibyte and Lars agreed? Yes, but as Eli and Stefan said, perhaps there's something to be said for just allowing encrypting the internal representation of Emacs objects, too. (Which is what base64-encode-string/base64-encode-region does.) This is more flexible, but is this a flexibility that's useful? I'm not sure. I think in the base64 case, it's led to confusion over the years. Anyway, I may have forgotten to say this: Whee! Encryption functions in Emacs! Yay! Thanks for implementing this stuff, Ted. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no