* sarnold sets mode: +m
sarnoldok, i'd like to welcome everyone back to the day's final presentation, james morris of intercode
jamesmhello, thanks for turning up!
sarnoldhis presentation will be on the new cryptographic infrastructure he helped introduce into the 2.5 linux kernel
sarnoldjames has also been instrumental in the LSM prject
sarnoldplease direct your questions and comments to #qc
jamesmA new crypto api was added to the 2.5 kernel recently, which will be part
jamesmof the next stable kernel series (2.6).
jamesmThis api was initially developed to support the ipsec implementation of
jamesmDavid Miller and Alexey Kuznetsov (which is also merged into the 2.5 kernel).
jamesmIt is also intended to be a generic api for use by other kernel components
jamesmwhich require crypto, such as CIFS, cryptoloop and the /dev/random driver.
jamesmCurrently, it is a very simple software API, with a pluggable interface
jamesmfor algorithm modules.
jamesmlgorithms implemented so far:
jamesmAlgorithms implemented so far:
jamesmDigests: SHA1, SHA256, MD4, MD5.
jamesmthese are used for verifying data integrity and creating digital signatures, and message authentication codes for networking
jamesmCiphers: Blowfish, DES, 3DES, Twofish, Serpent.  (AES is in development).
jamesmthese are symmetric encryption algorithms, where you (usually) use the same key to encode and decode, and the key must be kept secret
jamesmmost encryption applications use a combination of data integrity and encryption
jamesm<sarnold> jamesm: it'd make my life easier if you guys included assymmetric algorithms too :)
jamesmasymmetric support is being considered, it would be useful for code signing and multicast ipsec
jamesmand certainly we'd like to allow userspace to take advantage of available asymmetric crypto hardware
jamesmas it is very slow in software
jamesm<sh0nX> jamesq: can this new crypto API be used for SSH/SSL? or we still need to depend on software level crypto?
jamesmnot yet, and it would only make sense when the api provides access to hardware acceleration
jamesmThe api provides the HMAC algorithm for digests (used by ipsec), and CBC
jamesmmode for ciphers (this chains the results of last encryption to the next
jamesmone to increase security, and is very commonly used).
jamesmCurrently, the api has been proven with ipsec.  Some further work may
jamesmbe required to make it work well for cryptoloop.
jamesmA specific feature of the api is that it operates on arrays of page vectors
jamesm(scatterlists) rather than plain memory buffers (pages are fundamental
jamesmchunks of memory that the kernel manages).
jamesmThis allows deep integration with other kernel components such as the
jamesmnetworking stack, and provides a scatter/gather interface.
* mathmoi has quit IRC (Signed off)
jamesm(in userspace, a well known scatter/gather interface is readv()/writev(), the crypto api uses a similar concept on pages instead of plain buffers)
jamesm<sarnold> i'd think cryptoloop might need to use ECB mode for random access to blocks.. is this correct?
jamesmas far as i know, cryptoloop uses CBC mode, and sets the IV to something derived from the disk block
jamesmso, the main idea of operating on pages and scatter/gather is efficiency.
jamesmpages are fundamental to the kernel, and scatter/gather allows data to be transformed without copying it all into one buffer
jamesmthis can be carried down to the hardware level, and use scatter/gather DMA operations
jamesmas Dave Miller has been part of designing this, it is aimed at high performance
jamesmit will be good to compare our performance against openbsd, who already have integrated crypto
jamesmIn the case of ipsec, the design of the crypto api allows crypto transforms
jamesmto be applied directly to discontiguous pages of memory associated with
jamesmnetwork packets (e.g. IP fragment lists, zero-copy pages being transmitted
jamesmvia sendfile()).
jamesmit seems to be working ok so far, but we have done no performance optimizations yet, or tried hardware acceleration
jamesm<addict> do you know why linux didn't integrated it before ?
jamesmthere has been a kernel crypto patch available for some time (by the people at kerneli.org), but i think that legal issues prevented crypto from being fully integrated into the kernel until now
jamesmopenbsd had crypto integrated because it is developed outside the USA
jamesmThe api currently works in-place on data, although it may soon be modified
jamesmto allow different input/output scatterlists for cryptoloop.
jamesmFuture/ongoing work:
jamesmOptimized assembler versions of the algorithms have not yet been implemented,
jamesmall are currently generic C versions.
jamesmWork has started on support for crypto hardware devices, which may be useful
jamesmfor increasing performance and scalability.
jamesm(note that some people, such as Linus, have doubts about how useful hardware cards might be, as it will involve copying data back and forth across the pci bus, when todays cpu's are very fast. it is a big area to be analyzed)
jamesm<sh0nX> with the new crypto, is all the memory protected while in use?
jamesm<sarnold> sh0nX: kernel memory cannot be paged to disk
jamesmwhen the userspace api is developed, this may become an issue though
jamesm<addict> are you looking for some hardware crypto such as powercrypt ?
jamesmyes, i have an older powercrypt card (hifn7751) and some soekris cards (which are quite cheap)
jamesmOf particular interest are network cards which have crypto chips on them.
jamesmSuch cards allow packets to be copied once across the PCI bus to the card,
jamesmwhere the packets can be encrypted and transmitted to the network without further
jamesmcopying across the bus.
jamesmUnfortunately, we have not been able to get any documentation on these cards yet.
jamesmA userspace API is also being designed to allow applications (e.g. SSL, IKE)
jamesmto take advantage of available hardware.
jamesmThe userspace API will likely be a pseudo filesystem (cryptoapifs, perhaps), and character devices will be used for accessing the crypto features in the kernel and hardware
jamesmas the api works on pages, we should be able to do interesting things by mmaping the character devices
jamesmthe userspace api will also allow a much cleaner and more extensive testsuite to be developed
jamesmthe current test code is a kernel module which is very very ugly
jamesm<sarnold> jamesq: has there been discussion on using the openbsd /dev/crypto api itself?
jamesmyes, it would be nice to provide a compatibility layer, although it has not been analysed deeply yet
jamesmThe first steps for hardware support are obtaining cards, documentation and
jamesmwriting clean GPL drivers (i.e. a lot of work).
jamesme are trying to get
jamesmas many different types of cards as possible so that we understand
jamesmgeneric requirements
jamesmthis is where support for asymmetric crypto will be considered, as many cards offer this now, and it is much faster in hardware
jamesm<translator wait>
jamesmResources:
jamesmhttp://samba.org/~jamesm/crypto/  (updates, status, patches etc.)
jamesmhttp://www.kerneli.org/pipermail/cryptoapi-devel/ (development discussion)
jamesmKernel source files under the crypto directory, recent 2.5 kernels.
jamesmDocumentation under the Documentation/crypto directory (includes detailed credits).
jamesmThe March 2003 Linux Journal will have an article on the api.
jamesmthat's all i have prepared, so if anyone has any questions/discussion?
jamesm<addict> jamesm: could be nice to past this URL too: http://www.openbsd.org/crypto.html
jamesm<sarnold> jamesq: how would you suggest someone try to implement, e.g, RSA for the plugin api?
jamesmi don't know yet, but Jean-Luc Cooke has been working on it
jamesmsee http://jlcooke.ca/cryptoapi/pk/ and discussion on cryptoapi-devel
jamesmit's not an area that i've had time to look at in detail so far
jamesm<riel> jamesq: did you read my idea about "random ipsec" without authentication ?   does it look useful or does ipsec
jamesm+really need authentication to be useful ?
jamesmi seem to recall reading something about this in the last day or so, but can't remember the details
jamesmbut i believe ipsec generally needs authentication to be secure
jamesm<riel> basically the idea was to have a "default ipsec" thingy that negotiates encryption with unknown hosts
jamesm<riel> so a large percentage of internet traffic gets encrypted
jamesm<riel> and passive sniffing of bulk traffic becomes prohibitively expensive
jamesmi don't know the full cryptographic implications, it would need to be analysed further
jamesmit may actually open up new attacks
jamesm(i.e. if you decide to trust unauthenticated data)
jamesm<riel> jamesq: ahh, but it's not about real trust, it is about making passive sniffing of bulk traffic prohibitively
jamesm+expensive
jamesminteresting idea
jamesmare there any more questions on the api?
jamesmok, well that's the end of my presentation, i think there is some interest in a more general crypto discussion
sarnoldjamesq: any thoughts on theo's idea of setting aside one processor of an SMP machine for crypto tasks?
RicardoWe've moved the discussion en #qc here, people
RicardoYou can speak :)
rielsarnold: probably no the smartest idea
jamesmsarnold: not really
rielsarnold: then your network traffic has to pass from one CPU cache to RAM and then into the other CPU cache
jamesmalso,
jamesm<garoeda> how can a normal user benefit of this?
rielit'll probably be faster if each network packet only touches one CPU
addictsarnold: it will be many slower
jamesmthe main thing for users is integrated crypto in the kernel, so things like ipsec, disk encryption become part of the mainline kernel
viZardplas plas plas plas plas plas plas plas plas
viZardplas plas plas plas plas plas plas plas plas
viZardplas plas plas plas plas plas plas plas plas
viZardplas plas plas plas plas plas plas plas plas
gorogclap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap clap
viZardplas plas plas plas plas plas plas plas plas
viZardplas plas plas plas plas plas plas plas plas
viZardplas plas plas plas plas plas plas plas plas
addictstupid.
* riel buys jamesm a virtual beer
rielthanks for the talk
rielclap clap clap clap clap clap
rielclap clap clap clap clap clap
kroczCLAP
kroczCLAP
viZardaddict huh ?
seekerCLAP :)
sarnoldjamesm: do you think the encrypting block device needs the two scatter/gather lists to be implemented?
addicta big Clap is enough no ?
kroczyes
addictjamesm: thx a lot, merry christmas ;)
krocz:D
garoedaclap clap clap clap clap clap
garoedanice one
Aradoraddict: i don't see that in real life, why here? ;)
Aradori don't know a lot about ipsec and cryptography , but could riel elaborate a bit about that idea for dummies (as everybody says it seems interesting ;)?
jamesmsarnold: it needs either in/out scatterlists (difficult), or perhaps we provide direct access to the underlying crypto algorithms via api wrappers
* Ricardo wants to thank jamesm while he can (before continuing translating X))
sarnoldArador: normal ipsec requires both endpoints to be "authenticated" to each other
rielArador: jamesm is the crypto expert, I don't know much about it
sarnoldArador: which requires pre-established trust relationships
garoedaMJesus: you can pick up the #taee logs :-)
gorogwhy this lecture-series isn't in openprojects ircnetwork?
surrielTHANKS jamesm !!
jamesmthanks for waiting up everyone
sarnoldArador: riel's idea is that two endpoints that both speak ipsec should be able to talk to each other even if they can't authentication each other
surrielgorog: uninet has a bunch of events on different themes
sarnoldsurriel: take care :)
garoedajamesm: it was interesting
surrielgorog: UMEET is just one of many events
garoedasurriel: goodnight
sarnoldgorog: openprojects is free to do whatever lecture series they wish ;)
jamesm(also, i am not a crypto expert)
sarnoldArador: (err, speak to each other via encrypted/"authenticated" connections...)
jamesmwe're lucky to have support from some real cryptographers e.g. jlcooke, dag arne osvik
sarnoldArador: this would, if nothing else, make sniffing a network connection much more difficult -- it would require an active man in the middle attack
addictNiels Provos
sarnoldArador: and, intercepting an active session would be more difficult than without ipsec, though not as difficult as with full-authenticated ipsec
gorogok
gorogi go away
gorogbye all
sarnoldArador: if i'm not mistaken though, this is where IKE and pluto and .. ? other key-negotiation protocols come in handy; they should be able to negotiate keys on the fly with anyone
gorogand thx for jamesm
Aradorthat's, encrypt everything to ensure the traffic in general?
sarnoldArador: with other ipsec-aware endpoints, yes
addicteverything ?
Aradorwhen ipsec isn't available, i see
sarnoldArador: well, when there is no pre-existing trust relationship between two ipsec endpoints
sh0nXclap clap clap clap clap clap clap clap clap clap clap clap
sh0nXclap clap clap clap clap clap clap clap clap clap clap clap
sh0nXclap clap clap clap clap clap clap clap clap clap clap clap
sh0nXclap clap clap clap clap clap clap clap clap clap clap clap
sh0nXclap clap clap clap clap clap clap clap clap clap clap clap
sh0nXjust scrolled up ;-)
addicthehe
Aradorjamesm: thanks for the lecture ;)
seekerIs there any other talk for the next days?
sh0nXyes, thank you jamesm.
garoedaseeker: http://umeet.uninet.edu :-)
seekerthanks :)
sarnoldjamesm: thanks! :) I appreciated it :)
sh0nXer
sh0nXquestions: #qc  english: #redes ?
sh0nXperhaps
sarnoldafter Javier's talk, we will have two presentations on Gentoo :)
* garoeda thinks..interesting
sh0nXsarnold: that means people should be going #redes for english questions?
sarnoldsh0nX: or asking in #qc and hope someone translates :)
sh0nXhehe
sh0nX:)
Aradorsh0nX: or learn spanish NOW! :)
sarnoldRicardo: jejeje, i thought about that... :)
Ricardosarnold: mh?
mjcjejeje/
mjc?
sarnoldRicardo: thanks for fixing the accents :)
garoedanext talk is today, 22 utc..is this correct?
Ricardooh
Ricardo:-)
Ricardosarnold: I was more concerned about spelling correctly lecturer's surname O:)
sarnoldRicardo: hummm, i did miss 'n' didn't I? :(
addictgaroeda: yes
Ricardosarnold: don't worry :-)
addictDec, 15. 22:00 Seth Arnold. WireX Communications USA "Sardonix: making the most of our open source"
jamesmsarnold: no problems

Generated by irclog2html.pl 2.1 by Jeff Waugh - find it at freshmeat.net!