lkml.org 
[lkml]   [2010]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 01/19] User-space API definition
    From
    2010/9/3 Herbert Xu <herbert@gondor.apana.org.au>:

    >> * ioctl(NCRIO_SESSION_INIT) to allocate a crypto session (to encrypt,
    >>   decrypt, hash, sign, or verify signature), then
    >>   ioctl(NCRIO_SESSION_UPDATE) to act on chunks of data.  Deallocate the
    >>   session, and optionally retrieve session results (e.g. hash or
    >>   signature), using ioctl(NCRIO_SESSION_FINAL).
    >>   There is also NCRIO_SESSION_ONCE for an one-shot crypto operation
    >>   using a single user->kernel context switch.
    >> Full documentation of the interface is in
    >> Documentation/crypto/userspace.txt .
    >
    > Thanks for the updated patch-set.  It does indeed fulfil some
    > of the requirements raised earlier.
    >
    > However, as far as I can see this still does not address the
    > extensibility.  For example, say we want add an interface to
    > allow the xoring of two arbitrary data streams using DMA offload,
    > this interface would make that quite awkward.

    Although I think the current API could handle something like this, I
    also think it is undesirable to do so. The API was designed with
    cryptographic operations in mind, and its extensibility might better
    be judged on how it can incorporate future cryptographic protocols
    (sigma-proofs and other zero-knowledge protocols and other protocols
    that I might not know of). An XOR operation, doesn't really fit into a
    cryptographic API. It could however be included in the current design
    with some utility ioctls() that address such helper operations. Even
    better, I think a XOR operation deserves a system call, since it is
    quite useful in a variety of applications, not only cryptographic
    ones.

    > In fact the whole interface is really tailored to the traditional
    > encryption/hash operations that BSD provided so I think this is not
    > a good foundation for our user-space API.

    It supports much more than the openbsd API, but indeed it is designed
    with cryptographic operations in mind and this limitation can allow a
    semi-formal verification of its properties. I'll try to post a link to
    the design document as soon.

    regards,
    Nikos
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-09-03 11:37    [W:2.591 / U:0.008 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site