Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35345
b: refs/heads/master
c: 28eb177
h: refs/heads/master
i:
  35343: 23caeef
v: v3
  • Loading branch information
Jeff Garzik committed Sep 23, 2006
1 parent 57bbbf2 commit 1e01c64
Show file tree
Hide file tree
Showing 633 changed files with 50,611 additions and 17,266 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd8ae94eea9bb4269d6dff1b47b9dc741bd70d0b
refs/heads/master: 28eb177dfa5982d132edceed891cb3885df258bb
36 changes: 22 additions & 14 deletions trunk/Documentation/crypto/api-intro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ At the lowest level are algorithms, which register dynamically with the
API.

'Transforms' are user-instantiated objects, which maintain state, handle all
of the implementation logic (e.g. manipulating page vectors), provide an
abstraction to the underlying algorithms, and handle common logical
operations (e.g. cipher modes, HMAC for digests). However, at the user
of the implementation logic (e.g. manipulating page vectors) and provide an
abstraction to the underlying algorithms. However, at the user
level they are very simple.

Conceptually, the API layering looks like this:

[transform api] (user interface)
[transform ops] (per-type logic glue e.g. cipher.c, digest.c)
[transform ops] (per-type logic glue e.g. cipher.c, compress.c)
[algorithm api] (for registering algorithms)

The idea is to make the user interface and algorithm registration API
Expand All @@ -44,22 +43,27 @@ under development.
Here's an example of how to use the API:

#include <linux/crypto.h>
#include <linux/err.h>
#include <linux/scatterlist.h>

struct scatterlist sg[2];
char result[128];
struct crypto_tfm *tfm;
struct crypto_hash *tfm;
struct hash_desc desc;

tfm = crypto_alloc_tfm("md5", 0);
if (tfm == NULL)
tfm = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(tfm))
fail();

/* ... set up the scatterlists ... */

desc.tfm = tfm;
desc.flags = 0;

crypto_digest_init(tfm);
crypto_digest_update(tfm, &sg, 2);
crypto_digest_final(tfm, result);
if (crypto_hash_digest(&desc, &sg, 2, result))
fail();

crypto_free_tfm(tfm);
crypto_free_hash(tfm);


Many real examples are available in the regression test module (tcrypt.c).
Expand Down Expand Up @@ -126,21 +130,22 @@ might already be working on.
BUGS

Send bug reports to:
James Morris <jmorris@redhat.com>
Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@redhat.com>


FURTHER INFORMATION

For further patches and various updates, including the current TODO
list, see:
http://samba.org/~jamesm/crypto/
http://gondor.apana.org.au/~herbert/crypto/


AUTHORS

James Morris
David S. Miller
Herbert Xu


CREDITS
Expand Down Expand Up @@ -238,8 +243,11 @@ Anubis algorithm contributors:
Tiger algorithm contributors:
Aaron Grothe

VIA PadLock contributors:
Michal Ludvig

Generic scatterwalk code by Adam J. Richter <adam@yggdrasil.com>

Please send any credits updates or corrections to:
James Morris <jmorris@redhat.com>
Herbert Xu <herbert@gondor.apana.org.au>

25 changes: 25 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ L: info-linux@geode.amd.com
W: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
S: Supported

AMSO1100 RNIC DRIVER
P: Tom Tucker
M: tom@opengridcomputing.com
P: Steve Wise
M: swise@opengridcomputing.com
L: openib-general@openib.org
S: Maintained

AOA (Apple Onboard Audio) ALSA DRIVER
P: Johannes Berg
M: johannes@sipsolutions.net
Expand Down Expand Up @@ -991,6 +999,14 @@ EFS FILESYSTEM
W: http://aeschi.ch.eu.org/efs/
S: Orphan

EHCA (IBM GX bus InfiniBand adapter) DRIVER:
P: Hoang-Nam Nguyen
M: hnguyen@de.ibm.com
P: Christoph Raisch
M: raisch@de.ibm.com
L: openib-general@openib.org
S: Supported

EMU10K1 SOUND DRIVER
P: James Courtier-Dutton
M: James@superbug.demon.co.uk
Expand Down Expand Up @@ -1783,6 +1799,13 @@ W: http://www.penguinppc.org/
L: linuxppc-embedded@ozlabs.org
S: Maintained

LINUX FOR POWERPC PA SEMI PWRFICIENT
P: Olof Johansson
M: olof@lixom.net
W: http://www.pasemi.com/
L: linuxppc-dev@ozlabs.org
S: Supported

LLC (802.2)
P: Arnaldo Carvalho de Melo
M: acme@conectiva.com.br
Expand Down Expand Up @@ -2451,6 +2474,8 @@ S: Maintained
S390
P: Martin Schwidefsky
M: schwidefsky@de.ibm.com
P: Heiko Carstens
M: heiko.carstens@de.ibm.com
M: linux390@de.ibm.com
L: linux-390@vm.marist.edu
W: http://www.ibm.com/developerworks/linux/linux390/
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/i386/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
#

obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o

aes-i586-y := aes-i586-asm.o aes.o
twofish-i586-y := twofish-i586-asm.o twofish.o

3 changes: 2 additions & 1 deletion trunk/arch/i386/crypto/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,13 @@ static void gen_tabs(void)
}

static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len, u32 *flags)
unsigned int key_len)
{
int i;
u32 ss[8];
struct aes_ctx *ctx = crypto_tfm_ctx(tfm);
const __le32 *key = (const __le32 *)in_key;
u32 *flags = &tfm->crt_flags;

/* encryption schedule */

Expand Down
Loading

0 comments on commit 1e01c64

Please sign in to comment.