Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 39 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Isaac Schlueter  
View profile  
 More options Oct 8 2012, 7:24 pm
From: Isaac Schlueter <i...@izs.me>
Date: Mon, 8 Oct 2012 16:24:22 -0700
Local: Mon, Oct 8 2012 7:24 pm
Subject: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
Currently, the crypto module defaults to using 'binary' encoded
strings everywhere as the default input and output encoding.

This is problematic for a few reasons:

1. It's slower than necessary.
2. It doesn't match the rest of Node.

The reason for this is that crypto predates Buffers, and no one ever
bothered to go through and change it.  (The same reason it's got some
odd hodgepodge of update/digest methods vs the Stream interface you
see everywhere else in node.)

The reason it persists in 0.8 (and perhaps in 0.10) is that we
(perhaps overly optimistically) labelled that API "stable", and don't
want to break anyone's programs.  It's going to change eventually to
match the rest of node.  The only question is whether the change will
come in 0.10 or 0.12.  A stream interface to all the crypto classes is
coming in 0.10; using 'binary' strings by default is thus even more
obviously a departure from the rest of node.

Note that, if you only use crypto for hashes, and set the 'hex'
encoding, then it won't affect you.  If you only ever pass the output
of one crypto function to the input of another (sign/verify, for
example) then it also won't affect you; you'll just pass buffers
around instead of binary strings.

Please select one, and reply with your choice and perhaps any other
feedback you have on this issue.  Thanks.

a) Go for it.  This won't affect me, and if by chance it does, I don't
mind putting 'binary' args here and there.
b) Please wait.  Mark the API as unstable in 0.10, but don't change it
until 0.12.
c) I have no opinion, because I don't use the crypto API directly.

(Disclaimer: Node is not a democracy.  The "winning" vote might still
be out-voted by reasonable considerations of the core dev team.  This
is informative only ;)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Holbrook  
View profile  
 More options Oct 8 2012, 7:34 pm
From: Joshua Holbrook <josh.holbr...@gmail.com>
Date: Mon, 8 Oct 2012 16:33:40 -0700
Local: Mon, Oct 8 2012 7:33 pm
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
I say go for it. :)

--Josh

--
Joshua Holbrook
Head of Support
Nodejitsu Inc.
j...@nodejitsu.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Tellnes  
View profile  
 More options Oct 8 2012, 7:41 pm
From: Christian Tellnes <christ...@tellnes.no>
Date: Tue, 9 Oct 2012 01:40:36 +0200
Local: Mon, Oct 8 2012 7:40 pm
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
a) Go for it

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Schoonmaker  
View profile  
 More options Oct 8 2012, 7:42 pm
From: Michael Schoonmaker <michael.r.schoonma...@gmail.com>
Date: Mon, 8 Oct 2012 16:41:25 -0700
Local: Mon, Oct 8 2012 7:41 pm
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

My vote is a', "Please for the love of all that is holy go for it." The
incongruence is annoying, and I have to context-switch every time I work
with our crypto code.

On Mon, Oct 8, 2012 at 4:33 PM, Joshua Holbrook <josh.holbr...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
codepilot Account  
View profile  
 More options Oct 8 2012, 7:58 pm
From: codepilot Account <codepi...@gmail.com>
Date: Mon, 8 Oct 2012 16:58:07 -0700
Local: Mon, Oct 8 2012 7:58 pm
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a)

On Mon, Oct 8, 2012 at 4:41 PM, Michael Schoonmaker <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Stone  
View profile  
 More options Oct 8 2012, 8:01 pm
From: Andrew Stone <andrew.j.ston...@gmail.com>
Date: Mon, 8 Oct 2012 20:01:46 -0400
Local: Mon, Oct 8 2012 8:01 pm
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

Go For it.

On Mon, Oct 8, 2012 at 7:41 PM, Michael Schoonmaker <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Gross  
View profile  
 More options Oct 8 2012, 8:08 pm
From: Joshua Gross <joshua.gr...@gmail.com>
Date: Mon, 8 Oct 2012 19:08:36 -0500
Local: Mon, Oct 8 2012 8:08 pm
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
I like B) in theory, as a way to manage APIs. Anyone not reading this newsgroup will at least have *some* advanced warning.

-- Joshua Gross
Christian / SpanDeX.io / BA Candidate of Computer Science, UW-Madison 2013
414-377-1041 / http://www.joshisgross.com

On Oct 8, 2012, at 6:24 PM, Isaac Schlueter <i...@izs.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lois  
View profile  
 More options Oct 8 2012, 8:52 pm
