From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Sebastian Siewior <linux-crypto@ml.breakpoint.cc>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, Loc Ho <lho@amcc.com>,
Shasi Pulijala <spulijala@amcc.com>,
linux-crypto@vger.kernel.org
Subject: Re: Userspace API proposal was: Re: [PATCH 1/1] RFC: Add CryptoAPI User Space Interface Support
Date: Wed, 14 May 2008 16:18:56 +0400 [thread overview]
Message-ID: <20080514121855.GA14949@2ka.mipt.ru> (raw)
In-Reply-To: <20080514115730.GA10664@Chamillionaire.breakpoint.cc>
On Wed, May 14, 2008 at 01:57:30PM +0200, Sebastian Siewior (linux-crypto@ml.breakpoint.cc) wrote:
> Great. Here a few ideas for a new interface:
> - /dev/crypto:
> - open file, creates a new ctx which may be one of crypto/hash/...
> - set type via ioctl / netlink
> - set key / other attributes via ioctl
> - put a block for encryption via write()
> - wait until it is done. poll() could be used to determine this state
> - read the result via read().
> - ->final() (hash) could be executed on read()
Above but without special device, but syscall instead, which will have
all needed parameters like mode string, key, iv and sizes.
> - cryptofs attempt (somehow inspired by spufs):
> - 1 syscall to create a special crypto device (that is aes(cbc),
> hmac(sha1) or what ever the crypto api offers).
> - returns a handle and creates a unique folder in cryptfs
> - the folder is RW to the owner
> - and contains properties of the algorithm. So we write in the file
> keysize to specify the size of the key and write to the file key to
> set the key. This properties are based on the class of the algorithm
> (should be almost equal I guess).
> - Every crypto request will be created once a file in the request
> folder is created. Request is fed with data via the write().
> - I'm not sure how we signalize that a request is done. Maybe another
> file pops up and we can track this via inotify.
>
> So I put this two for discussion :)
> I came up with those two a while ago but never wrote code because I had
> no use case.
Well, it might be time to start :)
I'm not sure virtual filesystem is needed though, but as well can be a
good idea. At least not ioctl hell with /dev/crypto
--
Evgeniy Polyakov
next prev parent reply other threads:[~2008-05-14 12:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DB599F406D04E34389140B7D99C71B1B055EE51E@SDCEXCHANGE01.ad.amcc.com>
[not found] ` <0CA0A16855646F4FA96D25A158E299D60301C29D@SDCEXCHANGE01.ad.amcc.com>
[not found] ` <DB599F406D04E34389140B7D99C71B1B055EE6B2@SDCEXCHANGE01.ad.amcc.com>
2008-05-14 0:00 ` [PATCH 1/1] RFC: Add CryptoAPI User Space Interface Support Loc Ho
2008-05-14 10:32 ` Sebastian Siewior
2008-05-14 11:03 ` Herbert Xu
2008-05-14 11:57 ` Userspace API proposal was: " Sebastian Siewior
2008-05-14 12:18 ` Evgeniy Polyakov [this message]
2008-05-14 15:40 ` Loc Ho
2008-05-14 16:09 ` Evgeniy Polyakov
2008-05-15 20:16 ` Linux CryptoAPI Userspace API proposal Loc Ho
2008-05-20 4:00 ` Herbert Xu
2008-06-04 21:33 ` Loc Ho
2008-05-14 15:04 ` [PATCH 1/1] RFC: Add CryptoAPI User Space Interface Support Loc Ho
2008-05-14 16:01 ` Herbert Xu
2008-05-14 11:25 ` Evgeniy Polyakov
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=20080514121855.GA14949@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=herbert@gondor.apana.org.au \
--cc=lho@amcc.com \
--cc=linux-crypto@ml.breakpoint.cc \
--cc=linux-crypto@vger.kernel.org \
--cc=spulijala@amcc.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