aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
authorZoltan Sogor <weth@inf.u-szeged.hu>2007-12-07 03:53:23 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-10 16:16:35 -0500
commit0b77abb3b2d0c2eee1da79a3f3bd4312a0edb156 (patch)
tree0a782303f8b8a86f66fc95c830cdf69c78289084 /crypto/tcrypt.h
parent91755a921c4af51c355bcb74a98b717d5c1818b6 (diff)
[CRYPTO] lzo: Add LZO compression algorithm support
Add LZO compression algorithm support Signed-off-by: Zoltan Sogor <weth@inf.u-szeged.hu> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r--crypto/tcrypt.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index d3c380f5fe83..175f26a58e2d 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -7461,6 +7461,88 @@ static struct comp_testvec deflate_decomp_tv_template[] = {
7461}; 7461};
7462 7462
7463/* 7463/*
7464 * LZO test vectors (null-terminated strings).
7465 */
7466#define LZO_COMP_TEST_VECTORS 2
7467#define LZO_DECOMP_TEST_VECTORS 2
7468
7469static struct comp_testvec lzo_comp_tv_template[] = {
7470 {
7471 .inlen = 70,
7472 .outlen = 46,
7473 .input = "Join us now and share the software "
7474 "Join us now and share the software ",
7475 .output = { 0x00, 0x0d, 0x4a, 0x6f, 0x69, 0x6e, 0x20, 0x75,
7476 0x73, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x61, 0x6e,
7477 0x64, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x20,
7478 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74,
7479 0x77, 0x70, 0x01, 0x01, 0x4a, 0x6f, 0x69, 0x6e,
7480 0x3d, 0x88, 0x00, 0x11, 0x00, 0x00 },
7481 }, {
7482 .inlen = 159,
7483 .outlen = 133,
7484 .input = "This document describes a compression method based on the LZO "
7485 "compression algorithm. This document defines the application of "
7486 "the LZO algorithm used in UBIFS.",
7487 .output = { 0x00, 0x2b, 0x54, 0x68, 0x69, 0x73, 0x20, 0x64,
7488 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20,
7489 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
7490 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70,
7491 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20,
7492 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x62,
7493 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20,
7494 0x74, 0x68, 0x65, 0x20, 0x4c, 0x5a, 0x4f, 0x2b,
7495 0x8c, 0x00, 0x0d, 0x61, 0x6c, 0x67, 0x6f, 0x72,
7496 0x69, 0x74, 0x68, 0x6d, 0x2e, 0x20, 0x20, 0x54,
7497 0x68, 0x69, 0x73, 0x2a, 0x54, 0x01, 0x02, 0x66,
7498 0x69, 0x6e, 0x65, 0x73, 0x94, 0x06, 0x05, 0x61,
7499 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x76,
7500 0x0a, 0x6f, 0x66, 0x88, 0x02, 0x60, 0x09, 0x27,
7501 0xf0, 0x00, 0x0c, 0x20, 0x75, 0x73, 0x65, 0x64,
7502 0x20, 0x69, 0x6e, 0x20, 0x55, 0x42, 0x49, 0x46,
7503 0x53, 0x2e, 0x11, 0x00, 0x00 },
7504 },
7505};
7506
7507static struct comp_testvec lzo_decomp_tv_template[] = {
7508 {
7509 .inlen = 133,
7510 .outlen = 159,
7511 .input = { 0x00, 0x2b, 0x54, 0x68, 0x69, 0x73, 0x20, 0x64,
7512 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20,
7513 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
7514 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70,
7515 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20,
7516 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x62,
7517 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20,
7518 0x74, 0x68, 0x65, 0x20, 0x4c, 0x5a, 0x4f, 0x2b,
7519 0x8c, 0x00, 0x0d, 0x61, 0x6c, 0x67, 0x6f, 0x72,
7520 0x69, 0x74, 0x68, 0x6d, 0x2e, 0x20, 0x20, 0x54,
7521 0x68, 0x69, 0x73, 0x2a, 0x54, 0x01, 0x02, 0x66,
7522 0x69, 0x6e, 0x65, 0x73, 0x94, 0x06, 0x05, 0x61,
7523 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x76,
7524 0x0a, 0x6f, 0x66, 0x88, 0x02, 0x60, 0x09, 0x27,
7525 0xf0, 0x00, 0x0c, 0x20, 0x75, 0x73, 0x65, 0x64,
7526 0x20, 0x69, 0x6e, 0x20, 0x55, 0x42, 0x49, 0x46,
7527 0x53, 0x2e, 0x11, 0x00, 0x00 },
7528 .output = "This document describes a compression method based on the LZO "
7529 "compression algorithm. This document defines the application of "
7530 "the LZO algorithm used in UBIFS.",
7531 }, {
7532 .inlen = 46,
7533 .outlen = 70,
7534 .input = { 0x00, 0x0d, 0x4a, 0x6f, 0x69, 0x6e, 0x20, 0x75,
7535 0x73, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x61, 0x6e,
7536 0x64, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x20,
7537 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74,
7538 0x77, 0x70, 0x01, 0x01, 0x4a, 0x6f, 0x69, 0x6e,
7539 0x3d, 0x88, 0x00, 0x11, 0x00, 0x00 },
7540 .output = "Join us now and share the software "
7541 "Join us now and share the software ",
7542 },
7543};
7544
7545/*
7464 * Michael MIC test vectors from IEEE 802.11i 7546 * Michael MIC test vectors from IEEE 802.11i
7465 */ 7547 */
7466#define MICHAEL_MIC_TEST_VECTORS 6 7548#define MICHAEL_MIC_TEST_VECTORS 6