From: Lois <lois.desp...@gmail.com>
Date: Mon, 8 Oct 2012 17:52:24 -0700 (PDT)
Local: Mon, Oct 8 2012 8:52 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a) do the right thing as soon as possible. It affects me, but this is such
a minor issue to resolve.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mscdex  
View profile  
 More options Oct 8 2012, 10:19 pm
From: mscdex <msc...@gmail.com>
Date: Mon, 8 Oct 2012 19:19:11 -0700 (PDT)
Local: Mon, Oct 8 2012 10:19 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
a) times 100000000

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
codepilot Account  
View profile  
 More options Oct 8 2012, 10:25 pm
From: codepilot Account <codepi...@gmail.com>
Date: Mon, 8 Oct 2012 19:24:42 -0700
Local: Mon, Oct 8 2012 10:24 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

I agree. We aren't to version 1.0 yet, so anything should be fair game.
On Oct 8, 2012 7:19 PM, "mscdex" <msc...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Austin William Wright  
View profile  
 More options Oct 8 2012, 11:12 pm
From: Austin William Wright <diamondma...@users.sourceforge.net>
Date: Mon, 8 Oct 2012 20:12:35 -0700 (PDT)
Local: Mon, Oct 8 2012 11:12 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

(a) Yes, *please.* Changes in the behavior of binary strings, and the usage
of binary strings alone, has hurt me in the past.

And even if Node.js *was* version 1.0.0, that's still no excuse to not
improve the API.

It should go without saying, remember to document and announce the behavior
change accordingly.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bradley Meck  
View profile  
 More options Oct 8 2012, 11:31 pm
From: Bradley Meck <bradley.m...@gmail.com>
Date: Mon, 8 Oct 2012 20:31:29 -0700 (PDT)
Local: Mon, Oct 8 2012 11:31 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a. who is actually messing with crypto after the fact. I would like to know
the reasons to do so.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrey  
View profile  
 More options Oct 8 2012, 11:48 pm
From: Andrey <andrey.sido...@gmail.com>
Date: Mon, 8 Oct 2012 20:48:26 -0700 (PDT)
Local: Mon, Oct 8 2012 11:48 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a) Go for it. This will probably affect me, but I'll be happy to change
code for better


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon  
View profile  
 More options Oct 8 2012, 11:58 pm
From: Simon <simon.stur...@gmail.com>
Date: Mon, 8 Oct 2012 20:58:58 -0700 (PDT)
Local: Mon, Oct 8 2012 11:58 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a) Go for it. API-breaking changes are somewhat expected in Node and the
quality and consistency of Node's API is one of it's strongest points. Keep
the quality high even if you make a few breaking changes pre-1.0. The
sooner the better.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric S  
View profile  
 More options Oct 9 2012, 1:48 am
From: Eric S <e...@geekzilla.org>
Date: Mon, 8 Oct 2012 22:48:04 -0700 (PDT)
Local: Tues, Oct 9 2012 1:48 am
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a), though in interest of full disclosure, the impact on my current code
will be minimal, and for future stuff, I'd rather get the change over with
rather than have even more things to change at a later date.

On Monday, October 8, 2012 5:08:54 PM UTC-7, Joshua Gross wrote:

> I like B) in theory, as a way to manage APIs. Anyone not reading this
> newsgroup will at least have *some* advanced warning.

Understandable, but with Node not at 1.0 yet, I'd hope that anyone using
node in a production environment has at least one team member keeping up
with this list.  Then again, we're talking reality, not some place that
makes sense.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Pilsbury  
View profile  
 More options Oct 9 2012, 2:39 am
From: Mike Pilsbury <mike.pilsb...@gmail.com>
Date: Mon, 8 Oct 2012 23:39:35 -0700 (PDT)
Local: Tues, Oct 9 2012 2:39 am
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a)

(My only use of crypto is to createCredentials for tls.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paddy Byers  
View profile  
 More options Oct 9 2012, 3:30 am
From: Paddy Byers <paddy.by...@gmail.com>
Date: Tue, 9 Oct 2012 08:30:34 +0100
Local: Tues, Oct 9 2012 3:30 am
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

Hi,

a) Go for it.  This won't affect me, and if by chance it does, I don't

> mind putting 'binary' args here and there.

I definitely support (a). Might I make a plea also for a proper
X509Certificate class to be supported in addition to PEM and other
encodings of certificates in the factory methods for Credentials, Signer
and Verifier?

