From: Simo Sorce <simo@redhat.com>
To: Scott Mayhew <smayhew@redhat.com>
Cc: Chuck Lever <chuck.lever@oracle.com>,
Bruce Fields <bfields@fieldses.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 0/2] nfsd: add principal to the data being tracked by nfsdcld
Date: Wed, 04 Sep 2019 20:50:01 -0400 [thread overview]
Message-ID: <90d43fc29c623aef70609bf02ef3eba54652c8ce.camel@redhat.com> (raw)
In-Reply-To: <20190904205826.GH11980@coeurl.usersys.redhat.com>
On Wed, 2019-09-04 at 16:58 -0400, Scott Mayhew wrote:
> > While thinking about this I wondered, why not simply hash (SHA-256 for
> > example) the principal name and store the hash instead?
> >
> > It will make the length fixed and uniform and probably often shorter
> > than the real principal names, so saving space in the general case.
> >
> > I am not against truncating to 1024, but a hash would be more elegant
> > and correct.
>
> I can do that. Is there any reason I would want to convert the hash to
> to a human-readable format (i.e. something that would match the
> sha256sum command-line tool's output) or can I just use the raw buffer?
> Note that if we wanted to print the hash in an error message or
> something, I can just use printk's %*phN format specifier...
I do not see a reason to waste time turning to ascii before the time
you really need to. A byte buffer is perfectly fine.
Simo.
--
Simo Sorce
RHEL Crypto Team
Red Hat, Inc
prev parent reply other threads:[~2019-09-05 0:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 16:26 [PATCH 0/2] nfsd: add principal to the data being tracked by nfsdcld Scott Mayhew
2019-08-30 16:26 ` [PATCH 1/2] nfsd: add a "GetVersion" upcall for nfsdcld Scott Mayhew
2019-08-30 16:26 ` [PATCH 2/2] nfsd: add support for upcall version 2 Scott Mayhew
2019-08-30 16:32 ` [PATCH 0/2] nfsd: add principal to the data being tracked by nfsdcld Chuck Lever
2019-08-30 19:00 ` Simo Sorce
2019-09-04 20:58 ` Scott Mayhew
2019-09-05 0:50 ` Simo Sorce [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90d43fc29c623aef70609bf02ef3eba54652c8ce.camel@redhat.com \
--to=simo@redhat.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=smayhew@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox