31 May, 2007
1 commit
-
Make sure that cryptd is marked as nonfreezable and does not hold up the
freezer.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Herbert Xu
19 May, 2007
1 commit
-
The function crypto_mod_put first frees the algorithm and then drops
the reference to its module. Unfortunately we read the module pointer
which after freeing the algorithm and that pointer sits inside the
object that we just freed.So this patch reads the module pointer out before we free the object.
Thanks to Luca Tettamanti for reporting this.
Signed-off-by: Herbert Xu
18 May, 2007
1 commit
-
The return value of crypto_hash_final isn't checked in test_hash_cycles.
This patch corrects this. Thanks to Eric Sesterhenn for reporting this.Signed-off-by: Herbert Xu
09 May, 2007
2 commits
-
Fix several typos in help text in Kconfig* files.
Signed-off-by: David Sterba
Signed-off-by: Adrian Bunk -
By the time kthread_run returns the param may have already been freed
so writing the returned thread_struct pointer to param is wrong.In fact, we don't need it in param anyway so this patch simply puts it
on the stack.Signed-off-by: Herbert Xu
02 May, 2007
8 commits
-
This patch adds the cryptd module which is a template that takes a
synchronous software crypto algorithm and converts it to an asynchronous
one by executing it in a kernel thread.Signed-off-by: Herbert Xu
-
As it is whenever a new algorithm with the same name is registered
users of the old algorithm will be removed so that they can take
advantage of the new algorithm. This presents a problem when the
new algorithm is not equivalent to the old algorithm. In particular,
the new algorithm might only function on top of the existing one.Hence we should not remove users unless they can make use of the
new algorithm.Signed-off-by: Herbert Xu
-
This patch allows the use of nested templates by allowing the use of
brackets inside a template parameter.Signed-off-by: Herbert Xu
-
This patch adds the mid-level interface for asynchronous block ciphers.
It also includes a generic queueing mechanism that can be used by other
asynchronous crypto operations in future.Signed-off-by: Herbert Xu
-
This patch passes the type/mask along when constructing instances of
templates. This is in preparation for templates that may support
multiple types of instances depending on what is requested. For example,
the planned software async crypto driver will use this construct.For the moment this allows us to check whether the instance constructed
is of the correct type and avoid returning success if the type does not
match.Signed-off-by: Herbert Xu
-
This patch converts the tcrypt module to use the asynchronous block cipher
interface. As all synchronous block ciphers can be used through the async
interface, tcrypt is still able to test them.Signed-off-by: Herbert Xu
-
This patch adds the frontend interface for asynchronous block ciphers.
In addition to the usual block cipher parameters, there is a callback
function pointer and a data pointer. The callback will be invoked only
if the encrypt/decrypt handlers return -EINPROGRESS. In other words,
if the return value of zero the completion handler (or the equivalent
code) needs to be invoked by the caller.The request structure is allocated and freed by the caller. Its size
is determined by calling crypto_ablkcipher_reqsize(). The helpers
ablkcipher_request_alloc/ablkcipher_request_free can be used to manage
the memory for a request.Signed-off-by: Herbert Xu
-
The proc functions were incorrectly marked as used rather than unused.
They may be unused if proc is disabled.Signed-off-by: Herbert Xu
28 Apr, 2007
1 commit
-
After 13 years of use, it looks like my email address is finally going
to disappear. While this is likely to drop the amount of incoming spam
greatly ;-), it may also affect more appropriate messages, so let's
update my email address in various places. In addition, Host AP mailing
list is subscribers-only and linux-wireless can also be used for
discussing issues related to this driver which is now shown in
MAINTAINERS.Signed-off-by: Jouni Malinen
Signed-off-by: John W. Linville
31 Mar, 2007
2 commits
-
On platforms where flush_dcache_page is needed we're currently flushing
the next page right than the one we've just processed. This patch fixes
the off-by-one error.Signed-off-by: Herbert Xu
-
In the scatterwalk_copychunks loop, We should be advancing by
len_this_page and not nbytes. The latter is the total length.Signed-off-by: Herbert Xu
21 Mar, 2007
2 commits
-
This patch fixes loading the tcrypt module while deflate isn't available
at all (isn't build).Signed-off-by: Sebastian Siewior
Signed-off-by: Herbert Xu -
In the loop in scatterwalk_copychunks(), if walk->offset is zero,
then scatterwalk_pagedone rounds that up to the nearest page boundary:walk->offset += PAGE_SIZE - 1;
walk->offset &= PAGE_MASK;which is a no-op in this case, so we don't advance to the next element
of the scatterlist array:if (walk->offset >= walk->sg->offset + walk->sg->length)
scatterwalk_start(walk, sg_next(walk->sg));and we end up copying the same data twice.
It appears that other callers of scatterwalk_{page}done first advance
walk->offset, so I believe that's the correct thing to do here.This caused a bug in NFS when run with krb5p security, which would
cause some writes to fail with permissions errors--for example, writes
of less than 8 bytes (the des blocksize) at the start of a file.A git-bisect shows the bug was originally introduced by
5c64097aa0f6dc4f27718ef47ca9a12538d62860, first in 2.6.19-rc1.Signed-off-by: "J. Bruce Fields"
Signed-off-by: Herbert Xu
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Feb, 2007
1 commit
-
Conflicts:
crypto/Kconfig
07 Feb, 2007
12 commits
-
This patch adds the code of Camellia code for testing module.
Signed-off-by: Noriaki TAKAMIYA
Signed-off-by: Herbert Xu -
This patch adds the main code of Camellia cipher algorithm.
Signed-off-by: Noriaki TAKAMIYA
Signed-off-by: Herbert Xu -
This patch adds the Kconfig entry for Camellia.
Signed-off-by: Noriaki TAKAMIYA
Signed-off-by: Herbert Xu -
This patch changes xcbc to use the new cipher encryt_one interface.
Signed-off-by: Herbert Xu
-
This patch adds support for multiple frontend types for each backend
algorithm by passing the type and mask through to the backend type
init function.Signed-off-by: Herbert Xu
-
This patch allows spawns of specific types (e.g., cipher) to be allocated.
Signed-off-by: Herbert Xu
-
This patch removes the old cipher interface and related code.
Signed-off-by: Herbert Xu
-
The crypto_comp conversion missed the last remaining crypto_alloc_tfm
call. This patch replaces it with crypto_alloc_comp.Signed-off-by: Herbert Xu
-
Add a crypto module to provide FCrypt encryption as used by RxRPC.
Signed-Off-By: David Howells
Signed-off-by: Herbert Xu -
Add PCBC crypto template support as used by RxRPC.
Signed-Off-By: David Howells
Signed-off-by: Herbert Xu -
This patch adds tests for SHA384 HMAC and SHA512 HMAC to the tcrypt module. Test data was taken from
RFC4231. This patch is a follow-up to the discovery (bug 7646) that the kernel SHA384 HMAC
implementation was not generating proper SHA384 HMACs.Signed-off-by: Andrew Donofrio
Signed-off-by: Herbert Xu -
Using blkcipher/hash crypto operations in hard IRQ context can lead
to random memory corruption due to the reuse of kmap_atomic slots.
Since crypto operations were never meant to be used in hard IRQ
contexts, this patch checks for such usage and returns an error
before kmap_atomic is performed.Signed-off-by: Herbert Xu
06 Feb, 2007
1 commit
-
This patch moves the config options for the s390 crypto instructions
to the standard "Hardware crypto devices" menu. In addition some
cleanup has been done: use a flag for supported keylengths, add a
warning about machien limitation, return ENOTSUPP in case the
hardware has no support, remove superfluous printks and update
email addresses.Signed-off-by: Jan Glauber
Signed-off-by: Martin Schwidefsky
14 Dec, 2006
1 commit
-
Remove useless includes of linux/io.h, don't even try to build iomap_copy
on uml (it doesn't have readb() et.al., so...)Signed-off-by: Al Viro
Acked-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Dec, 2006
1 commit
-
The SHA384 block size should be 128 bytes, not 96 bytes. This was
spotted by Andrew Donofrio.Fortunately the block size isn't actually used anywhere so this typo
has had no real impact.Signed-off-by: Herbert Xu
07 Dec, 2006
5 commits
-
Fixes:
crypto/lrw.c:99: warning: conflicting types for built-in function ‘round’
Signed-off-by: David S. Miller
-
Do modprobe tcrypt mode=10 to check the included test vectors, they are
from: http://grouper.ieee.org/groups/1619/email/pdf00017.pdf and from
http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html.To make the last test vector fit, I had to increase the buffer size of
input and result to 512 bytes.Signed-off-by: Rik Snel
Signed-off-by: Herbert Xu -
Main module, this implements the Liskov Rivest Wagner block cipher mode
in the new blockcipher API. The implementation is based on ecb.c.The LRW-32-AES specification I used can be found at:
http://grouper.ieee.org/groups/1619/email/pdf00017.pdfIt implements the optimization specified as optional in the
specification, and in addition it uses optimized multiplication
routines from gf128mul.c.Since gf128mul.[ch] is not tested on bigendian, this cipher mode
may currently fail badly on bigendian machines.Signed-off-by: Rik Snel
Signed-off-by: Herbert Xu -
A lot of cypher modes need multiplications in GF(2^128). LRW, ABL, GCM...
I use functions from this library in my LRW implementation and I will
also use them in my ABL (Arbitrary Block Length, an unencumbered (correct
me if I am wrong, wide block cipher mode).Elements of GF(2^128) must be presented as u128 *, it encourages automatic
and proper alignment.The library contains support for two different representations of GF(2^128),
see the comment in gf128mul.h. There different levels of optimization
(memory/speed tradeoff).The code is based on work by Dr Brian Gladman. Notable changes:
- deletion of two optimization modes
- change from u32 to u64 for faster handling on 64bit machines
- support for 'bbe' representation in addition to the, already implemented,
'lle' representation.
- move 'inline void' functions from header to 'static void' in the
source file
- update to use the linux coding style conventionsThe original can be found at:
http://fp.gladman.plus.com/AES/modes.vc8.19-06-06.zipThe copyright (and GPL statement) of the original author is preserved.
Signed-off-by: Rik Snel
Signed-off-by: Herbert Xu -
This patch removes the following no longer used functions:
- api.c: crypto_alg_available()
- digest.c: crypto_digest_init()
- digest.c: crypto_digest_update()
- digest.c: crypto_digest_final()
- digest.c: crypto_digest_digest()Signed-off-by: Adrian Bunk
Signed-off-by: Herbert Xu