Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34263
b: refs/heads/master
c: b4c98f6
h: refs/heads/master
i:
  34261: 91f568d
  34259: e5fd78b
  34255: 893b1e4
v: v3
  • Loading branch information
Joel Becker authored and Mark Fasheh committed Sep 20, 2006
1 parent c4f08a4 commit 2f9a9c6
Show file tree
Hide file tree
Showing 450 changed files with 14,278 additions and 23,815 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: 6bbd9b6d694ff7242d63cda2faac4bd59ee4328e
refs/heads/master: b4c98f625fffee3a6f633082e9e4be3e952ca2ab
36 changes: 14 additions & 22 deletions trunk/Documentation/crypto/api-intro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ 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) and provide an
abstraction to the underlying algorithms. However, at the user
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
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, compress.c)
[transform ops] (per-type logic glue e.g. cipher.c, digest.c)
[algorithm api] (for registering algorithms)

The idea is to make the user interface and algorithm registration API
Expand All @@ -43,27 +44,22 @@ 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_hash *tfm;
struct hash_desc desc;
struct crypto_tfm *tfm;

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

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

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

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

crypto_free_hash(tfm);
crypto_free_tfm(tfm);


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

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


FURTHER INFORMATION

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


AUTHORS

James Morris
David S. Miller
Herbert Xu


CREDITS
Expand Down Expand Up @@ -243,11 +238,8 @@ 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:
Herbert Xu <herbert@gondor.apana.org.au>
James Morris <jmorris@redhat.com>

9 changes: 0 additions & 9 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1783,13 +1783,6 @@ 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 @@ -2452,8 +2445,6 @@ 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: 0 additions & 3 deletions trunk/arch/i386/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
#

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: 1 addition & 2 deletions trunk/arch/i386/crypto/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,12 @@ static void gen_tabs(void)
}

static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
unsigned int key_len)
unsigned int key_len, u32 *flags)
{
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 2f9a9c6

Please sign in to comment.