|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Wed, 03 Oct 2007
Instead of climbing evening.
I moved to climbing zone, started to warm up, saw number of interesting
people and then had known Grange's
recent happenings - they really deserved to be celebrated, so I moved
away (although I missed climbing lotto, but with my luck it was pretty useless)
and drunk with him til middle of the night. That was really fun.
I'm pretty sure things will move definitely not worse that right now,
so I expect some interesting happenings quite soon.
/life :: Link / Comments (0)
HIFN driver addons and crypto stack issues.
I decided to rewrite crypto session setup in HIFN
driver to allow multiple scatter-gather lists (which are
now transformed into pages) in single crypto session
(even though with multiple descriptor slots being used).
Main goal for this step is to allow encryption
of buffers, which are split into number of pages,
where each chunk is not block size aligned (for example
one page contains 2 bytes and another one 14 for single
datablock of 16 bytes). Second revision of driver does not
support such blocks yet.
To simplify this I started to use generic linux crypto
helpers blkcipher_walk_* from block ciphers.
But they do not allow to be called in interrupt context,
although all allocations are performed like they happen
in atomic context.
Rougly code looks like this (error processing ommitted):
struct blkcipher_walk walk;
blkcipher_walk_init(&walk, dst, src, nbytes);
blkcipher_walk_virt(desc, &walk);
while ((nbytes = walk.nbytes)) {
u8 *iv = encrypt();
memcpy(walk.iv, iv, ivsize);
nbytes &= blocksize - 1;
err = blkcipher_walk_done(desc, &walk, nbytes);
}
Above struct blkcipher_walk contains source and destination
page addresses, appropriate sizes and offsets. Variable desc
is a struct blkcipher_desc pointer, which contains
original parameters of crypto request.
/devel/acrypto/hifn :: Link / Comments (0)
|