From: "George Spelvin" <linux@horizon.com>
To: linux@horizon.com, smueller@chronox.de
Cc: herbert@gondor.apana.org.au, jarod@redhat.com,
linux-crypto@vger.kernel.org, nhorman@tuxdriver.com
Subject: Re: Is ansi_cprng.c supposed to be an implmentation of X9.31?
Date: 2 Dec 2014 00:39:30 -0500 [thread overview]
Message-ID: <20141202053930.30892.qmail@ns.horizon.com> (raw)
In-Reply-To: <2758504.R15xM8Vjc0@tauon>
> See Documentation/DocBook/crypto-API.tmpl in the cryptodev-2.6 tree.
> There you will find tons of documentation (which will be merged during
> 3.19-rc1)
Yes, I've been reading that. It certainly helps a great deal, but
still leaves me with some significant questions.
I started researching the crypto layer when I proposed using Dan
Bernstein's SipHash elsewhere in the kernel and someone asked for a
crypto API wrapper for it. That seemed a simple enough request to me,
but it's been a deeper rabbit hole than I expected.
I started reading the code to another keyed hash, michael_mic, as a model,
but I'm stil trying to understand the intended difference between "struct
crypto_shash" and "struct shash_desc", and in particular why both have
a copy of the key. The SHASH API documentation at
https://git.kernel.org/cgit/linux/kernel/git/herbert/cryptodev-2.6.git/tree/include/crypto/hash.h
isn't particularly enlightening. If the crypto_shash were entirely
read-only and the shash_desc were the entire volatile state, that would
make sense, but as it is I'm confused about the design intent.
(On a related point, the general lack of const declarations throughout the
crypto layer has been a source of frustration.)
The other big issue I'm struggling with is how to get the tcrypt.ko module
to print "ansi_cprng has passed its tests." All it has produced for me
so far is a few kilobytes of dmesg spam about ciphers which aren't even
configured in my kernel.
After a few hours of trying to figure out what the alg and type parameters
do, I gave up and cut and pasted the tests into prng_mod_init().
next prev parent reply other threads:[~2014-12-02 5:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 23:23 Is ansi_cprng.c supposed to be an implmentation of X9.31? George Spelvin
2014-11-29 17:58 ` Neil Horman
2014-11-29 19:32 ` George Spelvin
2014-11-30 1:16 ` Neil Horman
2014-11-30 14:36 ` Stephan Mueller
2014-12-02 4:55 ` George Spelvin
2014-12-02 13:22 ` Neil Horman
2014-12-02 17:56 ` George Spelvin
2014-11-30 14:31 ` Stephan Mueller
2014-11-30 14:26 ` Stephan Mueller
2014-12-02 5:39 ` George Spelvin [this message]
2014-12-02 13:44 ` Neil Horman
2014-12-02 19:43 ` George Spelvin
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=20141202053930.30892.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=herbert@gondor.apana.org.au \
--cc=jarod@redhat.com \
--cc=linux-crypto@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=smueller@chronox.de \
/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