We have a glimpse of a certificate class in the tls module
with cleartextStream.getPeerCertificate(); but this is the only place in
the API where fields of a certificate are exposed. There are also use-cases
in signing and verifying where you want to know about certificate details,
and details also about non-trivial certificate paths that were constructed
in the course of verifying a signature. An example would be knowing whether
or not your validated path qualifies as a valid EV path, or verifying the
signature on in an XML signature document.

I know the argument is always that this functionality can go in user land
in an independent module, instead of in core; and there are modules that do
some of this such as dcrypt [1]. The problem is that when you do that you
have to re-implement all of the core functionality as well on top of your
external certificate library, just because you're unable to pass a
certificate object into the APIs in the core.

So my suggestion would be to include X509Certificate and X509CRL classes
that wrap native OpenSSL X509 structures, and for these to be supported as
well as strings in the relevant APIs. Once that is in place, I think the
more esoteric use cases can be supported in userland without lots of
duplication of code.

I'm happy to contribute to the work, and some time ago started implementing
support for this [2] based on dcrypt. You can see from the amount of code
in there that's simply cut+paste from core that it really would be a fairly
modest delta; much of the functionality is already there, but disorganised.

Thanks - Paddy

[1]: https://github.com/dekz/dcrypt
[2]: https://github.com/paddybyers/dcrypt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diogo Resende  
View profile  
 More options Oct 9 2012, 4:27 am
From: Diogo Resende <drese...@thinkdigital.pt>
Date: Tue, 9 Oct 2012 09:26:48 +0100
Local: Tues, Oct 9 2012 4:26 am
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

I go for a) but also agree that b) would be better for people outside this list. Could we have some kind of mixing, having the old and new interface together, a warning on old interface and then on the next version it could be removed (or throw..).

--
Diogo Resende


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Micheil Smith  
View profile  
 More options Oct 9 2012, 5:08 am
From: Micheil Smith <mich...@brandedcode.com>
Date: Tue, 9 Oct 2012 10:08:23 +0100
Local: Tues, Oct 9 2012 5:08 am
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
a) Go for it.

Although, probably wise to make sure that it's publicised a fair bit; Anyone who
hits issues can hang around on an older version of Node, until they can upgrade.

On 09/10/2012, at 12:24 AM, Isaac Schlueter <i...@izs.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
phidelta  
View profile  
 More options Oct 9 2012, 8:02 am
From: phidelta <philipp.dun...@gmail.com>
Date: Tue, 9 Oct 2012 05:02:33 -0700 (PDT)
Local: Tues, Oct 9 2012 8:02 am
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

d) I use it a lot and find the strangeness of binary strings so dumb that
I'd rather have it changed sooner or later even if that means having to
rewrite/modify a bit of code.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt  
View profile  
 More options Oct 9 2012, 8:53 am
From: Matt <hel...@gmail.com>
Date: Tue, 9 Oct 2012 08:53:26 -0400
Local: Tues, Oct 9 2012 8:53 am
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a - go for it. This has bugged me for long enough.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jimb Esser  
View profile  
 More options Oct 9 2012, 12:06 pm
From: Jimb Esser <wastel...@gmail.com>
Date: Tue, 9 Oct 2012 09:06:02 -0700 (PDT)
Local: Tues, Oct 9 2012 12:06 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a) Go for it.  Looks like it would have no effect on almost all of our
crypto code.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 9 2012, 12:11 pm
From: Isaac Schlueter <i...@izs.me>
Date: Tue, 9 Oct 2012 09:11:46 -0700
Local: Tues, Oct 9 2012 12:11 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
Seems pretty unanimous here.  So, unless some new objection comes up
that is very compelling, let's assume that 0.10 will use Buffers by
default in crypto instead of binary strings.

Also, a streaming interface to the crypto classes is already underway.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jannick  
View profile  
 More options Oct 9 2012, 12:45 pm
From: Jannick <jannick.knud...@gmail.com>
Date: Tue, 9 Oct 2012 09:45:58 -0700 (PDT)
Local: Tues, Oct 9 2012 12:45 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a) go for it!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Shaw  
View profile  
 More options Oct 9 2012, 1:17 pm
From: Dan Shaw <ds...@dshaw.com>
Date: Tue, 9 Oct 2012 10:16:00 -0700
Subject: Re: [nodejs] Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
a) go for it.

Daniel Shaw
@dshaw


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 39   Newer >
« Back to Discussions « Newer topic     Older topic »