diff -Nru linux-2.4.0-test9/Documentation/Configure.help linux-2.4.0-test9-int/Documentation/Configure.help --- linux-2.4.0-test9/Documentation/Configure.help Sat Sep 23 02:11:37 2000 +++ linux-2.4.0-test9-int/Documentation/Configure.help Sun Oct 15 12:20:50 2000 @@ -326,6 +326,18 @@ Most users will answer N here. +General encryption support (EXPERIMENTAL)' +CONFIG_BLK_DEV_LOOP_GEN + [2000-07-06] + If you answer yes to this option, the loop-driver will support all + crypto algorithms selected in the crypto library (see the 'Crypto' + menu entry in the main menu). + + This loop module will use the ciphers in CBC-mode which is more + secure than ECB-mode. This module will also initialize the CBC-mode + of the cipher with the block-number of the block being encrypted. + + Network Block Device support CONFIG_BLK_DEV_NBD Saying Y here will allow your computer to be a client for network diff -Nru linux-2.4.0-test9/Documentation/crypto/ChangeLog linux-2.4.0-test9-int/Documentation/crypto/ChangeLog --- linux-2.4.0-test9/Documentation/crypto/ChangeLog Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/Documentation/crypto/ChangeLog Sun Oct 15 12:20:50 2000 @@ -0,0 +1,498 @@ +2000-07-06 Alexander Kjeldaas + + * International kernel patch 2.4.0-test2.1 released. + + * Ported the crypto API and loop_gen.c from international kernel + patch 2.2.16.5 to 2.4.0-test2. Ciphers will follow.. + +2000-07-03 Alexander Kjeldaas + + * International kernel patch 2.2.16.5 released. + + * Removed {un,}lock_cipher, {un,}lock_digest functions. Use + {digest,cipher}_implementation->{un,}lock() directly instead. + + * Stopped using linux/lists.h which is depreciated. + + * Merged crypto/cipherapi.c and crypto/digestapi.c into single + interface cryptoapi.c, saving 4k. Cipher- and digest algorithms + are now subclasses of a "transform". The old interface is still + supported for the most part. + + * Changed encrypt/decrypt interfaces to use byte-pointers instead + of int32-pointers. This means that the ciphers should start being + endian-aware. + +2000-06-27 Alexander Kjeldaas + + * International kernel patch 2.2.16.4 released. + * Fixed build bug that prevented digestapi.c from being built for + kernels with modules disabled. Fix by + Andreas Steinmetz + +2000-06-19 Alexander Kjeldaas + + * International kernel patch 2.2.16.3 released. + * Changed generic_rotl and generic_rotr to be macros instead of + inline functions. Gcc uses an extra register with the inline + functions (noted by Gisle Sælensminde). + * Fixed bug in Makefile for SHA1 digest (noted by Walter Hofmann + ). + +2000-06-19 Gisle Sælensminde + + * Further serpent implementation optimization. + +2000-06-14 Alexander Kjeldaas + + * International kernel patch 2.2.16.2 released. + * Fixed bug in md5c.c:Decode for big-endian machines. Noted by + David Kuestler . + +2000-06-14 Gisle Sælensminde + + * Faster serpent implementation based on optimized pentium-sboxes + made by Dag Arne Osvik. + +2000-06-14 Hauke Johannknecht + + * Documentation updates (replay.com -> zedz.com) + * Added util-linux-2.10m.int.patch + +2000-06-14 Alexander Kjeldaas + + * International kernel patch 2.2.16.1 released. + * International kernel patch 2.2.15.1 released. + +2000-02-18 Alexander Kjeldaas + + * International kernel patch 2.2.14.1 released. + +1999-11-23 Alexander Kjeldaas + + * International kernel patch 2.2.13.3 released. + + * Minor tweak to make sure the FreeSWAN 1.1 release patches cleanly. + +1999-11-23 Andrew McDonald + + * SHA1 implementation for the digest API added (based on the + public domain code by Steve Reid and the md5glue code). + + * Added a digest algorithm test program in linux/crypto/testing/ + + * FIX: The blowfish module claimed to have a 128-bit (16 byte) + blocksize and IV. The correct number is of course 64-bit. + + * FIX: The working size for MD5 was wrong (too little memory was + allocated). + +1999-10-25 Alexander Kjeldaas + + * International kernel patch 2.2.13.2 released. + + * Compile fix for MD5 by Hermann Schichl + +1999-10-20 Alexander Kjeldaas + + * International kernel patch 2.2.13.1 released. + + * New upstream kernel release. + +1999-09-15 Alexander Kjeldaas + + * International kernel patch 2.2.12.2 released. + + * Digest API mirroring the cipher API added. Contributed by Alan + Smithee. + + * MD5 digest algorithm added. + +1999-09-08 Alexander Kjeldaas + + * International kernel patch 2.2.12.1 released. + +1999-09-06 Alexander Kjeldaas + + * Updated util-linux patch in Documentation/crypto and removed + some patches that nobody uses. + +1999-08-12 Alexander Kjeldaas + + * International kernel patch 2.2.11.2 released. + + * CIPE can only be built as a module, the make config indicated + otherwise. + + * Upgraded to CIPE 1.3.0 + + * International kernel patch 2.2.11.1 released. + + * New upstream kernel release. + +1999-06-24 Alexander Kjeldaas + + * International kernel patch 2.2.10.4 released. + + * Added new config option for using relative block numbers instead + of absolute ones when calling the loop block device's transfer + function. This should fix the #1 issue with using loopback crypto + filesystems. + + * Updated Documentation/Configure.help which had erroneous + CONFIG_XX variables listed for various ciphers [Thanks to Andrew + Pam for spotting this]. + + * Added LO_CRYPT_RIJNDAEL and LO_CRYPT_RC5 variables to + include/linux/loop.h. + + * Updated the faq to mention rijndael and rc5, as well as how to + convert from the old absolute block number stuff to the new + relative one. + +1999-06-24 Alexander Kjeldaas + + * International kernel patch 2.2.10.3 released. + +1999-06-24 Andrew Pam + + * Updated util-linux patch to cover 2.9s + +1999-06-23 Alexander Kjeldaas + + * International kernel patch 2.2.10.2 released. + * Stuff in linux/crypto/testing didn't compile. + +1999-06-19 Pekka Riikonen + + * Added RC5 cipher. + +1999-06-18 Alexander Kjeldaas + + * International kernel patch 2.2.10.1 released. + * ENskip support didn't compile. + +1999-05-21 Alexander Kjeldaas + + * International kernel patch 2.2.9.1 released. + +1998-12-18 Patrice Lacroix + + * Updates to the faq (Documentation/crypto/faq.txt) + +1999-04-15 Alexander Kjeldaas + + * International kernel patch 2.2.5.1 released. + * Merged with kernel 2.2.5 + * New documentation for loopback crypto in + Documentation/crypto/faq.txt + +1999-03-25 Alexander Kjeldaas + + * International kernel patch 2.2.4.1 released. + * Merged with kernel 2.2.4 + +1999-01-29 Alexander Kjeldaas + + * International kernel patch 2.2.1.1 released. + +1998-01-29 Patrice Lacroix + + * /proc/crypto support. + +1999-01-27 Alexander Kjeldaas + + * International kernel patch 2.2.0.2 released. + + * missing #endif in net/ipv4/ip_output.c in latest patch + fixed. Missing #include fixed in crypto.h + +1999-01-26 Alexander Kjeldaas + + * International kernel patch 2.2.0.1 released. + + * Merged Frank Bernard's latest ENskip patches. + +1999-01-18 Alexander Kjeldaas + + * International kernel patch 2.2.0-pre7.4 released. + + * Added cbc-mode to cast256 cipher. + + * Removed spam on unload from crypto modules. + + * Added updated ENskip patches from Frank Bernard's web site: + http://www.linux-firewall.de/enskip/ + + * International kernel patch 2.2.0-pre7.3 released. + + * Added missing cleanup_module to DES, Blowfish and IDEA ciphers. + + * International kernel patch 2.2.0-pre7.2 released. + + * Cleanup in drivers/block/Config.in. It was possible to create + an invalid .config file. + + * Minor crypto/api.c cleanup. + +1999-01-17 Alexander Kjeldaas + + * International kernel patch 2.2.0-pre7.1 released. + + * Added testcip.c - a general purpose cipher test program. Added + test-vector scripts for Blowfish, DES, Mars, and Serpent. + + * Naming error left users unable to compile loop_gen unless it was + compiled as a module. + + * Updated Serpent implementation. Sam Simpson has been running a + background task on a cluster of high performance servers. After a + search involving around 1000 machine hours improved sboxes were + found. + + * Updated RC6 implementation. Supposedly faster. + + * Updated MARS implementation. Fixes a bug in mars_set_key. + +1999-01-07 Alexander Kjeldaas + + * International kernel patch 2.2.0-pre5.1 released. + * Merged with vanilla 2.2.0-pre5 + +1999-01-05 Herbert Valerio Riedel + + * APX fixes. + +1999-01-04 Alexander Kjeldaas + + * International kernel patch 2.2.0-pre4.1 released. + + * Removed obsolete loop_idea.c and loop_blow.c since IDEA and + blowfish algorithms have been added to the crypto library. + + * drivers/block/ll_rw_blk.c: Added loop_gen_init. loop_gen only + worked as a module. + +1998-12-30 Alexander Kjeldaas + + * crypto/testing/speed.c: i386-specific timer-code removed. + + * crypto configuration added for all architectures (previously + only i386 was supported). However, 64-bit and endian issues needs + to be ironed out for a lot of platforms (maybe even i386). + +1998-12-29 Alexander Kjeldaas + + * International kernel patch 2.2.0-pre1.1 released. + * International kernel patch 2.1.131.8 released. + * DES/IDEA compile fixes. + +1998-12-29 Raimar Falke + + * DES cipher added. crypto/testing/speed.c fixes. + +1998-12-18 Alexander Kjeldaas + + * International kernel patch 2.1.131.7 released. + +1998-12-18 Raimar Falke + + * include-fixes for IDEA cipher. + +1998-12-18 Alexander Kjeldaas + + * International kernel patch 2.1.131.6 released. + +1998-12-18 Raimar Falke + + * IDEA cipher added. + +1998-12-18 Patrice Lacroix + + * My latest patch for modular loop encryption. I think everything + is in there. Ciphers are only requested on LOOP_SET_STATUS. Module + count is always right (for what I have tested) and unloading now + works. + +1998-12-17 Alexander Kjeldaas + + * International kernel patch 2.1.131.5 released. + +1998-12-17 Raimar Falke + + * Extracted the blowfish code from loop_blow and made a + cipher-module of it. + +1998-12-17 Alexander Kjeldaas + + * Removed loop_serpent, loop_mars, loop_dfc and loop_rc6 since + their funcionality is available through loop_gen. + +1998-12-16 Alexander Kjeldaas + + * Removed loop_idea from the configuration menus. It hasn't been + converted to the new API. + +1998-12-14 Alexander Kjeldaas + + * Fixes to the rijndael cipher. It builds, but isn't working + properly so it it disabled for the moment. The cipher is from + Dr. Brian Gladman AES + reimplementation project. More information on rijndael: + http://www.esat.kuleuven.ac.be/~rijmen/rijndael/ Rijndael is free. + +1998-12-14 Patrice Lacroix + + * More modular ciphers/loop patches. Cipher locking fixes. + Autoloading of ciphers. More loop and loop_gen integration. + +1998-12-14 Alexander Kjeldaas + + * International kernel patch 2.1.131.4 released. + + * Added util-linux-2.9e patch to Documentation/crypto that makes + all the loopback ciphers available to the losetup utility. + +1998-12-12 Alexander Kjeldaas + + * International kernel patch 2.1.131.3 released. + + * Added the popular CIPE (crypto IP encapsulation) made by + Olaf Titz + + * Previous patch wouldn't build. International kernel patch + 2.1.131.2 released. + +1998-12-11 Alexander Kjeldaas + + * International kernel patch 2.1.131.1 released. + + * Clear sensitive memory before kfree in generel loop module. New + upstream kernel. + +1998-12-11 Patrice Lacroix + + * Modular ciphers + +1998-11-30 Alexander Kjeldaas + + * International kernel patch 2.1.130.1 released. + + * loop-devices other than loop_gen updated to use new interface. + However, the block-number isn't used for anything yet. + + * loop_gen.c: Now we use the ciphers in cbc-mode only. Also, the + IV of the cipher is initialized based on block-number. + + * Added general cbc-mode that is simply #included into the + ciphers. cbc-mode thus added to serpent, mars, rc6 and dfc. + + * Added ivsize to struct cipher_implementation. + + * Added for_each_cipher function + + * Added X11-like license for the crypto-directory. The code might + be useable for other projects as well in the future. [And GPL is + arguable the wrong license for crypto]. + +1998-11-25 Alexander Kjeldaas + + * The crypto api is useable from modules. + + * Fixed a bunch of bugs in loop_gen. I think the oopses are gone. + +1998-11-23 Alexander Kjeldaas + + * International kernel patch 2.1.129.4 released. + + * Added crypto/testing/speed.c to test the speed of the different + crypto algorithms. + + * cast256, crypton, rijndael, safer, and twofish added, but they + are not yet completely ported to the crypto-library. + + * Updated implementations of MARS, DFC, RC6 and SERPENT. + +1998-11-22 Alexander Kjeldaas + + * International kernel patch 2.1.129.3 released. + + * "loop_gen" - skeleton of general loop crypto driver added + + * Made loop-modules for DFC, MARS, and RC6 + + * Added DFC, MARS, and RC6 to crypto library + + * International kernel patch 2.1.129.2 released. + + * Updated documentation to show which loopback modules are ECB + and which are CBC. + + * Kernel crypto library on its way. Serpent is the first member. + + * Changed memcpy to memset in loop_blow.c to close a possible + plaintext leak. + +1998-11-20 Alexander Kjeldaas + + * New upstream kernel release 2.1.129 + +1998-11-13 Alexander Kjeldaas + + * New upstream kernel release 2.1.128 + +1998-11-09 Alexander Kjeldaas + + * New upstream kernel release 2.1.127 + +1998-10-12 Alexander Kjeldaas + + * drivers/block/loop_serpent.c: Made wrapper-module for the + serpent cipher. + + * crypto/serpent.c crypto/serpent_f_box.h}: Added serpent + implementation from Dr. B R Gladman + AES reimplementation project. + + * drivers/block/Config.in: Loopback crypto flagged experimental + +1998-10-09 Alexander Kjeldaas + + * International kernel patch 2.1.125.1 released. + + * New upstream kernel release 2.1.125 + +1998-10-08 Alexander Kjeldaas + + * International kernel patch 2.1.124.2 released. + + * Added Andi Kleene's loop fixes. Updated twofish, blowfish and + cast128 modules to use the new lock/unlock interface. + +1998-10-07 Alexander Kjeldaas + + * Ported loop_cast.c to the new loopback API interface. + + * Blowfish and Twofish can be compiled in instead of being + modules. + + * Added cast and idea to the config-system. + + * Wrote Configure.help entries for the loop crypto patches. + +1998-10-05 Alexander Kjeldaas + + * International kernel patch 2.1.124.1 released. + + * Added cast128 and idea loopback modules from Andrew E. Mileski's + loop-13.tar.gz package. + + * Added latest ENskip patches from Bob Tracy + +1998-10-05 Ingo Rohloff + + * Fixed bug in loop.c regarding handling of calls to + loop_release_xfer() + + * Added modules for blowfish and twofish to the loopback + filesystem diff -Nru linux-2.4.0-test9/Documentation/crypto/faq.txt linux-2.4.0-test9-int/Documentation/crypto/faq.txt --- linux-2.4.0-test9/Documentation/crypto/faq.txt Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/Documentation/crypto/faq.txt Sun Oct 15 12:20:50 2000 @@ -0,0 +1,159 @@ +Questions and answers concerning crypto and looppack device +By Patrice Lacroix +Last update: 1999-05-21 + +1) What is the crypto API? + +It allow other parts of the kernel to use crypto in a generic way, +most notably the loopback device driver (loop_gen.c). + + +2) What is loop_gen? + +First, you should already be familiar with basic loopback device. See +losetup(1) for more info. + +Loop_gen is the generic encryption layer for the loopback driver. +It uses the crypto API to do encryption. It works with every ciphers +supported by the crypto API. Not all ciphers in the crypto library +support the API yet. + +Loop_gen (and the crypto api) will eventually replace all other loopback +encryption modules. + +Loop_gen use all supported ciphers in CBC mode. + + +3) What can I do with loop_gen? + +The basic loopback device driver allow you to use a file as a block +device. With loop_gen, data in the file associated with the loopback +block device can be encrypted with strong crypto. + +You can use the result as any other block device. If you create a file +system and mount it, then every file in the file system will be +automaticly encrypted. + + +4) Can I use all this as modules? + +Sure! In make menuconfig (or whatever), under Crypto options, say M to +Crypto ciphers and to the ciphers you want. Under Block Device, say M to +loopback device and to General Encryption Support. Don't select any other +encryption modules unless you can't live without them and they are +no longer suported by the crypto API. + +Build your kernel and modules, make modules_install, reboot, depmod -a + +In /etc/conf.modules, add: + +alias loop-xfer-gen-0 loop_gen +alias loop-xfer-gen-10 loop_gen +alias cipher-2 des +alias cipher-4 blowfish +alias cipher-6 idea +alias cipher-7 serp6f +alias cipher-8 mars6 +alias cipher-11 rc62 +alias cipher-15 dfc2 +alias cipher-16 rijndael +alias cipher-17 rc5 + + +5) Why all those funny numbers? + +In short, the kernel know ciphers only by number. If you really want to know +how it works, you can grep request_module in linux/crypto/api.c and +linux/drivers/block/loop.c. + + +6) I get "Unsupported encryption type" when I use losetup or mount. What's + wrong? + +You need a version of losetup and mount that understand new encryption +types. To get it, you probably have to apply the util-linux patch you can +find in linux/Documentation/crypto and rebuild mount and losetup. + + +7) Can I stack loop devices and encryption? + +Yes! + + +6) I can't access the content of my encrypted file system since I + moved the backing file to a new partition. Why? + +This is because when a block of data is encrypted with loop_gen, +its IV for CBC encryption is set to the real block where the +file is located on the block device underneath it. So when the +encrypted file system is physically moved on a block device, the +IV used for encryption and decryption change, and data can't be +decrypted correctly. + +As of patch-int-2.2.10.4, you should answer 'Y' to the question 'Use +relative block numbers as basis for transfer functions (RECOMMENDED)' +to avoid this problem. + +Another solution is to losetup your file once without using crypto and +then losetup again the first loopback block device to add +encryption. Since the encryption will always be from block 0 (inside +the first loopback device), the IV for CBC encryption will be the same +no matter where the original file is located. + +Ex: + +# losetup /dev/loop0 encfs.loop +# losetup -e blowfish /dev/loop1 /dev/loop0 +Password: (not shown) +# mount /dev/loop1 /mnt + +(here you can access the fs under /mnt...) + +(and to destroy loopback devices...) + +# umount /mnt +# losetup -d /dev/loop1 +# losetup -d /dev/loop0 + +With this solution, you can do backup of your encrypted data +(which is a good thing) but it's more complexe and it's probably +less secure (which is a bad thing). + + +7) Since patch-int-2.2.10.4 I can't access my encrypted device. + +As of patch-int-2.2.10.4, the encrypted files will be incompatible +with older files if you answer 'Y' to the question 'Use relative block +numbers as basis for transfer functions (RECOMMENDED)'. To be able to +back up your encrypted files in the future, you should convert to the +new layout [which uses relative block numbers as IV to the cipher +instead of absolute ones]. This can be accomplished by doing +something like the following: + + +# losetup -e mypreferredcipher /dev/loop0 /myfile + +# dd if=/dev/loop0 of=tmpfile +# losetup -d /dev/loop0 + + +# losetup -e mypreferredcipher /dev/loop0 /myfile + +# dd if=tmpfile of=/dev/loop0 +# dd if=/dev/zero of=tmpfile bs=1k count= +or you could download some of the special software used for wiping +magnetic media such as wipe from +http://gsu.linux.org.tr/wipe/ + +8) I made an encrypted filesystem on my hard-disk and tried to burn it + on a CD. Now I can't get the CD to work properly. + +This is a current limitation in the loop device code. The block size +(the smalles number of bytes that can be read) of a hard-disk is +smaller than the block size of a CD-ROM. This causes problems since +the block size dictates how many bytes are encrypted as a block. + +There is no solution to this problem at this time, but it isn't hard +to fix. Contact me (Alexander Kjeldaas ) if you're +willing to work on this problem. + diff -Nru linux-2.4.0-test9/Documentation/crypto/util-linux-2.10m.int.patch linux-2.4.0-test9-int/Documentation/crypto/util-linux-2.10m.int.patch --- linux-2.4.0-test9/Documentation/crypto/util-linux-2.10m.int.patch Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/Documentation/crypto/util-linux-2.10m.int.patch Sun Oct 15 12:20:50 2000 @@ -0,0 +1,633 @@ +diff -uNr util-linux-2.10m/MCONFIG util-linux-2.10m.int/MCONFIG +--- util-linux-2.10m/MCONFIG Mon May 15 00:23:49 2000 ++++ util-linux-2.10m.int/MCONFIG Mon May 22 20:06:41 2000 +@@ -16,7 +16,7 @@ + # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp + # will use PAM for authentication. Additionally, passwd will not be + # installed as it is not PAM aware. +-HAVE_PAM=no ++HAVE_PAM=yes + + # If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd, + # and vipw will not be built or installed from the login-utils +diff -uNr util-linux-2.10m/mount/Makefile util-linux-2.10m.int/mount/Makefile +--- util-linux-2.10m/mount/Makefile Wed Apr 19 00:51:27 2000 ++++ util-linux-2.10m.int/mount/Makefile Mon May 22 20:07:45 2000 +@@ -30,7 +30,7 @@ + GEN_FILES = nfsmount.h nfsmount_xdr.c nfsmount_clnt.c + + # comment these out if you are not compiling in loop support +-LO_OBJS=lomount.o ++LO_OBJS=lomount.o rmd160.o + + all: $(PROGS) + +@@ -62,7 +62,7 @@ + $(COMPILE) -DMAIN lomount.c + mv lomount.o losetup.o + +-losetup: losetup.o ++losetup: losetup.o rmd160.o + $(LINK) $^ -o $@ + + mount.o umount.o nfsmount.o losetup.o fstab.o realpath.o sundries.o: sundries.h +diff -uNr util-linux-2.10m/mount/lomount.c util-linux-2.10m.int/mount/lomount.c +--- util-linux-2.10m/mount/lomount.c Tue Apr 18 23:48:34 2000 ++++ util-linux-2.10m.int/mount/lomount.c Mon May 22 20:35:29 2000 +@@ -27,6 +27,7 @@ + + #include "loop.h" + #include "lomount.h" ++#include "rmd160.h" + #include "nls.h" + + extern int verbose; +@@ -42,6 +43,14 @@ + { LO_CRYPT_NONE, "none" }, + { LO_CRYPT_XOR, "xor" }, + { LO_CRYPT_DES, "DES" }, ++ { LO_CRYPT_FISH2, "twofish" }, ++ { LO_CRYPT_BLOW, "blowfish"}, ++ { LO_CRYPT_CAST128, "cast128"}, ++ { LO_CRYPT_SERPENT, "serpent"}, ++ { LO_CRYPT_MARS, "mars" }, ++ { LO_CRYPT_RC6, "rc6" }, ++ { LO_CRYPT_DFC, "dfc" }, ++ { LO_CRYPT_IDEA, "idea"}, + { -1, NULL } + }; + +@@ -218,6 +227,7 @@ + loopinfo.lo_encrypt_key_size = strlen(loopinfo.lo_encrypt_key); + break; + case LO_CRYPT_DES: ++ printf(_("WARNING: Use of DES is depreciated.\n")); + pass = getpass (_("Password: ")); + strncpy (loopinfo.lo_encrypt_key, pass, 8); + loopinfo.lo_encrypt_key[8] = 0; +@@ -234,6 +244,22 @@ + return 1; + } + break; ++ case LO_CRYPT_FISH2: ++ case LO_CRYPT_BLOW: ++ pass = getpass("Password :"); ++ MDcalc((byte *)loopinfo.lo_encrypt_key,pass,strlen(pass)); ++ loopinfo.lo_encrypt_key_size=20; /* 160 Bit key */ ++ break; ++ case LO_CRYPT_IDEA: ++ case LO_CRYPT_CAST128: ++ case LO_CRYPT_SERPENT: ++ case LO_CRYPT_MARS: ++ case LO_CRYPT_RC6: ++ case LO_CRYPT_DFC: ++ pass = getpass("Password :"); ++ MDcalc((byte *)loopinfo.lo_encrypt_key,pass,strlen(pass)); ++ loopinfo.lo_encrypt_key_size=16; /* 128 Bit key */ ++ break; + default: + fprintf (stderr, + _("Don't know how to get key for encryption system %d\n"), +@@ -318,11 +344,18 @@ + + static void + usage(void) { ++ struct crypt_type_struct *c; + fprintf(stderr, _("usage:\n\ + %s loop_device # give info\n\ + %s -d loop_device # delete\n\ + %s [ -e encryption ] [ -o offset ] loop_device file # setup\n"), + progname, progname, progname); ++ fprintf(stderr, " where encryption is one of:\n"); ++ c = &crypt_type_tbl[0]; ++ while(c->name) { ++ fprintf(stderr, " %s\n", c->name); ++ c++; ++ } + exit(1); + } + +diff -uNr util-linux-2.10m/mount/losetup.8 util-linux-2.10m.int/mount/losetup.8 +--- util-linux-2.10m/mount/losetup.8 Fri Jul 9 04:56:39 1999 ++++ util-linux-2.10m.int/mount/losetup.8 Mon May 22 20:14:18 2000 +@@ -36,11 +36,47 @@ + .PD 0 + .IP \fBXOR\fP + use a simple XOR encryption. ++.IP \fBBlowfish\fP ++use Blowfish encryption. Blowfish encryption is only available if you ++are using the international kernel and Blowfish encryption has been ++enabled in the Crypto API. ++.IP \fBTwofish\fP ++use Twofish encryption. Twofish encryption is only available if you ++are using the international kernel and Twofish encryption has been ++enabled in the Crypto API. ++.IP \fBCAST\fP ++use CAST encryption. CAST encryption is only available if you ++are using the international kernel and CAST encryption has been ++enabled in the Crypto API. + .IP \fBDES\fP + use DES encryption. DES encryption is only available if the optional + DES package has been added to the kernel. DES encryption uses an additional + start value that is used to protect passwords against dictionary +-attacks. ++attacks. Use of DES is deprecated. ++.IP \fBDFC\fP ++use DFC encryption. DFC encryption is only available if you ++are using the international kernel and DFC encryption has been ++enabled in the Crypto API. ++.IP \fBIDEA\fP ++use IDEA encryption. IDEA encryption is only available if you ++are using the international kernel and IDEA encryption has been ++enabled in the Crypto API. ++.IP \fBMARS\fP ++use MARS encryption. MARS encryption is only available if you ++are using the international kernel and MARS encryption has been ++enabled in the Crypto API. ++.IP \fBRC5\fP ++use RC5 encryption. RC5 encryption is only available if you ++are using the international kernel and RC5 encryption has been ++enabled in the Crypto API. ++.IP \fBRC6\fP ++use RC6 encryption. RC6 encryption is only available if you ++are using the international kernel and RC6 encryption has been ++enabled in the Crypto API. ++.IP \fBSerpent\fP ++use Serpent encryption. Serpent encryption is only available if you ++are using the international kernel and Serpent encryption has been ++enabled in the Crypto API. + .PD + .RE + .IP "\fB\-o \fIoffset\fP" +@@ -49,6 +85,7 @@ + .SH FILES + .nf + /dev/loop0,/dev/loop1,... loop devices (major=7) ++/proc/cipher/* available ciphers + .fi + .SH EXAMPLE + If you are using the loadable module you must have the module loaded +@@ -60,9 +97,8 @@ + .nf + .IP + dd if=/dev/zero of=/file bs=1k count=100 +-losetup -e des /dev/loop0 /file +-Password: +-Init (up to 16 hex digits): ++losetup -e blowfish /dev/loop0 /file ++Password : + mkfs -t ext2 /dev/loop0 100 + mount -t ext2 /dev/loop0 /mnt + ... +@@ -76,8 +112,12 @@ + # rmmod loop + .LP + .fi +-.SH RESTRICTION +-DES encryption is painfully slow. On the other hand, XOR is terribly weak. ++.SH RESTRICTIONS ++DES encryption is painfully slow. On the other hand, XOR is terribly ++weak. Both are insecure nowadays. Some ciphers require a licence for ++you to be allowed to use them. ++.SH BUGS ++CAST, DES, RC5 and Twofish are currently broken and cannot be used. + .SH AUTHORS + .nf + Original version: Theodore Ts'o +diff -uNr util-linux-2.10m/mount/rmd160.c util-linux-2.10m.int/mount/rmd160.c +--- util-linux-2.10m/mount/rmd160.c Thu Jan 1 01:00:00 1970 ++++ util-linux-2.10m.int/mount/rmd160.c Mon May 22 20:35:44 2000 +@@ -0,0 +1,371 @@ ++/********************************************************************\ ++ * ++ * FILE: rmd160.c ++ * ++ * CONTENTS: A sample C-implementation of the RIPEMD-160 ++ * hash-function. ++ * TARGET: any computer with an ANSI C compiler ++ * ++ * AUTHOR: Antoon Bosselaers, ESAT-COSIC ++ * DATE: 1 March 1996 ++ * VERSION: 1.0 ++ * ++ * Copyright (c) Katholieke Universiteit Leuven ++ * 1996, All Rights Reserved ++ * ++\********************************************************************/ ++ ++/* header files */ ++#include ++#include ++#include ++#include "rmd160.h" ++ ++/********************************************************************/ ++ ++/* macro definitions */ ++ ++/* collect four bytes into one word: */ ++#define BYTES_TO_DWORD(strptr) \ ++ (((dword) *((strptr)+3) << 24) | \ ++ ((dword) *((strptr)+2) << 16) | \ ++ ((dword) *((strptr)+1) << 8) | \ ++ ((dword) *(strptr))) ++ ++/* ROL(x, n) cyclically rotates x over n bits to the left */ ++/* x must be of an unsigned 32 bits type and 0 <= n < 32. */ ++#define ROL(x, n) (((x) << (n)) | ((x) >> (32-(n)))) ++ ++/* the five basic functions F(), G() and H() */ ++#define F(x, y, z) ((x) ^ (y) ^ (z)) ++#define G(x, y, z) (((x) & (y)) | (~(x) & (z))) ++#define H(x, y, z) (((x) | ~(y)) ^ (z)) ++#define I(x, y, z) (((x) & (z)) | ((y) & ~(z))) ++#define J(x, y, z) ((x) ^ ((y) | ~(z))) ++ ++/* the ten basic operations FF() through III() */ ++#define FF(a, b, c, d, e, x, s) {\ ++ (a) += F((b), (c), (d)) + (x);\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define GG(a, b, c, d, e, x, s) {\ ++ (a) += G((b), (c), (d)) + (x) + 0x5a827999UL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define HH(a, b, c, d, e, x, s) {\ ++ (a) += H((b), (c), (d)) + (x) + 0x6ed9eba1UL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define II(a, b, c, d, e, x, s) {\ ++ (a) += I((b), (c), (d)) + (x) + 0x8f1bbcdcUL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define JJ(a, b, c, d, e, x, s) {\ ++ (a) += J((b), (c), (d)) + (x) + 0xa953fd4eUL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define FFF(a, b, c, d, e, x, s) {\ ++ (a) += F((b), (c), (d)) + (x);\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define GGG(a, b, c, d, e, x, s) {\ ++ (a) += G((b), (c), (d)) + (x) + 0x7a6d76e9UL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define HHH(a, b, c, d, e, x, s) {\ ++ (a) += H((b), (c), (d)) + (x) + 0x6d703ef3UL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define III(a, b, c, d, e, x, s) {\ ++ (a) += I((b), (c), (d)) + (x) + 0x5c4dd124UL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++#define JJJ(a, b, c, d, e, x, s) {\ ++ (a) += J((b), (c), (d)) + (x) + 0x50a28be6UL;\ ++ (a) = ROL((a), (s)) + (e);\ ++ (c) = ROL((c), 10);\ ++ } ++ ++ ++/********************************************************************/ ++ ++void MDinit(dword *MDbuf) ++{ ++ MDbuf[0] = 0x67452301UL; ++ MDbuf[1] = 0xefcdab89UL; ++ MDbuf[2] = 0x98badcfeUL; ++ MDbuf[3] = 0x10325476UL; ++ MDbuf[4] = 0xc3d2e1f0UL; ++ ++ return; ++} ++ ++/********************************************************************/ ++ ++void compress(dword *MDbuf, dword *X) ++{ ++ dword aa = MDbuf[0], bb = MDbuf[1], cc = MDbuf[2], ++ dd = MDbuf[3], ee = MDbuf[4]; ++ dword aaa = MDbuf[0], bbb = MDbuf[1], ccc = MDbuf[2], ++ ddd = MDbuf[3], eee = MDbuf[4]; ++ ++ /* round 1 */ ++ FF(aa, bb, cc, dd, ee, X[ 0], 11); ++ FF(ee, aa, bb, cc, dd, X[ 1], 14); ++ FF(dd, ee, aa, bb, cc, X[ 2], 15); ++ FF(cc, dd, ee, aa, bb, X[ 3], 12); ++ FF(bb, cc, dd, ee, aa, X[ 4], 5); ++ FF(aa, bb, cc, dd, ee, X[ 5], 8); ++ FF(ee, aa, bb, cc, dd, X[ 6], 7); ++ FF(dd, ee, aa, bb, cc, X[ 7], 9); ++ FF(cc, dd, ee, aa, bb, X[ 8], 11); ++ FF(bb, cc, dd, ee, aa, X[ 9], 13); ++ FF(aa, bb, cc, dd, ee, X[10], 14); ++ FF(ee, aa, bb, cc, dd, X[11], 15); ++ FF(dd, ee, aa, bb, cc, X[12], 6); ++ FF(cc, dd, ee, aa, bb, X[13], 7); ++ FF(bb, cc, dd, ee, aa, X[14], 9); ++ FF(aa, bb, cc, dd, ee, X[15], 8); ++ ++ /* round 2 */ ++ GG(ee, aa, bb, cc, dd, X[ 7], 7); ++ GG(dd, ee, aa, bb, cc, X[ 4], 6); ++ GG(cc, dd, ee, aa, bb, X[13], 8); ++ GG(bb, cc, dd, ee, aa, X[ 1], 13); ++ GG(aa, bb, cc, dd, ee, X[10], 11); ++ GG(ee, aa, bb, cc, dd, X[ 6], 9); ++ GG(dd, ee, aa, bb, cc, X[15], 7); ++ GG(cc, dd, ee, aa, bb, X[ 3], 15); ++ GG(bb, cc, dd, ee, aa, X[12], 7); ++ GG(aa, bb, cc, dd, ee, X[ 0], 12); ++ GG(ee, aa, bb, cc, dd, X[ 9], 15); ++ GG(dd, ee, aa, bb, cc, X[ 5], 9); ++ GG(cc, dd, ee, aa, bb, X[ 2], 11); ++ GG(bb, cc, dd, ee, aa, X[14], 7); ++ GG(aa, bb, cc, dd, ee, X[11], 13); ++ GG(ee, aa, bb, cc, dd, X[ 8], 12); ++ ++ /* round 3 */ ++ HH(dd, ee, aa, bb, cc, X[ 3], 11); ++ HH(cc, dd, ee, aa, bb, X[10], 13); ++ HH(bb, cc, dd, ee, aa, X[14], 6); ++ HH(aa, bb, cc, dd, ee, X[ 4], 7); ++ HH(ee, aa, bb, cc, dd, X[ 9], 14); ++ HH(dd, ee, aa, bb, cc, X[15], 9); ++ HH(cc, dd, ee, aa, bb, X[ 8], 13); ++ HH(bb, cc, dd, ee, aa, X[ 1], 15); ++ HH(aa, bb, cc, dd, ee, X[ 2], 14); ++ HH(ee, aa, bb, cc, dd, X[ 7], 8); ++ HH(dd, ee, aa, bb, cc, X[ 0], 13); ++ HH(cc, dd, ee, aa, bb, X[ 6], 6); ++ HH(bb, cc, dd, ee, aa, X[13], 5); ++ HH(aa, bb, cc, dd, ee, X[11], 12); ++ HH(ee, aa, bb, cc, dd, X[ 5], 7); ++ HH(dd, ee, aa, bb, cc, X[12], 5); ++ ++ /* round 4 */ ++ II(cc, dd, ee, aa, bb, X[ 1], 11); ++ II(bb, cc, dd, ee, aa, X[ 9], 12); ++ II(aa, bb, cc, dd, ee, X[11], 14); ++ II(ee, aa, bb, cc, dd, X[10], 15); ++ II(dd, ee, aa, bb, cc, X[ 0], 14); ++ II(cc, dd, ee, aa, bb, X[ 8], 15); ++ II(bb, cc, dd, ee, aa, X[12], 9); ++ II(aa, bb, cc, dd, ee, X[ 4], 8); ++ II(ee, aa, bb, cc, dd, X[13], 9); ++ II(dd, ee, aa, bb, cc, X[ 3], 14); ++ II(cc, dd, ee, aa, bb, X[ 7], 5); ++ II(bb, cc, dd, ee, aa, X[15], 6); ++ II(aa, bb, cc, dd, ee, X[14], 8); ++ II(ee, aa, bb, cc, dd, X[ 5], 6); ++ II(dd, ee, aa, bb, cc, X[ 6], 5); ++ II(cc, dd, ee, aa, bb, X[ 2], 12); ++ ++ /* round 5 */ ++ JJ(bb, cc, dd, ee, aa, X[ 4], 9); ++ JJ(aa, bb, cc, dd, ee, X[ 0], 15); ++ JJ(ee, aa, bb, cc, dd, X[ 5], 5); ++ JJ(dd, ee, aa, bb, cc, X[ 9], 11); ++ JJ(cc, dd, ee, aa, bb, X[ 7], 6); ++ JJ(bb, cc, dd, ee, aa, X[12], 8); ++ JJ(aa, bb, cc, dd, ee, X[ 2], 13); ++ JJ(ee, aa, bb, cc, dd, X[10], 12); ++ JJ(dd, ee, aa, bb, cc, X[14], 5); ++ JJ(cc, dd, ee, aa, bb, X[ 1], 12); ++ JJ(bb, cc, dd, ee, aa, X[ 3], 13); ++ JJ(aa, bb, cc, dd, ee, X[ 8], 14); ++ JJ(ee, aa, bb, cc, dd, X[11], 11); ++ JJ(dd, ee, aa, bb, cc, X[ 6], 8); ++ JJ(cc, dd, ee, aa, bb, X[15], 5); ++ JJ(bb, cc, dd, ee, aa, X[13], 6); ++ ++ /* parallel round 1 */ ++ JJJ(aaa, bbb, ccc, ddd, eee, X[ 5], 8); ++ JJJ(eee, aaa, bbb, ccc, ddd, X[14], 9); ++ JJJ(ddd, eee, aaa, bbb, ccc, X[ 7], 9); ++ JJJ(ccc, ddd, eee, aaa, bbb, X[ 0], 11); ++ JJJ(bbb, ccc, ddd, eee, aaa, X[ 9], 13); ++ JJJ(aaa, bbb, ccc, ddd, eee, X[ 2], 15); ++ JJJ(eee, aaa, bbb, ccc, ddd, X[11], 15); ++ JJJ(ddd, eee, aaa, bbb, ccc, X[ 4], 5); ++ JJJ(ccc, ddd, eee, aaa, bbb, X[13], 7); ++ JJJ(bbb, ccc, ddd, eee, aaa, X[ 6], 7); ++ JJJ(aaa, bbb, ccc, ddd, eee, X[15], 8); ++ JJJ(eee, aaa, bbb, ccc, ddd, X[ 8], 11); ++ JJJ(ddd, eee, aaa, bbb, ccc, X[ 1], 14); ++ JJJ(ccc, ddd, eee, aaa, bbb, X[10], 14); ++ JJJ(bbb, ccc, ddd, eee, aaa, X[ 3], 12); ++ JJJ(aaa, bbb, ccc, ddd, eee, X[12], 6); ++ ++ /* parallel round 2 */ ++ III(eee, aaa, bbb, ccc, ddd, X[ 6], 9); ++ III(ddd, eee, aaa, bbb, ccc, X[11], 13); ++ III(ccc, ddd, eee, aaa, bbb, X[ 3], 15); ++ III(bbb, ccc, ddd, eee, aaa, X[ 7], 7); ++ III(aaa, bbb, ccc, ddd, eee, X[ 0], 12); ++ III(eee, aaa, bbb, ccc, ddd, X[13], 8); ++ III(ddd, eee, aaa, bbb, ccc, X[ 5], 9); ++ III(ccc, ddd, eee, aaa, bbb, X[10], 11); ++ III(bbb, ccc, ddd, eee, aaa, X[14], 7); ++ III(aaa, bbb, ccc, ddd, eee, X[15], 7); ++ III(eee, aaa, bbb, ccc, ddd, X[ 8], 12); ++ III(ddd, eee, aaa, bbb, ccc, X[12], 7); ++ III(ccc, ddd, eee, aaa, bbb, X[ 4], 6); ++ III(bbb, ccc, ddd, eee, aaa, X[ 9], 15); ++ III(aaa, bbb, ccc, ddd, eee, X[ 1], 13); ++ III(eee, aaa, bbb, ccc, ddd, X[ 2], 11); ++ ++ /* parallel round 3 */ ++ HHH(ddd, eee, aaa, bbb, ccc, X[15], 9); ++ HHH(ccc, ddd, eee, aaa, bbb, X[ 5], 7); ++ HHH(bbb, ccc, ddd, eee, aaa, X[ 1], 15); ++ HHH(aaa, bbb, ccc, ddd, eee, X[ 3], 11); ++ HHH(eee, aaa, bbb, ccc, ddd, X[ 7], 8); ++ HHH(ddd, eee, aaa, bbb, ccc, X[14], 6); ++ HHH(ccc, ddd, eee, aaa, bbb, X[ 6], 6); ++ HHH(bbb, ccc, ddd, eee, aaa, X[ 9], 14); ++ HHH(aaa, bbb, ccc, ddd, eee, X[11], 12); ++ HHH(eee, aaa, bbb, ccc, ddd, X[ 8], 13); ++ HHH(ddd, eee, aaa, bbb, ccc, X[12], 5); ++ HHH(ccc, ddd, eee, aaa, bbb, X[ 2], 14); ++ HHH(bbb, ccc, ddd, eee, aaa, X[10], 13); ++ HHH(aaa, bbb, ccc, ddd, eee, X[ 0], 13); ++ HHH(eee, aaa, bbb, ccc, ddd, X[ 4], 7); ++ HHH(ddd, eee, aaa, bbb, ccc, X[13], 5); ++ ++ /* parallel round 4 */ ++ GGG(ccc, ddd, eee, aaa, bbb, X[ 8], 15); ++ GGG(bbb, ccc, ddd, eee, aaa, X[ 6], 5); ++ GGG(aaa, bbb, ccc, ddd, eee, X[ 4], 8); ++ GGG(eee, aaa, bbb, ccc, ddd, X[ 1], 11); ++ GGG(ddd, eee, aaa, bbb, ccc, X[ 3], 14); ++ GGG(ccc, ddd, eee, aaa, bbb, X[11], 14); ++ GGG(bbb, ccc, ddd, eee, aaa, X[15], 6); ++ GGG(aaa, bbb, ccc, ddd, eee, X[ 0], 14); ++ GGG(eee, aaa, bbb, ccc, ddd, X[ 5], 6); ++ GGG(ddd, eee, aaa, bbb, ccc, X[12], 9); ++ GGG(ccc, ddd, eee, aaa, bbb, X[ 2], 12); ++ GGG(bbb, ccc, ddd, eee, aaa, X[13], 9); ++ GGG(aaa, bbb, ccc, ddd, eee, X[ 9], 12); ++ GGG(eee, aaa, bbb, ccc, ddd, X[ 7], 5); ++ GGG(ddd, eee, aaa, bbb, ccc, X[10], 15); ++ GGG(ccc, ddd, eee, aaa, bbb, X[14], 8); ++ ++ /* parallel round 5 */ ++ FFF(bbb, ccc, ddd, eee, aaa, X[12] , 8); ++ FFF(aaa, bbb, ccc, ddd, eee, X[15] , 5); ++ FFF(eee, aaa, bbb, ccc, ddd, X[10] , 12); ++ FFF(ddd, eee, aaa, bbb, ccc, X[ 4] , 9); ++ FFF(ccc, ddd, eee, aaa, bbb, X[ 1] , 12); ++ FFF(bbb, ccc, ddd, eee, aaa, X[ 5] , 5); ++ FFF(aaa, bbb, ccc, ddd, eee, X[ 8] , 14); ++ FFF(eee, aaa, bbb, ccc, ddd, X[ 7] , 6); ++ FFF(ddd, eee, aaa, bbb, ccc, X[ 6] , 8); ++ FFF(ccc, ddd, eee, aaa, bbb, X[ 2] , 13); ++ FFF(bbb, ccc, ddd, eee, aaa, X[13] , 6); ++ FFF(aaa, bbb, ccc, ddd, eee, X[14] , 5); ++ FFF(eee, aaa, bbb, ccc, ddd, X[ 0] , 15); ++ FFF(ddd, eee, aaa, bbb, ccc, X[ 3] , 13); ++ FFF(ccc, ddd, eee, aaa, bbb, X[ 9] , 11); ++ FFF(bbb, ccc, ddd, eee, aaa, X[11] , 11); ++ ++ /* combine results */ ++ ddd += cc + MDbuf[1]; /* final result for MDbuf[0] */ ++ MDbuf[1] = MDbuf[2] + dd + eee; ++ MDbuf[2] = MDbuf[3] + ee + aaa; ++ MDbuf[3] = MDbuf[4] + aa + bbb; ++ MDbuf[4] = MDbuf[0] + bb + ccc; ++ MDbuf[0] = ddd; ++ ++ return; ++} ++ ++/********************************************************************/ ++ ++void MDfinish(dword *MDbuf, byte *strptr, dword lswlen, dword mswlen) ++{ ++ unsigned int i; /* counter */ ++ dword X[16]; /* message words */ ++ ++ memset(X, 0, 16*sizeof(dword)); ++ ++ /* put bytes from strptr into X */ ++ for (i=0; i<(lswlen&63); i++) { ++ /* byte i goes into word X[i div 4] at pos. 8*(i mod 4) */ ++ X[i>>2] ^= (dword) *strptr++ << (8 * (i&3)); ++ } ++ ++ /* append "1" bit to the message. Be careful : ++ message = "" -> "10000000" = 128 */ ++ X[(lswlen>>2)&15] ^= (dword)1 << (8*(lswlen&3)+7); ++ ++ if ((lswlen & 63) > 55) { ++ /* length goes to next block */ ++ compress(MDbuf, X); ++ memset(X, 0, 16*sizeof(dword)); ++ } ++ ++ /* append length in bits*/ ++ X[14] = lswlen << 3; ++ X[15] = (lswlen >> 29) | (mswlen << 3); ++ compress(MDbuf, X); ++ ++ return; ++} ++ ++void MDcalc(byte *MD,byte *sp,dword sl) ++{ dword X[16]; ++ dword MDbuf[5]; ++ int i,j; ++ ++ MDinit(MDbuf); ++ ++ while (sl >= 64) ++ { ++ memset(X,0,16*sizeof(dword)); ++ ++ for (i=0; i<64; i++) ++ X[i>>2] |= ((dword)(*sp++)) << (8 * (i&3)); ++ ++ sl-=64; ++ compress(MDbuf,X); ++ ++ }; ++ MDfinish(MDbuf,sp,sl,0); ++ ++ for (i=0;i<5;i++) ++ for (j=0;j<4;j++) ++ *MD++=(byte)((MDbuf[i]>>(j*8))&0xFF); ++} ++ ++/************************ end of file rmd160.c **********************/ ++ +diff -uNr util-linux-2.10m/mount/rmd160.h util-linux-2.10m.int/mount/rmd160.h +--- util-linux-2.10m/mount/rmd160.h Thu Jan 1 01:00:00 1970 ++++ util-linux-2.10m.int/mount/rmd160.h Mon May 22 20:35:44 2000 +@@ -0,0 +1,58 @@ ++/********************************************************************\ ++ * ++ * FILE: rmd160.h ++ * ++ * CONTENTS: Header file for a sample C-implementation of the ++ * RIPEMD-160 hash-function. ++ * TARGET: any computer with an ANSI C compiler ++ * ++ * AUTHOR: Antoon Bosselaers, ESAT-COSIC ++ * DATE: 1 March 1996 ++ * VERSION: 1.0 ++ * ++ * Copyright (c) Katholieke Universiteit Leuven ++ * 1996, All Rights Reserved ++ * ++\********************************************************************/ ++ ++#ifndef RMD160H /* make sure this file is read only once */ ++#define RMD160H ++ ++/********************************************************************/ ++ ++/* typedef 8 and 32 bit types, resp. */ ++/* adapt these, if necessary, ++ for your operating system and compiler */ ++ ++typedef unsigned char byte; ++typedef unsigned long dword; ++ ++/********************************************************************/ ++ ++/* function prototypes */ ++ ++void MDinit(dword *MDbuf); ++/* ++ * initializes MDbuffer to "magic constants" ++ */ ++ ++void compress(dword *MDbuf, dword *X); ++/* ++ * the compression function. ++ * transforms MDbuf using message bytes X[0] through X[15] ++ */ ++ ++void MDfinish(dword *MDbuf, byte *strptr, dword lswlen, dword mswlen); ++/* ++ * puts bytes from strptr into X and pad out; appends length ++ * and finally, compresses the last block(s) ++ * note: length in bits == 8 * (lswlen + 2^32 mswlen). ++ * note: there are (lswlen mod 64) bytes left in strptr. ++ */ ++ ++void MDcalc(byte *MDbuf,byte *sp,dword sl); ++ ++#endif /* RMD160H */ ++ ++/*********************** end of file rmd160.h ***********************/ ++ diff -Nru linux-2.4.0-test9/MAINTAINERS linux-2.4.0-test9-int/MAINTAINERS --- linux-2.4.0-test9/MAINTAINERS Mon Oct 2 04:46:22 2000 +++ linux-2.4.0-test9-int/MAINTAINERS Sun Oct 15 12:20:50 2000 @@ -274,6 +274,12 @@ M: jam@acm.org S: Maintained +CRYPTO API +P: Alexander Kjeldaas +M: astor@fast.no +W: http://www.kerneli.org/ +S: Maintained + CYBERPRO FB DRIVER P: Russell King M: linux@arm.linux.org.uk diff -Nru linux-2.4.0-test9/Makefile linux-2.4.0-test9-int/Makefile --- linux-2.4.0-test9/Makefile Mon Oct 2 23:22:59 2000 +++ linux-2.4.0-test9-int/Makefile Sun Oct 15 12:23:44 2000 @@ -120,13 +120,14 @@ CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o NETWORKS =net/network.o DRIVERS =drivers/block/block.o \ + crypto/crypto.o \ drivers/char/char.o \ drivers/misc/misc.o \ drivers/net/net.o \ drivers/media/media.o \ drivers/parport/parport.a LIBS =$(TOPDIR)/lib/lib.a -SUBDIRS =kernel drivers mm fs net ipc lib +SUBDIRS =kernel drivers mm fs net ipc lib crypto DRIVERS-n := DRIVERS-y := diff -Nru linux-2.4.0-test9/arch/alpha/config.in linux-2.4.0-test9-int/arch/alpha/config.in --- linux-2.4.0-test9/arch/alpha/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/alpha/config.in Sun Oct 15 12:20:50 2000 @@ -245,6 +245,8 @@ source net/Config.in fi +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/arch/arm/config.in linux-2.4.0-test9-int/arch/arm/config.in --- linux-2.4.0-test9/arch/arm/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/arm/config.in Sun Oct 15 12:20:50 2000 @@ -324,6 +324,8 @@ source net/irda/Config.in fi +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/arch/i386/config.in linux-2.4.0-test9-int/arch/i386/config.in --- linux-2.4.0-test9/arch/i386/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/i386/config.in Sun Oct 15 12:20:50 2000 @@ -255,6 +255,8 @@ source net/Config.in fi +source crypto/Config.in + source drivers/telephony/Config.in mainmenu_option next_comment diff -Nru linux-2.4.0-test9/arch/ia64/config.in linux-2.4.0-test9-int/arch/ia64/config.in --- linux-2.4.0-test9/arch/ia64/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/ia64/config.in Sun Oct 15 12:20:50 2000 @@ -101,6 +101,8 @@ source drivers/i2o/Config.in source drivers/md/Config.in +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/arch/m68k/config.in linux-2.4.0-test9-int/arch/m68k/config.in --- linux-2.4.0-test9/arch/m68k/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/m68k/config.in Sun Oct 15 12:20:50 2000 @@ -155,6 +155,8 @@ source net/Config.in fi +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/arch/mips/config.in linux-2.4.0-test9-int/arch/mips/config.in --- linux-2.4.0-test9/arch/mips/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/mips/config.in Sun Oct 15 12:24:54 2000 @@ -195,6 +195,8 @@ source net/Config.in fi +source crypto/Config.in + if [ "$CONFIG_DECSTATION" != "y" -a \ "$CONFIG_SGI_IP22" != "y" ]; then source drivers/telephony/Config.in diff -Nru linux-2.4.0-test9/arch/mips64/config.in linux-2.4.0-test9-int/arch/mips64/config.in --- linux-2.4.0-test9/arch/mips64/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/mips64/config.in Sun Oct 15 12:20:50 2000 @@ -135,6 +135,8 @@ source net/Config.in fi +source crypto/Config.in + source drivers/telephony/Config.in mainmenu_option next_comment diff -Nru linux-2.4.0-test9/arch/ppc/config.in linux-2.4.0-test9-int/arch/ppc/config.in --- linux-2.4.0-test9/arch/ppc/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/ppc/config.in Sun Oct 15 12:20:50 2000 @@ -188,6 +188,8 @@ source net/Config.in fi +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/arch/s390/config.in linux-2.4.0-test9-int/arch/s390/config.in --- linux-2.4.0-test9/arch/s390/config.in Tue Aug 22 20:29:02 2000 +++ linux-2.4.0-test9-int/arch/s390/config.in Sun Oct 15 12:20:50 2000 @@ -55,6 +55,8 @@ source net/Config.in fi +source crypto/Config.in + source fs/Config.in # source drivers/char/Config.in diff -Nru linux-2.4.0-test9/arch/sh/config.in linux-2.4.0-test9-int/arch/sh/config.in --- linux-2.4.0-test9/arch/sh/config.in Tue Sep 19 19:57:30 2000 +++ linux-2.4.0-test9-int/arch/sh/config.in Sun Oct 15 12:20:50 2000 @@ -129,6 +129,8 @@ source net/Config.in fi +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/arch/sparc/config.in linux-2.4.0-test9-int/arch/sparc/config.in --- linux-2.4.0-test9/arch/sparc/config.in Tue Sep 19 19:59:52 2000 +++ linux-2.4.0-test9-int/arch/sparc/config.in Sun Oct 15 12:20:50 2000 @@ -108,6 +108,8 @@ source net/Config.in fi +source crypto/Config.in + # Don't frighten a common SBus user if [ "$CONFIG_PCI" = "y" ]; then diff -Nru linux-2.4.0-test9/arch/sparc64/config.in linux-2.4.0-test9-int/arch/sparc64/config.in --- linux-2.4.0-test9/arch/sparc64/config.in Tue Sep 19 19:59:52 2000 +++ linux-2.4.0-test9-int/arch/sparc64/config.in Sun Oct 15 12:20:50 2000 @@ -108,6 +108,8 @@ source net/Config.in fi +source crypto/Config.in + mainmenu_option next_comment comment 'ATA/IDE/MFM/RLL support' diff -Nru linux-2.4.0-test9/crypto/Config.in linux-2.4.0-test9-int/crypto/Config.in --- linux-2.4.0-test9/crypto/Config.in Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/Config.in Sun Oct 15 12:20:50 2000 @@ -0,0 +1,25 @@ +# +# Network configuration +# +mainmenu_option next_comment +comment 'Crypto options' +bool 'Crypto support' CONFIG_CRYPTO +dep_tristate 'Crypto ciphers' CONFIG_CIPHERS $CONFIG_CRYPTO +if [ "$CONFIG_CIPHERS" != "n" ]; then + dep_tristate 'Blowfish cipher (EXPERIMENTAL)' CONFIG_CIPHER_BLOWFISH $CONFIG_CIPHERS + dep_tristate 'DES cipher (EXPERIMENTAL)' CONFIG_CIPHER_DES $CONFIG_CIPHERS + dep_tristate 'DFC cipher (EXPERIMENTAL)' CONFIG_CIPHER_DFC $CONFIG_CIPHERS + dep_tristate 'IDEA cipher (EXPERIMENTAL)' CONFIG_CIPHER_IDEA $CONFIG_CIPHERS + dep_tristate 'MARS cipher (EXPERIMENTAL)' CONFIG_CIPHER_MARS $CONFIG_CIPHERS + dep_tristate 'RC5 cipher (EXPERIMENTAL)' CONFIG_CIPHER_RC5 $CONFIG_CIPHERS + dep_tristate 'RC6 cipher (EXPERIMENTAL)' CONFIG_CIPHER_RC6 $CONFIG_CIPHERS +# Rijndael isn't working +# dep_tristate 'Rijndael cipher (EXPERIMENTAL)' CONFIG_CIPHER_RIJNDAEL $CONFIG_CIPHERS + dep_tristate 'Serpent cipher (EXPERIMENTAL)' CONFIG_CIPHER_SERPENT $CONFIG_CIPHERS +fi +dep_tristate 'Digest algorithms' CONFIG_DIGEST $CONFIG_CRYPTO +if [ "$CONFIG_DIGEST" != "n" ]; then + dep_tristate 'MD5 digest (EXPERIMENTAL)' CONFIG_DIGEST_MD5 $CONFIG_DIGEST + dep_tristate 'SHA1 digest (EXPERIMENTAL)' CONFIG_DIGEST_SHA1 $CONFIG_DIGEST +fi +endmenu diff -Nru linux-2.4.0-test9/crypto/Makefile linux-2.4.0-test9-int/crypto/Makefile --- linux-2.4.0-test9/crypto/Makefile Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/Makefile Sun Oct 15 12:20:50 2000 @@ -0,0 +1,106 @@ +# +# Makefile for the Linux kernel crypto library. +# +# Note! Dependencies are done automagically by 'make dep', which also +# removes any old dependencies. DON'T put your own dependencies here +# unless it's something special (not a .c file). +# +# Note 2! The CFLAGS definitions are now in the main makefile. + +O_TARGET := crypto.o +O_OBJS := +OX_OBJS := + +ifeq ($(CONFIG_CRYPTO),y) + OX_OBJS += cryptoapi.o +endif + +ifeq ($(CONFIG_CIPHER_SERPENT),y) + O_OBJS += serp6f.o +else + ifeq ($(CONFIG_CIPHER_SERPENT),m) + M_OBJS += serp6f.o + endif +endif + +ifeq ($(CONFIG_CIPHER_MARS),y) + O_OBJS += mars6.o +else + ifeq ($(CONFIG_CIPHER_MARS),m) + M_OBJS += mars6.o + endif +endif + +ifeq ($(CONFIG_CIPHER_RC5),y) + O_OBJS += rc5.o +else + ifeq ($(CONFIG_CIPHER_RC5),m) + M_OBJS += rc5.o + endif +endif + +ifeq ($(CONFIG_CIPHER_RC6),y) + O_OBJS += rc62.o +else + ifeq ($(CONFIG_CIPHER_RC6),m) + M_OBJS += rc62.o + endif +endif + +ifeq ($(CONFIG_CIPHER_DFC),y) + O_OBJS += dfc2.o +else + ifeq ($(CONFIG_CIPHER_DFC),m) + M_OBJS += dfc2.o + endif +endif + +ifeq ($(CONFIG_CIPHER_RIJNDAEL),y) + O_OBJS += rijndael3.o +else + ifeq ($(CONFIG_CIPHER_RIJNDAEL),m) + M_OBJS += rijndael3.o + endif +endif + +ifeq ($(CONFIG_CIPHER_BLOWFISH),y) + O_OBJS += blowfish.o +else + ifeq ($(CONFIG_CIPHER_BLOWFISH),m) + M_OBJS += blowfish.o + endif +endif + +ifeq ($(CONFIG_CIPHER_IDEA),y) + O_OBJS += idea.o +else + ifeq ($(CONFIG_CIPHER_IDEA),m) + M_OBJS += idea.o + endif +endif + +ifeq ($(CONFIG_CIPHER_DES),y) + O_OBJS += des.o +else + ifeq ($(CONFIG_CIPHER_DES),m) + M_OBJS += des.o + endif +endif + +ifeq ($(CONFIG_DIGEST_MD5),y) + O_OBJS += md5glue.o +else + ifeq ($(CONFIG_DIGEST_MD5),m) + M_OBJS += md5glue.o + endif +endif + +ifeq ($(CONFIG_DIGEST_SHA1),y) + O_OBJS += sha1glue.o +else + ifeq ($(CONFIG_DIGEST_SHA1),m) + M_OBJS += sha1glue.o + endif +endif + +include $(TOPDIR)/Rules.make diff -Nru linux-2.4.0-test9/crypto/cryptoapi.c linux-2.4.0-test9-int/crypto/cryptoapi.c --- linux-2.4.0-test9/crypto/cryptoapi.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/cryptoapi.c Sun Oct 15 12:20:50 2000 @@ -0,0 +1,262 @@ +/* + * crypto/digestapi.c + * + * Written by Alexander Kjeldaas 1998-11-15 + * + * Copyright 1998 by Alexander Kjeldaas. Redistribution of this file + * is permitted under the GNU Public License. + */ + +#include + +#ifdef CONFIG_KMOD +#include +#endif /* CONFIG_KMOD */ + +#include +#include +#include +#include +#include +#include + +/* Since the digest and cipher APIs share some structure, we use a + struct transform_group to reduce the code needed to implement the + APIs. */ + +struct transform_group { + char *tg_name; /* "cipher" or "digest" */ + spinlock_t *tg_lock; + struct list_head *tg_head; +#ifdef CONFIG_PROC_FS + struct proc_dir_entry **tg_proc_parent_dir; + int (*tg_read)(char *page, char **start, off_t off, + int count, int *eof, void *data); +#endif +}; + + +static int cipher_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int digest_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data); + +static struct proc_dir_entry *proc_crypto, *proc_cipher, *proc_digest; +spinlock_t cipher_lock = SPIN_LOCK_UNLOCKED; +spinlock_t digest_lock = SPIN_LOCK_UNLOCKED; +LIST_HEAD(ciphers); +LIST_HEAD(digests); + +static struct transform_group _cipher_group = { + tg_name: "cipher", + tg_lock: &cipher_lock, + tg_head: &ciphers, +#ifdef CONFIG_PROC_FS + tg_proc_parent_dir: &proc_cipher, + tg_read: &cipher_read_proc +#endif +}; +struct transform_group *cipher_group = &_cipher_group; + +static struct transform_group _digest_group = { + tg_name: "digest", + tg_lock: &digest_lock, + tg_head: &digests, +#ifdef CONFIG_PROC_FS + tg_proc_parent_dir: &proc_digest, + tg_read: &digest_read_proc +#endif +}; +struct transform_group *digest_group = &_digest_group; + + +struct transform_implementation * +find_transform_by_id(struct transform_group *tg, int id) +{ + struct list_head *tmp; +#ifdef CONFIG_KMOD + int mod_try = 0; +retry: +#endif + spin_lock(tg->tg_lock); + for (tmp = tg->tg_head->next; tmp != tg->tg_head; tmp = tmp->next) { + struct transform_implementation *t; + t = list_entry(tmp, struct transform_implementation, t_list); + if (t->t_id == id) { + spin_unlock(tg->tg_lock); + return t; + } + } + spin_unlock(tg->tg_lock); +#ifdef CONFIG_KMOD + if (!mod_try) { + char module_name[50]; + mod_try = 1; + sprintf(module_name, "%s-%d", tg->tg_name, id & (~CIPHER_CBC)); + request_module(module_name); + goto retry; + } +#endif + return NULL; +} + + +struct transform_implementation * +find_transform_by_name(struct transform_group *tg, char *name) +{ + struct list_head *tmp; + + spin_lock(tg->tg_lock); + for (tmp = tg->tg_head->next; tmp != tg->tg_head; tmp = tmp->next) { + struct transform_implementation *t; + t = list_entry(tmp, struct transform_implementation, t_list); + if (strcmp(t->t_name, name) == 0) { + spin_unlock(tg->tg_lock); + return t; + } + } + spin_unlock(tg->tg_lock); + return NULL; +} + +int register_transform(struct transform_group *tg, + struct transform_implementation *ti) +{ + int err = 0; + + spin_lock(tg->tg_lock); + list_add(&ti->t_list, tg->tg_head); + spin_unlock(tg->tg_lock); + if (!err) { + char buf[200]; + sprintf(buf, "Registered %s (%d)\n", + ti->t_name, ti->t_id); + printk(buf); + +#ifdef CONFIG_PROC_FS + ti->t_proc = create_proc_read_entry(ti->t_name, + S_IFREG|S_IRUGO, + *tg->tg_proc_parent_dir, + tg->tg_read, (void *)ti); + if (!ti->t_proc) + return -ENOMEM; +#endif + } + return err; +} + +int unregister_transform(struct transform_group *tg, + struct transform_implementation *ti) +{ + int ret = 0; + if (!list_empty(&ti->t_list)) { + spin_lock(tg->tg_lock); + list_del(&ti->t_list); + spin_unlock(tg->tg_lock); + ret = 0; + } +#ifdef CONFIG_PROC_FS + if (ti->t_proc) { + ti->t_proc = NULL; + remove_proc_entry(ti->t_name, *tg->tg_proc_parent_dir); + } +#endif + return ret; +} + +static int cipher_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + struct cipher_implementation *ci; + int len = 0; + + ci = (struct cipher_implementation *)data; + + len = sprintf(page, "cipher_id: %d\n" + "cipher_name: %s\n" + "blocksize: %d\n" + "ivsize: %d\n" + "key_schedule_size: %d\n", + ci->trans.t_id, ci->trans.t_name, + ci->blocksize, + ci->ivsize, ci->key_schedule_size); + *eof=1; + + return len; +} + +static int digest_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + struct digest_implementation *ci; + int len = 0; + + ci = (struct digest_implementation *)data; + + len = sprintf(page, "digest_id: %d\n" + "digest_name: %s\n" + "blocksize: %d\n" + "working_size: %d\n", + ci->trans.t_id, ci->trans.t_name, + ci->blocksize, ci->working_size); + *eof=1; + + return len; +} + + +#ifdef MODULE +int __init init_module(void) +#else +int __init cryptoapi_init(void) +#endif +{ + int err; + + proc_crypto = proc_mkdir("crypto", NULL); + proc_cipher = proc_mkdir("crypto/cipher", proc_crypto); + proc_digest = proc_mkdir("crypto/digest", proc_crypto); + +#ifdef CONFIG_DIGEST_MD5 + init_md5(); +#endif +#ifdef CONFIG_DIGEST_SHA1 + init_sha1(); +#endif +#ifdef CONFIG_CIPHER_RIJNDAEL + init_rijndael(); +#endif +#ifdef CONFIG_CIPHER_SERPENT + init_serpent(); +#endif +#ifdef CONFIG_CIPHER_RC5 + init_rc5(); +#endif +#ifdef CONFIG_CIPHER_RC6 + init_rc6(); +#endif +#ifdef CONFIG_CIPHER_MARS + init_mars(); +#endif +#ifdef CONFIG_CIPHER_DFC + init_dfc(); +#endif +#ifdef CONFIG_CIPHER_BLOWFISH + init_blowfish(); +#endif +#ifdef CONFIG_CIPHER_IDEA + init_idea(); +#endif +#ifdef CONFIG_CIPHER_DES + init_des(); +#endif + return 0; +} + + +EXPORT_SYMBOL(find_transform_by_id); +EXPORT_SYMBOL(find_transform_by_name); +EXPORT_SYMBOL(register_transform); +EXPORT_SYMBOL(unregister_transform); +EXPORT_SYMBOL(cipher_group); +EXPORT_SYMBOL(digest_group); diff -Nru linux-2.4.0-test9/crypto/testing/Makefile linux-2.4.0-test9-int/crypto/testing/Makefile --- linux-2.4.0-test9/crypto/testing/Makefile Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/Makefile Sun Oct 15 12:20:50 2000 @@ -0,0 +1,27 @@ + +all: ../crypto.a testcip speed test_blowfish digesttest + +../crypto.a: + @if [ ! -f ../crypto.a ]; then \ + echo "You need to compile the kernel first"; fi + +%.o : %.c + gcc -O2 -Wall -g -c -I../../include $(CFLAGS) $(CPPFLAGS) $< -o $@ + +speed: ../crypto.a stubs.o speed.o + gcc -g -o speed speed.c -I../../include/ ../crypto.a stubs.o + +test_blowfish: ../crypto.a stubs.o test_blowfish.o + gcc -g -o test_blowfish test_blowfish.c -I../../include/ ../crypto.a stubs.o + +stubs.o: stubs.c + gcc -O2 -g -Wall -D__KERNEL__ -c -o stubs.o -I../../include/ stubs.c + +testcip: testcip.c stubs.o + gcc -O2 -g -Wall -o testcip testcip.c -I../../include/ ../crypto.a stubs.o + +digesttest: ../crypto.a stubs.o digesttest.o + gcc -g -o digesttest digesttest.c -I../../include/ ../crypto.a stubs.o + +clean: + rm -f speed test_blowfish testcip digesttest *.o diff -Nru linux-2.4.0-test9/crypto/testing/digesttest.c linux-2.4.0-test9-int/crypto/testing/digesttest.c --- linux-2.4.0-test9/crypto/testing/digesttest.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/digesttest.c Sun Oct 15 12:20:50 2000 @@ -0,0 +1,106 @@ +/* + * crypto/testing/digesttest.c + * + * Written by Andrew McDonald 1999-11-16 + * with bits from speed.c: + * written by Alexander Kjeldaas 1998-11-23 + * + * Copyright 1999 by Andrew McDonald. + * Some code, Copyright 1998 by Alexander Kjeldaas. + * Redistribution of this file is permitted under the GNU Public License. + */ + +#define __KERNEL__ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; + +#define printk printk_dummy + +#include +#include +#include +#include +#include +#include +#include +#include + +#undef printk + + +#define PRINTF(x...) do { printf(x); fflush(stdout); } while(0) + +int digest_test(struct digest_implementation *di, FILE *file); + + +int main(int argc, char* argv[]) +{ + int digest; + struct digest_implementation *di; + FILE *file; + + if (argc < 2 || argc > 3) { + printf("Usage:\n"); + printf("digesttest digestnum [filename]\n"); + exit(1); + } + + digests_init(); + digest = atoi(argv[1]); + di = find_digest_by_id(digest); + if (!di) + exit(1); + PRINTF("Testing digest %s, number %d...\n", di->digest_name, + di->digest_id); + + if (argc < 3) + file = stdin; + else { + if (!(file = fopen(argv[2], "rb"))) { + fprintf(stderr, "Can't open file %s", argv[2]); + exit(1); + } + } + + digest_test(di, file); + exit(0); +} + +int digest_test(struct digest_implementation *di, FILE *file) +{ + struct digest_context* cx; + u8* output; + u8 buf[16384]; + int i, j; + + cx = (struct digest_context *) malloc(sizeof(struct digest_context)); + cx->di = di; + cx->digest_info = (u32 *) malloc(di->working_size); + output = (unsigned char *) malloc(di->blocksize); + di->open(cx); + + while (!feof(file)) { + i = fread(buf, 1, 16384, file); + di->update(cx, buf, i); + } + + di->close(cx, output); + + fclose(file); + + for (i = 0; i < (di->blocksize / sizeof(unsigned int)); i++) { + for (j = 0; j < sizeof(unsigned int); j++) { + printf("%02X", output[i*4+j]); + } + printf(" "); + } + printf("\n"); + return 0; +} + +asmlinkage int printk(const char * fmt, va_list args) +{ + return vprintf(fmt, args); +} diff -Nru linux-2.4.0-test9/crypto/testing/speed.c linux-2.4.0-test9-int/crypto/testing/speed.c --- linux-2.4.0-test9/crypto/testing/speed.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/speed.c Sun Oct 15 12:20:50 2000 @@ -0,0 +1,366 @@ +/* + * crypto/testing/speed.c + * + * Written by Alexander Kjeldaas 1998-11-23 + * + * Copyright 1998 by Alexander Kjeldaas. Redistribution of this file + * is permitted under the GNU Public License. + */ + +#define __KERNEL__ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; + +#define printk printk_dummy + +#include +#include +#include +#include +#include +#include +#include + +#undef printk + +static long long t1, t2; + +#define PRINTF(x...) do { printf(x); fflush(stdout); } while(0) + +#define timediff(tv2, tv1) (((tv2)->tv_sec - (tv1)->tv_sec)*1000*1000 + \ + ((tv2)->tv_usec - (tv1)->tv_usec)) + +void dump_u8_buffer(u8 *buf, int number); +void dump_u16_buffer(u16 *buf, int number); +void dump_u32_buffer(u32 *buf, int number); +int my_memcmp(char *buf1, char *buf2, int size); +int cipher_correct(struct cipher_implementation *ci); +int test_cipher(struct cipher_implementation *ci, int encrypt); +int test_cbc_cipher(struct cipher_implementation *ci, int encrypt); + +int main() +{ + int cipher; + /* Register all ciphers */ + ciphers_init(); + + for (cipher = 1; cipher < MAX_CIPHER; cipher++) { + struct cipher_implementation *ci; + struct timeval tv1,tv2; + ci = find_cipher_by_id(cipher); + if (!ci) + continue; + PRINTF("Testing cipher %s, number %d..", ci->cipher_name, + ci->cipher_id); + if (!cipher_correct(ci)) { + PRINTF("seems to work\n"); + } else { + PRINTF("doesnt work!\n"); + } + + gettimeofday(&tv1, NULL); + if (test_cipher(ci,1)) + return 1; + gettimeofday(&tv2, NULL); + PRINTF("encrypt %-15s = %8d usec/MB; %6.3f MB/s; %6.3f Mb/s\n", + ci->cipher_name, timediff(&tv2,&tv1), + 1000000.0/timediff(&tv2,&tv1), + 1000000.0*8.0/timediff(&tv2,&tv1)); + gettimeofday(&tv1, NULL); + if (test_cipher(ci,0)) + return 1; + gettimeofday(&tv2, NULL); + PRINTF("decrypt %-15s = %8d usec/MB; %6.3f MB/s; %6.3f Mb/s\n", + ci->cipher_name, timediff(&tv2,&tv1), + 1000000.0/timediff(&tv2,&tv1), + 1000000.0*8.0/timediff(&tv2,&tv1)); + ci = find_cipher_by_id(cipher | CIPHER_CBC); + if (!ci) + continue; + gettimeofday(&tv1, NULL); + if (test_cbc_cipher(ci,1)) + return 1; + gettimeofday(&tv2, NULL); + PRINTF("encrypt %-15s = %8d usec/MB; %6.3f MB/s; %6.3f Mb/s\n", + ci->cipher_name, timediff(&tv2,&tv1), + 1000000.0/timediff(&tv2,&tv1), + 1000000.0*8.0/timediff(&tv2,&tv1)); + gettimeofday(&tv1, NULL); + if (test_cbc_cipher(ci,0)) + return 1; + gettimeofday(&tv2, NULL); + PRINTF("decrypt %-15s = %8d usec/MB; %6.3f MB/s; %6.3f Mb/s\n", + ci->cipher_name, timediff(&tv2,&tv1), + 1000000.0/timediff(&tv2,&tv1), + 1000000.0*8.0/timediff(&tv2,&tv1)); + } +} + +#if 0 +static inline void rdtsc(long long *x) +{ + asm volatile (".byte 0x0f, 0x31\n\t" + "movl %%eax, %0\n\t" + "movl %%edx, %1" + : "=m" (((long *)x)[0]), "=m"(((long *)x)[1]) + ::"ax","dx"); +} +#endif + +int test_cbc_cipher(struct cipher_implementation *ci, int encrypt) +{ + int fd,i,j,bs,size; + char buf[512], buf_in[512], buf_out[512]; + static u8 key[] = {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + struct cipher_context *cx; + cx = (struct cipher_context *) malloc(sizeof(struct cipher_context)); + cx->ci = ci; + cx->keyinfo = (u32 *) malloc(ci->key_schedule_size); + errno=ci->set_key(cx, (char *)key, sizeof(key)); + if(errno) { + perror("Can't set key"); + return 1; + } + fd = open("speed.c", O_RDONLY); + if (!fd) { + perror("Couldn't open speed.c"); + return 1; + } + if ((size = read(fd, buf, sizeof(buf))) < sizeof(buf)) { + perror("Couldn't read 512 bytes from speed.c"); + return 1; + } + close(fd); + memcpy(buf_in, buf, sizeof(buf)); + bs = ci->blocksize; + for (i = 0; i < 1024; i++) { + char *in = &buf_in[0]; + char *out = &buf_out[0]; + int (*func)(struct cipher_context *, u32 *, u32 *, int size); + + if (encrypt) + func = ci->encrypt; + else + func = ci->decrypt; + errno=func(cx, (u32 *)in, (u32 *)out, 512); + if(errno) { + perror("Can't encrypt/decrypt in cbc-mode"); + return 1; + } + in = &buf_in[0]; + out = &buf_out[0]; + func(cx, (u32 *)out, (u32 *)in, 512); + } + return 0; +} + +int test_cipher(struct cipher_implementation *ci, int encrypt) +{ + int fd,i,j,bs,size; + char buf[512], buf_in[512], buf_out[512]; + static u8 key[] = {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + struct cipher_context *cx; + cx = (struct cipher_context *) malloc(sizeof(struct cipher_context)); + cx->ci = ci; + cx->keyinfo = (u32 *) malloc(ci->key_schedule_size); + errno=ci->set_key(cx, (char *)key, sizeof(key)); + if(errno) { + perror("Can't set key"); + return 1; + } + fd = open("speed.c", O_RDONLY); + if (!fd) { + perror("Couldn't open speed.c"); + return 1; + } + if ((size = read(fd, buf, sizeof(buf))) < sizeof(buf)) { + perror("Couldn't read 512 bytes from speed.c"); + return 1; + } + close(fd); + memcpy(buf_in, buf, sizeof(buf)); + bs = ci->blocksize; + if (bs == 0) { + return 0; + } + for (i = 0; i < 1024; i++) { + char *in = &buf_in[0]; + char *out = &buf_out[0]; + int (*func)(struct cipher_context *, u32 *, u32 *, int size); + if (encrypt) + func = ci->encrypt; + else + func = ci->decrypt; + + for (j = 512; j > 0; j-=bs) { + errno=func(cx, (u32 *)in, (u32 *)out, bs); + if(errno) { + perror("Can't encrypt/decrypt in test_cipher()"); + return 1; + } + in += bs; out += bs; + } + in = &buf_in[0]; + out = &buf_out[0]; + for (j = 512; j > 0; j-=bs) { + func(cx, (u32 *)out, (u32 *)in, bs); + in += bs; out += bs; + } + } + return 0; +} + +int cipher_correct(struct cipher_implementation *ci) +{ + int fd,i,j,bs,size,err; + char buf[512], a1,a2,a3,buf_enc[512],a4,a5,a6, buf_dec[512]; + static u8 key[] = {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + struct cipher_context *cx; + cx = (struct cipher_context *) malloc(sizeof(struct cipher_context)); + cx->ci = ci; + cx->keyinfo = (u32 *) malloc(ci->key_schedule_size); + errno=ci->set_key(cx, (char *)key, sizeof(key)); + if(errno) { + printf("errno=%d key=%d\n",errno,sizeof(key)); + perror("Can't set key"); + return 1; + } + fd = open("speed.c", O_RDONLY); + if (!fd) { + perror("Couldn't open speed.c"); + return 1; + } + if ((size = read(fd, buf, sizeof(buf))) < sizeof(buf)) { + perror("Couldn't read 512 bytes from speed.c"); + return 1; + } + close(fd); + bs = ci->blocksize; + if (bs == 0) { + return 0; + } + { + char *in = &buf[0]; + char *out = &buf_enc[0]; + for (j = 512; j > 0; j-=bs) { + errno=ci->encrypt(cx, (u32 *)in, (u32 *)out, bs); + if(errno) { + perror("Can't encryp in cipher_correct"); + return 1; + } + + in += bs; out += bs; + } + in = &buf_enc[0]; + out = &buf_dec[0]; + for (j = 512; j > 0; j-=bs) { + errno=ci->decrypt(cx, (u32 *)in, (u32 *)out, bs); + if(errno) { + perror("Can't encryp in cipher_correct"); + return 1; + } + + in += bs; out += bs; + } + if (err = my_memcmp(buf, buf_dec, sizeof(buf))) { + PRINTF("failed ecb check"); + return err; + } + } + { + struct cipher_implementation *ci_cbc; + ci_cbc = find_cipher_by_id(ci->cipher_id | CIPHER_CBC); + if (!ci_cbc) + return 0; /* not supporting cbc is ok */ + memset(cx->iv, 0, sizeof(cx->iv)); + ci_cbc->encrypt(cx, (u32 *)buf, (u32 *)buf_enc, 512); + ci_cbc->decrypt(cx, (u32 *)buf_enc, (u32 *)buf_dec, 512); + if (err = my_memcmp(buf, buf_dec, sizeof(buf))) { + PRINTF("failed cbc check"); + PRINTF("\nPlaintext buffer\n"); + dump_u8_buffer(buf, 512); + PRINTF("\nEncrypted plaintext\n"); + dump_u8_buffer(buf_enc, 512); + PRINTF("\nDecrypted buffer\n"); + dump_u8_buffer(buf_dec, 512); + exit(err); + return err; + } + } +} + +asmlinkage int printk(const char * fmt, va_list args) +{ + return vprintf(fmt, args); +} + +void dump_u8_buffer(u8 *buf, int number) +{ + int i; + + for(i=0;i +#include +#include + +extern void *malloc(size_t size); +extern void free(void *ptr); + + +void * kmalloc(size_t x, int kind) +{ + return malloc(x); +} + +void kfree(const void *x) +{ + free(((const void *)x)); +} + + +int proc_register(struct proc_dir_entry *parent, struct proc_dir_entry *child) +{ + return 0; +} + +int proc_unregister(struct proc_dir_entry *entry, int stuff) +{ + return 0; +} + +struct proc_dir_entry proc_root; +struct proc_dir_entry proc_root_fs; + +int request_module(const char * name) +{ + return (int) name; +} + diff -Nru linux-2.4.0-test9/crypto/testing/test.3des-ede linux-2.4.0-test9-int/crypto/testing/test.3des-ede --- linux-2.4.0-test9/crypto/testing/test.3des-ede Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/test.3des-ede Sun Oct 15 12:20:50 2000 @@ -0,0 +1,41 @@ +# Test-vectors for 3des-ede from cryptix: + +:-) For the record, here are the test vectors in Cryptix: + + private static final String[][] TEST_VALUES = { + // key ............................................ + // plain text ..... cipher text .... + // + { // same key ==> DES + "010101010101010101010101010101010101010101010101", + "95F8A5E5DD31D900", "8000000000000000" }, + { // same key ==> DES + "010101010101010101010101010101010101010101010101", + "9D64555A9A10B852", "0000001000000000" }, + { // same key ==> DES + "3849674C2602319E3849674C2602319E3849674C2602319E", + "51454B582DDF440A", "7178876E01F19B2A" }, + { // same key ==> DES + "04B915BA43FEB5B604B915BA43FEB5B604B915BA43FEB5B6", + "42FD443059577FA2", "AF37FB421F8C4095" }, + { // for checking first phase of below, defers to same + "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF", + "736F6D6564617461", "3D124FE2198BA318" }, + { // note k1 == k3 + "0123456789ABCDEF55555555555555550123456789ABCDEF", + "736F6D6564617461", "FBABA1FF9D05E9B1" }, + { + "0123456789ABCDEF5555555555555555FEDCBA9876543210", + "736F6D6564617461", "18d748e563620572" }, + { + "0352020767208217860287665908219864056ABDFEA93457", + "7371756967676C65", "c07d2a0fa566fa30" }, + { // some of the weak(?) keys found in the test data + "010101010101010180010101010101010101010101010102", + "0000000000000000", "e6e6dd5b7e722974" }, + { // some of the weak(?) keys found in the test data + "10461034899880209107D0158919010119079210981A0101", + "0000000000000000", "e1ef62c332fe825b" }, + }; + + diff -Nru linux-2.4.0-test9/crypto/testing/test.blowfish linux-2.4.0-test9-int/crypto/testing/test.blowfish --- linux-2.4.0-test9/crypto/testing/test.blowfish Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/test.blowfish Sun Oct 15 12:20:50 2000 @@ -0,0 +1,54 @@ +#!/bin/bash + +NR=1 +test () { + echo "Test number $NR" + ./testcip -c blowfish "$@" | sed '/^Registered/d' + NR=$[NR+1] +} + +test -k 0000000000000000 -p 0000000000000000 -e 4EF997456198DD78 +test -k FFFFFFFFFFFFFFFF -p FFFFFFFFFFFFFFFF -e 51866FD5B85ECB8A +test -k 3000000000000000 -p 1000000000000001 -e 7D856F9A613063F2 +test -k 1111111111111111 -p 1111111111111111 -e 2466DD878B963C9D +test -k 0123456789ABCDEF -p 1111111111111111 -e 61F9C3802281B096 +test -k 1111111111111111 -p 0123456789ABCDEF -e 7D0CC630AFDA1EC7 +test -k 0000000000000000 -p 0000000000000000 -e 4EF997456198DD78 +test -k FEDCBA9876543210 -p 0123456789ABCDEF -e 0ACEAB0FC6A0A28D +test -k 7CA110454A1A6E57 -p 01A1D6D039776742 -e 59C68245EB05282B +test -k 0131D9619DC1376E -p 5CD54CA83DEF57DA -e B1B8CC0B250F09A0 +test -k 07A1133E4A0B2686 -p 0248D43806F67172 -e 1730E5778BEA1DA4 +test -k 3849674C2602319E -p 51454B582DDF440A -e A25E7856CF2651EB +test -k 04B915BA43FEB5B6 -p 42FD443059577FA2 -e 353882B109CE8F1A +test -k 0113B970FD34F2CE -p 059B5E0851CF143A -e 48F4D0884C379918 +test -k 0170F175468FB5E6 -p 0756D8E0774761D2 -e 432193B78951FC98 +test -k 43297FAD38E373FE -p 762514B829BF486A -e 13F04154D69D1AE5 +test -k 07A7137045DA2A16 -p 3BDD119049372802 -e 2EEDDA93FFD39C79 +test -k 04689104C2FD3B2F -p 26955F6835AF609A -e D887E0393C2DA6E3 +test -k 37D06BB516CB7546 -p 164D5E404F275232 -e 5F99D04F5B163969 +test -k 1F08260D1AC2465E -p 6B056E18759F5CCA -e 4A057A3B24D3977B +test -k 584023641ABA6176 -p 004BD6EF09176062 -e 452031C1E4FADA8E +test -k 025816164629B007 -p 480D39006EE762F2 -e 7555AE39F59B87BD +test -k 49793EBC79B3258F -p 437540C8698F3CFA -e 53C55F9CB49FC019 +test -k 4FB05E1515AB73A7 -p 072D43A077075292 -e 7A8E7BFA937E89A3 +test -k 49E95D6D4CA229BF -p 02FE55778117F12A -e CF9C5D7A4986ADB5 +test -k 018310DC409B26D6 -p 1D9D5C5018F728C2 -e D1ABB290658BC778 +test -k 1C587F1C13924FEF -p 305532286D6F295A -e 55CB3774D13EF201 +test -k 0101010101010101 -p 0123456789ABCDEF -e FA34EC4847B268B2 +test -k 1F1F1F1F0E0E0E0E -p 0123456789ABCDEF -e A790795108EA3CAE +test -k E0FEE0FEF1FEF1FE -p 0123456789ABCDEF -e C39E072D9FAC631D +test -k 0000000000000000 -p FFFFFFFFFFFFFFFF -e 014933E0CDAFF6E4 +test -k FFFFFFFFFFFFFFFF -p 0000000000000000 -e F21E9A77B71C49BC +test -k 0123456789ABCDEF -p 0000000000000000 -e 245946885754369A +test -k FEDCBA9876543210 -p FFFFFFFFFFFFFFFF -e 6B5C5A9C5D9E0A5A + + + + + + + + + + + diff -Nru linux-2.4.0-test9/crypto/testing/test.des linux-2.4.0-test9-int/crypto/testing/test.des --- linux-2.4.0-test9/crypto/testing/test.des Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/test.des Sun Oct 15 12:20:50 2000 @@ -0,0 +1,83 @@ +#!/bin/bash + +NR=1 +test () { + echo "Test number $NR" + ./testcip -c des "$@" | sed '/^Registered/d' + NR=$[NR+1] +} + +test -k 0000000000000000 -p 0000000000000000 -e 8CA64DE9C1B123A7 +test -k FFFFFFFFFFFFFFFF -p FFFFFFFFFFFFFFFF -e 7359B2163E4EDC58 +test -k 3000000000000000 -p 1000000000000001 -e 958E6E627A05557B +test -k 1111111111111111 -p 1111111111111111 -e F40379AB9E0EC533 +test -k 0123456789ABCDEF -p 1111111111111111 -e 17668DFC7292532D +test -k 1111111111111111 -p 0123456789ABCDEF -e 8A5AE1F81AB8F2DD +test -k 0000000000000000 -p 0000000000000000 -e 8CA64DE9C1B123A7 +test -k FEDCBA9876543210 -p 0123456789ABCDEF -e ED39D950FA74BCC4 +test -k 7CA110454A1A6E57 -p 01A1D6D039776742 -e 690F5B0D9A26939B +test -k 0131D9619DC1376E -p 5CD54CA83DEF57DA -e 7A389D10354BD271 + +test -k 07A1133E4A0B2686 -p 0248D43806F67172 -e 868EBB51CAB4599A +test -k 3849674C2602319E -p 51454B582DDF440A -e 7178876E01F19B2A +test -k 04B915BA43FEB5B6 -p 42FD443059577FA2 -e AF37FB421F8C4095 +test -k 0113B970FD34F2CE -p 059B5E0851CF143A -e 86A560F10EC6D85B +test -k 0170F175468FB5E6 -p 0756D8E0774761D2 -e 0CD3DA020021DC09 +test -k 43297FAD38E373FE -p 762514B829BF486A -e EA676B2CB7DB2B7A +test -k 07A7137045DA2A16 -p 3BDD119049372802 -e DFD64A815CAF1A0F +test -k 04689104C2FD3B2F -p 26955F6835AF609A -e 5C513C9C4886C088 +test -k 37D06BB516CB7546 -p 164D5E404F275232 -e 0A2AEEAE3FF4AB77 +test -k 1F08260D1AC2465E -p 6B056E18759F5CCA -e EF1BF03E5DFA575A + +test -k 584023641ABA6176 -p 004BD6EF09176062 -e 88BF0DB6D70DEE56 +test -k 025816164629B007 -p 480D39006EE762F2 -e A1F9915541020B56 +test -k 49793EBC79B3258F -p 437540C8698F3CFA -e 6FBF1CAFCFFD0556 +test -k 4FB05E1515AB73A7 -p 072D43A077075292 -e 2F22E49BAB7CA1AC +test -k 49E95D6D4CA229BF -p 02FE55778117F12A -e 5A6B612CC26CCE4A +test -k 018310DC409B26D6 -p 1D9D5C5018F728C2 -e 5F4C038ED12B2E41 +test -k 1C587F1C13924FEF -p 305532286D6F295A -e 63FAC0D034D9F793 +test -k 0101010101010101 -p 0123456789ABCDEF -e 617B3A0CE8F07100 +test -k 1F1F1F1F0E0E0E0E -p 0123456789ABCDEF -e DB958605F8C8C606 +test -k E0FEE0FEF1FEF1FE -p 0123456789ABCDEF -e EDBFD1C66C29CCC7 + +test -k 0000000000000000 -p FFFFFFFFFFFFFFFF -e 355550B2150E2451 +test -k FFFFFFFFFFFFFFFF -p 0000000000000000 -e CAAAAF4DEAF1DBAE +test -k 0123456789ABCDEF -p 0000000000000000 -e D5D44FF720683D0D +test -k FEDCBA9876543210 -p FFFFFFFFFFFFFFFF -e 2A2BB008DF97C2F2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru linux-2.4.0-test9/crypto/testing/test.mars linux-2.4.0-test9-int/crypto/testing/test.mars --- linux-2.4.0-test9/crypto/testing/test.mars Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/test.mars Sun Oct 15 12:20:50 2000 @@ -0,0 +1,438 @@ +#!/bin/bash + +test () { + echo "Test number $I - keysize $KEYSIZE" + echo testcip -c mars -k $KEY -p $PT -e $CT + ./testcip -c mars -k $KEY -p $PT -e $CT | sed '/^Registered/d' +} + +# This data is from the MARS website at +# http://www.research.ibm.com/security/mars.html + +KEYSIZE=128 + +KEY=00000000000000000000000000000000 +PT=00000000000000000000000000000000 +CT=deb3513283c296de39069e6b994c2438 + +test +exit + + The MARS cipher: Test vectors for encryption and key expansion + --------------------------------------------------------------- + +For each key and plaintext, the following information is given: + +Key[n]: The original key, consisting of n 32-bit words +Expanded key: The 40-word expanded key array +Plain Text: The 4-word plaintext +IV1: Values after key addition +IV2: Values after Forward mixing +IV3: Values after Forward "core" +IV4: Values after Backwards "core" +IV5: Values after Backwards mixing +Encryption: The 4-word ciphertext (after key subtraction) + +All the values are given as arrays of 32-bit words. + +======================================================================== + +KEYSIZE=128 + +Key[4]= 00000000 00000000 00000000 00000000 +Expanded Key= [ + b1a4a724 a4ebfe6c 8c31f1ff 46f21b7f 3107f81e 72538073 d9d5bb7c 07cd149b + fd2c12fa e5135e4f 753ab740 bb33ab03 d576aff3 7c14f40b 729b9d51 06a17a6f + 9bf4836a 14d4a4e3 3cebfbf6 a2fe105b d602ac90 330ae033 7838d957 e477c263 + 1c3c1975 09a546d7 e1b7efda 54441e9f c98e224a 2e237bf3 964fa90b 56f7ae07 + 9f7da180 86bad2ef 9e2b2c11 056f518f 1dd62186 b1e4e06c e37c58bc a1f6a479 +] +Plain Text= 00000000 00000000 00000000 00000000 +IV1=b1a4a724 a4ebfe6c 8c31f1ff 46f21b7f +IV2=d4ae0c38 eb8ea742 641bdc9c bdb280da +IV3=ac1a7cb0 acc2f1f0 4758625c e6a02ebb +IV4=d0bd0bde 37a00fb8 42611579 2b2e7337 +IV5=fc8972b8 35a7774a 1c82f727 3b42c8b1 +Encryption= deb35132 83c296de 39069e6b 994c2438 + + + +Key[4]= deb35132 83c296de 39069e6b 994c2438 +Expanded Key= [ + 107f46e3 39ad6bbf aca8391d 44ed470a ad55b583 92110113 54b14fdb f205608b + a9a28c86 bf72c2c3 f61ee573 2ea0a3f7 0a9cf79f 59304a1f 512724f6 367da517 + ef526563 25b0ed67 fa465e58 240a3743 7853b1f3 4e240a9f c17dbecc addaf83b + bfa7fef7 0707ea83 617a9c9d d1679d07 c1145fe7 67c8d86b d682cdb0 b8d7c197 + d233542f 650b9107 32658199 d17af7bb 5402a899 800a2588 aa01ba64 6fff9d90 +] +Plain Text= deb35132 83c296de 39069e6b 994c2438 +IV1=ef329815 bd70029d e5aed788 de396b42 +IV2=4ca72af4 03c66f6d ccad0d6e 96630d80 +IV3=9329ec9a 3d26d758 7cefb387 efedf183 +IV4=39cc73ee 820582dd 1210940a 0a8c46e4 +IV5=fd14ee92 ce0d533c ae243428 0ba5a667 +Encryption= a91245f9 4e032db4 042279c4 9ba608d7 + + + +Key[4]= 77a114cb cdc1bb6a 3d24e7af 02ea2cef +Expanded Key= [ + 44cb6f54 153cc9b2 6ee728e4 a340f7b6 540c1cd3 c409ec9f cdd08801 5091a06b + bcf3fe6d dd2fe2b3 8fb06ca6 5c010d73 68dbb887 bca5cb7b d11bbc8d 151e15c7 + 4a82ec22 3102c2b3 302c92be 31d87c33 0c5f67d8 b0fd72af eeaf82dd f9750f33 + 0787e8e9 4a62dcfb c60b8ef6 f94c0607 7c9c2b56 b49dfca3 414b9c9b dbd4aa0b + b6b17ece 0732d49b 2d9417fe 63ac89ab 339d359b a20d713e a78ab93a 065f28ef +] +Plain Text= a91245f9 4e032db4 042279c4 9ba608d7 +IV1=edddb54d 633ff766 7309a2a8 3ee7008d +IV2=f5281910 68768f38 ebc1221e 79a7d9b8 +IV3=766b7d4a bf15a754 c0116d3a bdf880a2 +IV4=b9f2e174 6669507c 7284181a db627725 +IV5=e0f32ee8 089aaa99 b1ed467a b040501a +Encryption= ad55f94d 668d395b 0a628d40 a9e1272b + + + +Key[4]= daf4ed86 ab4c8231 37466aef ab0b0bc4 +Expanded Key= [ + 9ab7ae2b 0f73f81c afce20e3 9f2cfc8c 24588fd8 71821903 f4c0714f 13e5cf37 + 0c5504ef 87652183 94cf826a 44154193 ac28ea54 0a2bc753 19b79d6d 75a2cb9b + 4c29c8b8 3252e0af ec304911 802ece97 50e19471 03d7b0bb 0dc62c42 33228923 + 55fe4042 27ad014f 00d18904 5008eb3f b1fd2680 7e5d366b edfefe45 3705a077 + 038249f0 783d8b4f 48d8876f 879d2d47 1501127d 767cfa6a 4ae62be2 b078cdc5 +] +Plain Text= ad55f94d 668d395b 0a628d40 a9e1272b +IV1=480da778 76013177 ba30ae23 490e23b7 +IV2=e487eaaa a632cb30 ff8e0b66 0ecec341 +IV3=25a6b5d9 1c060b55 a9650144 0abf5bc8 +IV4=eba5e911 c1dcb107 4d9d6879 84d82641 +IV5=e71059d1 abc6aef5 7a08a7f5 ecd3737c +Encryption= d20f4754 3549b48b 2f227c13 3c5aa5b7 + + + +Key[4]= 08fbaad2 9e0536ba 186416fc 9751ae73 +Expanded Key= [ + 8facb7c3 1e4d7bd0 502e75b3 be262b34 42339164 bc93d863 77542989 57830ca3 + c6005fa6 f961896f 77dabef4 eef3f5ef 2f6d2790 7191e8d3 7a9a75a9 954ab137 + f0f3e6a4 897eea03 da6255a4 651f381f d955b3cc 4c6f688f 98dd5f55 c9af195b + 46cc7058 594426cb 6dcc6f5d 246e1603 4885ac99 a55f011f f0a974f4 1e7879bb + 496516db 53586ce7 052ee42b 16931b2f 2344322a 65538aa7 907ebef8 2edcb4b5 +] +Plain Text= d20f4754 3549b48b 2f227c13 3c5aa5b7 +IV1=61bbff17 5397305b 7f50f1c6 fa80d0eb +IV2=1f5b2a7f 98e26c7d 9c28a2db c388d646 +IV3=5391c7f7 ac9974d6 c61a1ba2 2a835d9a +IV4=439e5ccf 09e5f169 dd070fc1 e48c7f88 +IV5=66d17bdc 564113e9 cf75bd7d b837736d +Encryption= 438d49b2 f0ed8942 3ef6fe85 895abeb8 + + + +Key[4]= 4b76e360 6ee8bff8 2692e879 1e0b10cb +Expanded Key= [ + 52c6f009 815d8fe2 bca5d163 ed58e175 7fcea016 1b1d6a83 6aa9dc77 81738423 + e14a5dac fcf52adb 29555a50 7d69b6cf 86b2fda6 68379ba7 56be0e57 7ee6b92f + a61e4f38 be2b2907 9e38217e ba274493 5a07edf2 81e73e03 d32d7b57 3fa55113 + da0b9ce7 2db6fe77 716a0763 c325bc9b 11f60f27 a630f1d3 002dea39 211a58ef + b31e95b2 d25b023b 4bfa6acd 52fae8eb ae6284ad 93194cdd 138cb6c5 edacf29e +] +Plain Text= 438d49b2 f0ed8942 3ef6fe85 895abeb8 +IV1=965439bb 724b1924 fb9ccfe8 76b3a02d +IV2=7b6be06c 602314b7 63771017 37bea240 +IV3=1db44a41 a2b1ac42 b17bc0d1 a1def98a +IV4=0d57f939 2af36857 096d5f88 a4d22e98 +IV5=aeccfcfb 44341a9c d70f8297 c04ad313 +Encryption= 006a784e b11acdbf c382cbd2 d29de075 + + + +Key[4]= 3c574a4f 4d9ee67d 8502e334 cb30c961 +Expanded Key= [ + 799cd786 064c7fdb 40797b7d a7d6d58d d30dac61 83a0a657 95c4c8ad bfe9f16f + 0f1d67f8 2b655cfb a3ada6ea 971696bb c7f6f838 62bd9817 2a28d073 d00a5dc3 + 70e5b711 833a53cb c41ac997 0226db0f 2a0e962f 4ae61c07 57524b48 75296af3 + 4a3ec498 4899295b 246af131 6ab8bfd3 cab75997 5526fb83 3b006506 701724d7 + 259d2f30 a5495eb3 2c322c6e 6ca0bfbb 96499bb9 35d296e6 c5405907 c790427f +] +Plain Text= 774bd161 926c943a 6012c09f 07a639df +IV1=f0e8a8e7 98b91415 a08c3c1c af7d0f6c +IV2=e505456e 5e50b756 104c76bc 3b7a7f0f +IV3=cd65c3b7 df284a23 cf1d4788 7ac39e05 +IV4=c3335301 9434ec9d b866e1fe 7af2b0d9 +IV5=bc29fc5a acb54455 e56b5886 6e618555 +Encryption= 25e060a1 76e2ad6f 202aff7f a6d142d6 + + + +Key[4]= 19b72aee 3b7c4b12 a5281c4b 6de18bb7 +Expanded Key= [ + 0982d435 f7279ef7 1bda470b 45f061e5 ba116f23 c895f257 5381bcd7 98f66d13 + 97225c42 3f947a5f 651e009f 2606f323 32037254 84ef30f3 c969d992 5494cbcb + 32aff3a5 fbbc8d13 0566bf24 8b900dcb 202848e2 3d4326f3 a4283891 2d15c6e7 + ebf715af ad204e3b c244af1b ac3a3bcb 73be3c62 7c4f754b 00d579c8 de94f6f7 + e5f0cf5c af81d4a7 6bd0c00e dbae03f3 0cabad09 83ade475 b0f5b796 5aedfcd4 +] +Plain Text= 25e060a1 76e2ad6f 202aff7f a6d142d6 +IV1=2f6334d6 6e0a4c66 3c05468a ecc1a4bb +IV2=6f36adf6 ea07f787 ca688e0c f4c1e34e +IV3=e821d02c 5f02db89 55620874 a840651d +IV4=f66436e2 d40e8df4 0ff380b2 9675ffe3 +IV5=f172fa0b 602df703 9b0632f6 171dbbd0 +Encryption= e4c74d02 dc80128e ea107b60 bc2fbefc + + + +Key[4]= fd7067ec e7fc599c 4f38672b d1ce354b +Expanded Key= [ + 35c6054c ead872e0 173d6797 4c3fb6bc dce28b70 3d3fe397 bdd6a46a 212e68fb + eab4dcf5 f7940653 9e40d6a4 0d05f15b 9107bcb2 b1203cb3 bf2cdc40 0fc1c023 + 024817f6 c840506b 079bd465 328bcd5b 54167911 21a2fdcf 904e85f1 9d13314b + 8d73ebe6 474ea967 2bd38bfa 8171605f eeeb15ac aae9dfab 216fb826 d0344cbf + 36930990 6567d303 b69b3b7e ff916b63 38ed75e4 cc4ba8aa 4caae370 9ee7eeaa +] +Plain Text= e4c74d02 dc80128e ea107b60 bc2fbefc +IV1=1a8d524e c758856e 014de2f7 086f75b8 +IV2=a1dbf118 a63a2592 da97146d 633d7cd4 +IV3=7b6da857 9daaa4be ed94501a f2828a94 +IV4=0a9e10fd e5718e50 f9368c26 0a954028 +IV5=96078932 fc574ac3 c9486194 3a1e2cf2 +Encryption= 5d1a134e 300ba219 7c9d7e24 9b363e48 + + + +Key[4]= a06a74a2 d7f7fb85 33a5190f 4af80b03 +Expanded Key= [ + 6a27430b 05197ee0 12bf0ca4 bae671d5 8f5c134c 609be0d3 9588298c 0259f10b + 9b74a8b1 f1eec9db 00209110 4c3d5a47 453eac26 414c783b 199f646f 07926d87 + 3c6485ad be978c6b c11c4c1b efaa2b63 7d279602 ddc41c57 b2ed70bb e666b34b + 3e746d2e e5368f07 eff70385 7d604743 9dce2946 c944cf0b 778a497c 35cfe4ff + 1203474e 3232ff5f 012eabef f479e82b 3cdc7dab 5552410a 03cbbaa2 3ed1c8d3 +] +Plain Text= 5d1a134e 300ba219 7c9d7e24 9b363e48 +IV1=c7415659 352520f9 8f5c8ac8 561cb01d +IV2=ac00b5b3 5fa9e06b d5ab2e6c 91ed9b75 +IV3=e97f4904 cfe41398 18e89eb8 46dddb60 +IV4=d1a0927a 9bc5bc62 b615c73f e9713c36 +IV5=49b56ac7 445c4f4a 8dc56b77 e715291d +Encryption= 0cd8ed1c ef0a0e40 89f9b0d5 a843604a + + +========================= + +KEYSIZE=192 + +Key[6]= 00000000 00000000 00000000 00000000 00000000 00000000 +Expanded Key= [ + 27dee7e4 154762f7 e3c5a235 c48782ce 5913a42a 721c0d67 a48a56ae 80625c03 + 5e79bc19 fa87c763 74dc1baa 95862b4f cb5e6aca adcfa1f7 f95d5ace 783dc87b + fb5a66c8 468d8353 57e96c55 a1b9080f 660f1eda 2280402b 7c08c082 aca23c27 + ac64e883 b12eeaef b4a136c0 badaefdf b01ea677 6941a1bf 1b3fc7df f957f01f + df5a6502 59716c27 b0ca5a13 ddf1435b 55cee350 f6258fd3 9022223d 3c80200d +] +Plain Text= 00000000 00000000 00000000 00000000 +IV1=27dee7e4 154762f7 e3c5a235 c48782ce +IV2=e80fc980 0742e155 bd8d241b 37783b4e +IV3=16b14fca 32df6557 46f71002 276b20e6 +IV4=cf2dc74c 50268150 e051a9c6 0b70b3c9 +IV5=fe228ce3 13669fff 98a87b0e d1cda745 +Encryption= a853a993 1d41102c 088658d1 954d8738 + + + +Key[6]= 088658d1 954d8738 00000000 00000000 00000000 00000000 +Expanded Key= [ + e1bbe2d1 38f11822 8b7ff4cb 833ef90a 3f5553aa 8d070683 17f7fe15 0f7ab327 + f3df6127 902acb97 81dee7fd 583bd767 89313d2a a3771397 28484806 a0d22c3f + 26ceab0c 3fd3aa03 2033baf6 4945ddcb 310275bd d349301b 75aa0b65 c232bb13 + 21e164da 61d7122b d9cdc3a3 a10dcdeb 963d65ee f79190e3 ac5fec07 7bb534db + 0ada3ccc ac68d1bf 07dd3839 bdf75b57 13a61e19 f98ced2b 0bf573f7 e785c0b7 +] +Plain Text= a853a993 1d41102c 088658d1 954d8738 +IV1=8a0f8c64 5632284e 94064d9c 188c8042 +IV2=42715daf 5ec41b05 3844f3df 2865b968 +IV3=ade6083c 910718db d65aef96 642a93e2 +IV4=6d30ef88 7233660f f6e45d88 d7b453c5 +IV5=416a7f80 cbcf4e69 b9b4c39f 769b446a +Encryption= 2dc46167 d242613e adbf4fa8 8f1583b3 + + + +Key[6]= a5391779 1a58048b a853a993 1d41102c 088658d1 954d8738 +Expanded Key= [ + 4a6aebc3 768beddd 1e423871 f8025453 a7c4735e 27ed4143 756416db c8becd2b + 8cf25e26 d6b74c8f c9228fe4 8358a8b7 52d355e2 79da8313 34f9b718 aec232ff + 47b58b4a b4d4b333 c1edc83b 8262694b 34383327 57b83157 28a3944b 364b51cf + 765df4d0 d32bfa13 5c46ca3f 59d46817 8418566a 9a84017b 1c513de5 5b93f74f + b5b9ad02 9a1d6973 54b5bc74 efb92a6f 98bbd3f0 3eb92df5 36b8fdf3 7ebf1ddf +] +Plain Text= 2dc46167 d242613e adbf4fa8 8f1583b3 +IV1=782f4d2a 48ce4f1b cc018819 8717d806 +IV2=e971f2c4 6d32633c 98d1e2f4 d19bf151 +IV3=f645cf5e fdd1e86a 270776f7 8c476579 +IV4=c9762c8c 12eae970 102304a5 82d58468 +IV5=bebf08bb ac11ad3a 178bbb47 3bd83a36 +Encryption= 260334cb 6d587f45 e0d2bd54 bd191c57 + + + +Key[6]= 45ebaa2d a74118dc 8597c8f4 cf037112 a5391779 1a58048b +Expanded Key= [ + c3789384 6cba897c 408d3347 62e14f4f 7d32d3fe 43ea20f7 37fa62bf da083f43 + 11d6a36a 07b4af27 df307c63 e17af4b3 a2a0780a 789c6bdb 01a69dca 222748cf + da90b300 2ec1916f e1f0f2e7 790a2f0b feaf1e2d c91f2683 3245b509 dccc6bdf + 37de8109 e7c010e7 4f2c4c08 c2e5657b 035e22f7 b1ec4a4b 6235691e 3adceb5b + aa741a09 6c5c2aaf 7ba3d350 70a06e87 0561f28b b4286bcc 1e5190ea c1e27949 +] +Plain Text= 260334cb 6d587f45 e0d2bd54 bd191c57 +IV1=e97bc84f da1308c1 215ff09b 1ffa6ba6 +IV2=6968e88e 48a6f539 f646d8f5 ccf35a64 +IV3=351f5756 5bcdd6dd b78eb579 21d447c8 +IV4=47795ee4 580e29ec d58aa750 f2786c0f +IV5=68327186 f1852491 2a73796a a41c3b33 +Encryption= 62d07efb 3d5cb8c5 0c21e880 e239c1ea + + + +Key[6]= 49ca42ad 4578d936 a394fc3f a25b0e57 45ebaa2d a74118dc +Expanded Key= [ + 46cf477d 7806a8af 6c0747fb dc22326f 62e33d0e 3eb59f73 4c4bdc94 6e11939f + 39b73bac d436284f e4e3c788 7730c9ff 1ad527ef 2a208e43 bbb18767 cc89ac87 + f5dba503 402435cf 55aed575 783a9b8b deb4e077 889f48bf b79241f0 3e3229d3 + da59b650 331295af 508fa084 3662f35b 8dd036f0 9338daab 04db36d4 441e3847 + 1bfbd04f a37048a7 5a73c893 8df886bb e71ca0b7 c12b1e84 e43fdbde e0d55925 +] +Plain Text= 62d07efb 3d5cb8c5 0c21e880 e239c1ea +IV1=a99fc678 b5636174 7829307b be5bf459 +IV2=17f9dc09 92619cfa f9eb89ed 6d073d91 +IV3=f8e918b0 0fa0e9a3 db163491 998e7a05 +IV4=0ab43ad1 80927ba4 81b55ad0 adbfa2e7 +IV5=15acb673 39db6781 51aed997 162a269d +Encryption= 2e9015bc 78b048fd 6d6efdb9 3554cd78 + + + +========================= + +KEYSIZE=256 + + +Key[8]= 9867a1fb 22ef7a3e 8ce27c31 a3e1aa02 3ccce5e8 2aa8beed 9ac3db99 27725ed6 +Expanded Key= [ + a91e1d4c 37e56ec3 e58bebf2 6880f69f 4befbee1 99b5f3c3 28f97526 848139ff + 61059077 67cf6183 7fa48a1e 540e89cb 38d3e758 2e9cf23b 447f210c d9522fbf + 00257735 49bbfecf fad2232a cf5b30f7 774d76c3 81c8b1bb a0aafceb 246d7bfb + ed446268 f9c3d043 1eec3571 66b20b3b c263fc6b 8b548cd3 74763e02 55fe0f6f + 9ce3a41e f4c52fe7 556a2237 3a9377f7 d234d139 012c7b59 0299ba4a c9146c4c +] +Plain Text= a4ab4413 0847c4d3 1621a7a8 8493f4d4 +IV1=4dc9615f 402d3396 fbad939a ed14eb73 +IV2=e9a020c2 e0a4f75c a8e75caf 7bbceb86 +IV3=7295ee8e ef559e88 c55cd79f cf801586 +IV4=43b9e148 e3e8b667 00b39555 5a77ef0e +IV5=39d67e16 bf5ddf3c 6238d676 81b8fc2f +Encryption= 67a1acdd be3163e3 5f9f1c2c b8a48fe3 + +Key[8]= ffc60d26 9cde19dd d37d601d 1b4525e1 9867a1fb 22ef7a3e 8ce27c31 a3e1aa02 +Expanded Key= [ + 097eb64b c557cf89 6bbac604 8521dae9 9a595464 324ce39b 65190327 994e3b77 + 4c9bc470 7946faf7 71223e33 131a1dab aa782641 cf99146b fdb3ca12 083277f7 + a94740ba a29543db be118237 1629f7c3 0405db16 f00dee7f d68b0ebd b29d18f7 + afe89b13 8ff53a93 39ed1fc8 5f0f1c2b 771b06ba c250d197 ebf3e844 10d89fcf + 8ebf8837 fe2eba8b b15728c9 96264faf bfdd1e1e d7d14fa5 9815fa3f 2af4dc7a +] +Plain Text= 67a1acdd be3163e3 5f9f1c2c b8a48fe3 +IV1=71206328 8389336c cb59e230 3dc66acc +IV2=7d103a6b 84778a60 3fdba434 9490f8f7 +IV3=66eb22aa 6b422c3b 54c5627e 04e8931e +IV4=ca1318c9 ce16accf 889d9385 eec063fe +IV5=86128f07 b5ef876d 5ca522a4 11a48ba6 +Encryption= c63570e9 de1e37c8 c48f2865 e6afaf2c + + + +Key[8]= 39f37dcf 42c02e15 17f24878 fdea8acd ffc60d26 9cde19dd d37d601d 1b4525e1 +Expanded Key= [ + b5d1b8fc cb2f7b75 5f1c1dda 00a62687 466f4f54 ea90d5f7 af0b7a08 b52eff07 + f651c6ad fe6e7fdf 8cfa506d 61229bcb 83447de8 fbecc4bb baba340c 2336e74b + cd8da3fa 59d6a0b7 1a2733bf ba8f591f 36551504 211451ef c4f6df9b 6bc36377 + 4ee90fc2 8c2e7d97 060d69e7 006c54c3 640d25f5 a26f3277 ecd2c408 8213195b + 5a19494e 552413ab 663979af c4a3ebb3 f2f1c819 2958ee3d 0fe42311 d13d70fe +] +Plain Text= c63570e9 de1e37c8 c48f2865 e6afaf2c +IV1=7c0729e5 a94db33d 23ab463f e755d5b3 +IV2=205d700c edb01810 dd5d7ea0 63e57e89 +IV3=21fc603a 94f5c159 326f10a0 caee99ed +IV4=7a8e1a8d 19e3c5ff c75861d8 70ad45de +IV5=032a106f e7fd9725 a5221cac 2855b0e3 +Encryption= 10384856 bea4a8e8 953df99b 57183fe5 + + + +Key[8]= 29cb3599 fc6486fd 82cfb1e3 aaf2b528 39f37dcf 42c02e15 17f24878 fdea8acd +Expanded Key= [ + 4dcf4e2f 993b2ae8 299c9b55 ba6eee2e 33fc179a c86f1f83 62ad2038 85124d6f + 36862f67 72cc261f 9439514a c4d83ec3 084d31f7 c5763c1f ef5c7974 c17c9487 + 0d4b3adc 25e5df1b a9c5e13c f20eeee7 72a6014c 3145e1c7 271f2f02 6e3f566f + a8e1bed1 c8e60d2b 224c7330 985d62bf 17807fea 4c57f03f 5d4873bd b042a68b + e7e7038a 5458d3ef 6bd3ecfa a94ca647 490f7727 108fa88a 17083fe5 00bd62df +] +Plain Text= 10384856 bea4a8e8 953df99b 57183fe5 +IV1=5e079685 57dfd3d0 beda94f0 11872e13 +IV2=420b553e 6df086e4 7999e228 e50073e3 +IV3=5fc050ea c292d8ef ebf6e830 1bb84912 +IV4=f7fabec8 76867745 c83005b0 af07ab80 +IV5=20a3f1a0 76ade4b6 8eed877d cab8c5f5 +Encryption= d7947a79 661e3c2c 77e54798 c9fb6316 + + + +Key[8]= fe5f4fe0 9a7abad1 f52af67b 6309d63e 29cb3599 fc6486fd 82cfb1e3 aaf2b528 +Expanded Key= [ + c565d096 141e8678 9b1fd313 0ac36be1 d58bb999 80f197fb 5fea7d4e c922cfef + 24ef0266 7a20c223 04eff6ef bc1937cf a2cf1793 738e0507 e0917cf6 22c0348f + aa14ea8e c8119caf 0b4aa557 3b415933 e8f62c04 ee8de23b 989d55d5 c0ff2ebb + 76ae8a58 aa691277 58087c0b 58754acf bd4437e3 119b67cf 79ecad7c 20ef4ccb + 872a528a f4726f5b cb92238a 83e06e47 97b5b690 739f70d6 4643d98f 398a936b +] +Plain Text= d7947a79 661e3c2c 77e54798 c9fb6316 +IV1=9cfa4b0f 7a3cc2a4 13051aab d4becef7 +IV2=d906fff1 be0c3a1c 7f0685ef 059b0b7b +IV3=b67e9f99 0cec4744 b1259502 4a9ee8c4 +IV4=17727c21 5dd4dc1e daceacdb 9a8439f8 +IV5=e831be7a 8b46342a 97c46f04 756ca673 +Encryption= 507c07ea 17a6c354 51809575 3be21308 + + + +Key[8]= ae23480a 8ddc7985 a4aa630e 58ebc536 fe5f4fe0 9a7abad1 f52af67b 6309d63e +Expanded Key= [ + bbc05697 e91c98f2 dfc3b387 6cd475f7 58481400 7ca14ca7 1296cbaa a67919f3 + d8affabd 334358ff b91b1cbe db172497 f9f4d090 712c94ff 429feb5f 7e627087 + 09da20af 1140babb 3d5b3bb3 20c4df67 72702b6d 1c70527b dd0fe8ad 7931df1b + ea38af60 ec62bc1b a23b6d3a b0c21223 c51e7c79 012ff093 3230d7af ddedba1f + 23104c69 4d0614ab 287b7f3f 85b5953b 30897d20 5a87dc90 753693f5 7983c677 +] +Plain Text= 507c07ea 17a6c354 51809575 3be21308 +IV1=0c3c5e81 00c35c46 314448fc a8b688ff +IV2=aa2c442a 8d933397 09eb28e5 60ba4a67 +IV3=1ebfcfc0 4e5c1e33 2b25a340 6e4b6580 +IV4=36fc10a6 63763bf3 18cbaad4 aeaabd86 +IV5=e6ffe933 669e74d5 3193e177 1c949040 +Encryption= b6766c13 0c169845 bc5d4d82 a310c9c9 + +========== + + + + + + + + + + + + + + diff -Nru linux-2.4.0-test9/crypto/testing/test.rc5 linux-2.4.0-test9-int/crypto/testing/test.rc5 --- linux-2.4.0-test9/crypto/testing/test.rc5 Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/test.rc5 Sun Oct 15 12:20:50 2000 @@ -0,0 +1,1548 @@ +#!/bin/bash + +# NOTE! These are real test vectors but they _are not_ tested +# with ./testcip -program, since it didn't compile. -Pekka + +test () { + echo "Test number $I - keysize $KEYSIZE" + ./testcip -c rc5 -k $KEY -p $PLT -e $CIP | sed '/^Registered/d' +} + + +KEYSIZE=128 + +I=1 +KEY=00000000000000000000000000000000 +PLT=0000000000000000 +CIP=883883FF1E216EAE +test + +I=2 +KEY=4433112FEAB711778BEF67A792110E8F +PLT=883883FF1E216EAE +CIP=B778BA49909B416E +test + +I=3 +KEY=34674A5515253711848516413A3FA2D9 +PLT=B778BA49909B416E +CIP=FCD887CC6CFA3EC8 +test + +I=4 +KEY=2A34F9A881DE3F2C537E93949FEEE60C +PLT=FCD887CC6CFA3EC8 +CIP=8967D496B0790EDA +test + +I=5 +KEY=5C32634A4DDE89D67002430E38B084B6 +PLT=8967D496B0790EDA +CIP=EA2C67E337131273 +test + +I=6 +KEY=62C3A6BFDBDFC8ABB5358023A4C76153 +PLT=EA2C67E337131273 +CIP=A86C8CE7DF81CC2A +test + +I=7 +KEY=890157A721F7862748713E53716D30A7 +PLT=A86C8CE7DF81CC2A +CIP=C474526F0017C435 +test + +I=8 +KEY=FA1573DF3C738EA7ECA937038E89A3AF +PLT=C474526F0017C435 +CIP=E9428C0CBE68C918 +test + +I=9 +KEY=C486E9A07038E89C75B2B5F00786544C +PLT=E9428C0CBE68C918 +CIP=0BD943E39068D335 +test + +I=10 +KEY=0C2F94875343A2C3F48DD42FD847B593 +PLT=0BD943E39068D335 +CIP=D445FD7502F07D7E +test + +I=11 +KEY=8D3789B1F0A1301D05939C05B1CB8015 +PLT=D445FD7502F07D7E +CIP=71B62AEA0F789FB2 +test + +I=12 +KEY=3DACF2D62BC4948AA6F497AA6A16EA6A +PLT=71B62AEA0F789FB2 +CIP=D4DE56FFD5ACAC3B +test + +I=13 +KEY=0AD98B4F693728BFA58B41A3BBA185AF +PLT=D4DE56FFD5ACAC3B +CIP=27B9AAC70CE6DD54 +test + +I=14 +KEY=53438A230735B087BF71A8872CAB4517 +PLT=27B9AAC70CE6DD54 +CIP=96D4000A1FE521FE +test + +I=15 +KEY=751A9596D72A606A44F09D6E9F8A8E2A +PLT=96D4000A1FE521FE +CIP=027D596E70E67FDD +test + +I=16 +KEY=472A264AA54C4AAE90020BBA387EAACE +PLT=027D596E70E67FDD +CIP=084D7486097F5DEA +test + +I=17 +KEY=50E67E4A7D50F2A69C143C569B52A8E6 +PLT=084D7486097F5DEA +CIP=26DCE9FD91831497 +test + +I=18 +KEY=EA7DA3517A1D33BDC963906D128D19BD +PLT=26DCE9FD91831497 +CIP=DCAB4E64921547DA +test + +I=19 +KEY=3BA0DF5C89F44A3C9D62863089EAC8A4 +PLT=DCAB4E64921547DA +CIP=18ABE640B9E6B971 +test + +I=20 +KEY=EA829ED8CE226C5888A8687075304F90 +PLT=18ABE640B9E6B971 +CIP=2EDA40B0C834F765 +test + +I=21 +KEY=F9141E3C965EC0004AE427489F8C6890 +PLT=2EDA40B0C834F765 +CIP=059656D159706DAA +test + +I=22 +KEY=C305B5F9F5CDA5A1E59FEB05F00544E1 +PLT=059656D159706DAA +CIP=E59344102717A1A1 +test + +I=23 +KEY=CD2088A01AB458F09A76C3E4589E76A0 +PLT=E59344102717A1A1 +CIP=0B1A42A432EA975B +test + +I=24 +KEY=0CEA8624097AC3340F9C3928B4441A84 +PLT=0B1A42A432EA975B +CIP=935524627CF77EF6 +test + +I=25 +KEY=6FA285AEC47E9CF26DF0925E78229442 +PLT=935524627CF77EF6 +CIP=061166839FBF56C2 +test + +I=26 +KEY=01C5F6BB3B97019383F11A13103BBED3 +PLT=061166839FBF56C2 +CIP=40323BD418CE9235 +test + +I=27 +KEY=821A2534DBBE7FC449B8DC806A727864 +PLT=40323BD418CE9235 +CIP=D6FFB23A5BF8CE2C +test + +I=28 +KEY=C3623F96BC1E3392EA0CB906DE8C435A +PLT=D6FFB23A5BF8CE2C +CIP=F08B20BFCD2AF65B +test + +I=29 +KEY=5CBFAF0BC0E39B27D52FAC0F0B83852F +PLT=F08B20BFCD2AF65B +CIP=2DD627ECD3B20DF2 +test + +I=30 +KEY=1806CD906F9024545B72D6D4B4C25DCC +PLT=2DD627ECD3B20DF2 +CIP=0AD02B4DD18C2FFB +test + +I=31 +KEY=533B47B9D8E9380595414901A79F37AD +PLT=0AD02B4DD18C2FFB +CIP=2BDD595B901A0D51 +test + +I=32 +KEY=BDE3DBB78D77930BF6991DAB931566DB +PLT=2BDD595B901A0D51 +CIP=BF99EB003ABFFA8E +test + +I=33 +KEY=45469BF00AAECC60712AB87CCC383F90 +PLT=BF99EB003ABFFA8E +CIP=19FD0782C6B334D5 +test + +I=34 +KEY=A056430A4DB4EBA28446963AD94E4482 +PLT=19FD0782C6B334D5 +CIP=5962E34BFCF57F33 +test + +I=35 +KEY=EA6DF6B7E3BD8DA36027639342EB49DB +PLT=5962E34BFCF57F33 +CIP=BCB9F81F66089A02 +test + +I=36 +KEY=8EE7B38B1D2576F7AC9DEDDFC1030F7F +PLT=BCB9F81F66089A02 +CIP=74C4E87C119D6A43 +test + +I=37 +KEY=9E0E961466805F0C9326DF1802EE66BC +PLT=74C4E87C119D6A43 +CIP=7D3AC9E8CF4EE80D +test + +I=38 +KEY=6A58B288F01A2E7034CAAB4C2EDE2288 +PLT=7D3AC9E8CF4EE80D +CIP=C113094AD4F73BD9 +test + +I=39 +KEY=28BCAAA6790025EA77E891BEE594620A +PLT=C113094AD4F73BD9 +CIP=E83AC68878EC1F24 +test + +I=40 +KEY=7250B348C9181BD87F42728409920018 +PLT=E83AC68878EC1F24 +CIP=E77397A9393BA826 +test + +I=41 +KEY=9CEF33092C6FBD21A79333E13FCD66C9 +PLT=E77397A9393BA826 +CIP=21ED57E24E0FE088 +test + +I=42 +KEY=4958DEB2A99E700232E826BEBB18B6B2 +PLT=21ED57E24E0FE088 +CIP=46B7622DBF7DCA53 +test + +I=43 +KEY=8D095121375B5D155A1B3DB58DBF678D +PLT=46B7622DBF7DCA53 +CIP=852F7D08CC743ADD +test + +I=44 +KEY=3AF060C46EB201C085D662C8D6603B58 +PLT=852F7D08CC743ADD +CIP=0B707A89924B83D9 +test + +I=45 +KEY=7F9B2561991B2B1930BB1B896A0FBAD9 +PLT=0B707A89924B83D9 +CIP=4147445F321F8AE4 +test + +I=46 +KEY=2C13A3772C63C817F43B9AEB14CF2CEF +PLT=4147445F321F8AE4 +CIP=05C4479BF4590B10 +test + +I=47 +KEY=AC69F3730BD913CB3D7FC033E82D11BB +PLT=05C4479BF4590B10 +CIP=014EC1E0611BEA26 +test + +I=48 +KEY=F1A80E28019C0D50748283808292B910 +PLT=014EC1E0611BEA26 +CIP=6B345C61D43CD647 +test + +I=49 +KEY=5D4BBC51AC8596A994397B5DD8171D21 +PLT=6B345C61D43CD647 +CIP=A610C68608A514A7 +test + +I=50 +KEY=049029D6BA04E5BEE8DC275219347AD6 +PLT=A610C68608A514A7 +CIP=BBA9CAAB6AA0748C +test + +I=51 +KEY=DBCF0A1BA76D36DB60BD22ABB499CADB +PLT=BBA9CAAB6AA0748C +CIP=42E67363D4D613D5 +test + +I=52 +KEY=00FDF893744BC9B3C8D5AF3339AB8AC3 +PLT=42E67363D4D613D5 +CIP=A6D7BCAFEC02F2B2 +test + +I=53 +KEY=EAC7487B8495F0EF0087276F21EDCB9F +PLT=A6D7BCAFEC02F2B2 +CIP=437A809B72F19809 +test + +I=54 +KEY=D9A59D67AC25828B0BC198671687BEBB +PLT=437A809B72F19809 +CIP=438E97832A094DE0 +test + +I=55 +KEY=EC0D81EF0A79025B55B96A3F20EFBF83 +PLT=438E97832A094DE0 +CIP=A0722DDE3E45366B +test + +I=56 +KEY=1F108976CD9CF71625766F7E2E10C52E +PLT=A0722DDE3E45366B +CIP=FFA9FBC2AE73C071 +test + +I=57 +KEY=686EF53E967259EAEE44D1BE3E9240C2 +PLT=FFA9FBC2AE73C071 +CIP=F93605BF2E6F52BE +test + +I=58 +KEY=F47B4E7F3DC785E78C1F634BD02D854F +PLT=F93605BF2E6F52BE +CIP=1CF5FB81DF6FDFB9 +test + +I=59 +KEY=8F393029D80359A1A123DFB97AEB0271 +PLT=1CF5FB81DF6FDFB9 +CIP=5A4D3E3D82FD3E36 +test + +I=60 +KEY=23C551F5F3911DE55FE3001DC8A95A7D +PLT=5A4D3E3D82FD3E36 +CIP=A652BD50C400EEBA +test + +I=61 +KEY=075230ACE7166D480922209849E05270 +PLT=A652BD50C400EEBA +CIP=E805C1A1484EF1FC +test + +I=62 +KEY=5189DAED836F9F210D99291D03774B51 +PLT=E805C1A1484EF1FC +CIP=372E8983886B0A77 +test + +I=63 +KEY=720DA49338EF305BE75D31E31E573B63 +PLT=372E8983886B0A77 +CIP=8D7661153BA61A68 +test + +I=64 +KEY=7A2579E9F83941BD7329B10D230BD3C5 +PLT=8D7661153BA61A68 +CIP=963A87730EB2C805 +test + +I=65 +KEY=CB27205F9DA34A731D47129B32159D53 +PLT=963A87730EB2C805 +CIP=482EA344585DB33D +test + +I=66 +KEY=5E8A8410F004160CC6467254E858A204 +PLT=482EA344585DB33D +CIP=A473072F359BD765 +test + +I=67 +KEY=4E37DA3F7299E7A72FDB3FCF484BA33F +PLT=A473072F359BD765 +CIP=905C759B4C34BC6B +test + +I=68 +KEY=FD83A2DFCF175E6B10259977C4AD642B +PLT=905C759B4C34BC6B +CIP=E89E2443E6F522C0 +test + +I=69 +KEY=EE5712C74153EE2B1F0D494B9AE3EFA3 +PLT=E89E2443E6F522C0 +CIP=B5CCF6919E60CC1B +test + +I=70 +KEY=0B6B1065EB3DF2D1A247ABE1145D1DA1 +PLT=B5CCF6919E60CC1B +CIP=88FB0FF209027FFB +test + +I=71 +KEY=864E92AAF9F4200239747202E93ACAC2 +PLT=88FB0FF209027FFB +CIP=1216BABE92A51E11 +test + +I=72 +KEY=A120A7AA9BEC1D96DB6EBF5EBC70ECCE +PLT=1216BABE92A51E11 +CIP=8C06F25DEF2168D8 +test + +I=73 +KEY=E2C56325800134BD59BBBF4940A5983D +PLT=8C06F25DEF2168D8 +CIP=F71DDDE756056FDE +test + +I=74 +KEY=DAE1EAFB37CB17777BBF0D2B1ADFC417 +PLT=F71DDDE756056FDE +CIP=5BF56211FC3CE08B +test + +I=75 +KEY=C48FA649BA5161518B8BCEE56D014401 +PLT=5BF56211FC3CE08B +CIP=57D3FEEE0C478627 +test + +I=76 +KEY=1900BC76589673362EB2371ED90C24BE +PLT=57D3FEEE0C478627 +CIP=FB1193AF48F3459B +test + +I=77 +KEY=5005D1D75087E9076EE34B87B30BBE5F +PLT=FB1193AF48F3459B +CIP=CB9785BFA8406508 +test + +I=78 +KEY=A8915D038917D51F44BD26134289D63F +PLT=CB9785BFA8406508 +CIP=8549B183313FCA50 +test + +I=79 +KEY=043F67BB8B3113A3710D13373DEB4013 +PLT=8549B183313FCA50 +CIP=A6BBB9CDB600EF18 +test + +I=80 +KEY=E96F5EC5C8997ABDCD294EDD983D9AAD +PLT=A6BBB9CDB600EF18 +CIP=726CD70982409ADE +test + +I=81 +KEY=BF059641D53D5C31B91756A9538BAE29 +PLT=726CD70982409ADE +CIP=1C76C2F3A6B6ADDC +test + +I=82 +KEY=493971A385CB377B60A31773914558A3 +PLT=1C76C2F3A6B6ADDC +CIP=895007DA59B8E78B +test + +I=83 +KEY=BB7C68D633E88592B194F2A6857E90CA +PLT=895007DA59B8E78B +CIP=6ABFD6669330CAFF +test + +I=84 +KEY=676E0CD6799E076EACA0355610647976 +PLT=6ABFD6669330CAFF +CIP=23A3E7C2312F40E7 +test + +I=85 +KEY=71400AAA0A088C8AECB0C636E90A7A62 +PLT=23A3E7C2312F40E7 +CIP=67E8F5BB6EC317E8 +test + +I=86 +KEY=028FE18307072C2BBCB3DE2B71B50C6B +PLT=67E8F5BB6EC317E8 +CIP=C2C8E60D0C2FEAD7 +test + +I=87 +KEY=7F1F97A92AF71C95934F16496A13D89D +PLT=C2C8E60D0C2FEAD7 +CIP=A09C11A69AF50A19 +test + +I=88 +KEY=F4487A7637C23DC6A72EAEAAA3380DD6 +PLT=A09C11A69AF50A19 +CIP=44C2FD13F354918D +test + +I=89 +KEY=18433BAB4CD109AB979FA48F51D53763 +PLT=44C2FD13F354918D +CIP=347513216FAF48AB +test + +I=90 +KEY=DDC111110F5B5049A5D1425DA195B9A1 +PLT=347513216FAF48AB +CIP=D0CEB4AF93FCCA68 +test + +I=91 +KEY=04E559736163CD17B149812F2B6F1C4F +PLT=D0CEB4AF93FCCA68 +CIP=A536286FF2835BC7 +test + +I=92 +KEY=73CB7067C6B9794F94BB4BC7E5650CAF +PLT=A536286FF2835BC7 +CIP=E51FDC33A4922310 +test + +I=93 +KEY=15A159CFB4C9EA13419F7417EA9BC033 +PLT=E51FDC33A4922310 +CIP=74EF2C30E7019E9B +test + +I=94 +KEY=C0F29684A1DE3FC085A861E0849685C0 +PLT=74EF2C30E7019E9B +CIP=C2F199B2B8E465CD +test + +I=95 +KEY=01CEC9B25EB0A95ADF82885E7C7C10E2 +PLT=C2F199B2B8E465CD +CIP=461ECB1BBDD216C8 +test + +I=96 +KEY=4B610D0300C324E3E91B5083AED30B4B +PLT=461ECB1BBDD216C8 +CIP=F4E4948DC4D27A2E +test + +I=97 +KEY=FBFD7559B8BFB0E5D92360651A75A2DD +PLT=F4E4948DC4D27A2E +CIP=B9FF7CBF51189BE5 +test + +I=98 +KEY=F5910AE3BF4B447FE57D50835C2B545F +PLT=B9FF7CBF51189BE5 +CIP=7CDE71A25DD6450D +test + +I=99 +KEY=6FEC1C06BF745192888A066233067442 +PLT=7CDE71A25DD6450D +CIP=3994CF3989226B4C +test + +I=100 +KEY=D6F9076178BDACC1857F45698E5F80A9 +PLT=3994CF3989226B4C +CIP=817D63B20B63D6FB +test + +I=101 +KEY=158217F65E88C67A0DEAB0E642642142 +PLT=817D63B20B63D6FB +CIP=6F5E5E134B464B0E +test + +I=102 +KEY=3FC960B794C11E83E751B7430C3F2403 +PLT=6F5E5E134B464B0E +CIP=66E7F0E5CC27164F +test + +I=103 +KEY=25A3D8497D119DD57437E3699A75EB25 +PLT=66E7F0E5CC27164F +CIP=7ECBF284D12C2907 +test + +I=104 +KEY=C1960F404F6CD3D4C6162B8CD09E9E94 +PLT=7ECBF284D12C2907 +CIP=DD621E777CF11221 +test + +I=105 +KEY=D535E34BE03F09F7F1E1D0DF5475BAB7 +PLT=DD621E777CF11221 +CIP=04931D3D3F19C113 +test + +I=106 +KEY=F1E73D0D728D7C5D4E6DD8B931534C3D +PLT=04931D3D3F19C113 +CIP=7F0923D40494C7A5 +test + +I=107 +KEY=80402038ACB2897CE232CB4C3836EE44 +PLT=7F0923D40494C7A5 +CIP=AFA196C7F5991792 +test + +I=108 +KEY=AF03F5D3F3C3BE778CB5BE87042F3037 +PLT=AFA196C7F5991792 +CIP=DFAC3E8F35205169 +test + +I=109 +KEY=5AC7371BF97D57576581C367AB0BE70F +PLT=DFAC3E8F35205169 +CIP=97671E5CC3DFA2F5 +test + +I=110 +KEY=79F87EB86A6079A4E046E204CAAA094C +PLT=97671E5CC3DFA2F5 +CIP=9D7001B8F47474E0 +test + +I=111 +KEY=C77079B8188613C8DA8209BC28B00AB8 +PLT=9D7001B8F47474E0 +CIP=BD1B85428B44EFD1 +test + +I=112 +KEY=A0AEF516B6A0A6B2C2E8553AE5D48382 +PLT=BD1B85428B44EFD1 +CIP=CEF9411204DBB0DD +test + +I=113 +KEY=1CFCAD3ABE76A6B21652171A314A6BB2 +PLT=CEF9411204DBB0DD +CIP=AA5E86E576BAEAD1 +test + +I=114 +KEY=75C9F82D98895A755D9FE3E57569B675 +PLT=AA5E86E576BAEAD1 +CIP=5356FFC9DDA8858E +test + +I=115 +KEY=73C3BA61C4053A914485A0E1A9575219 +PLT=5356FFC9DDA8858E +CIP=DC5605588219BA0E +test + +I=116 +KEY=90AAEFC091EA75E00DCC3B6078CED418 +PLT=DC5605588219BA0E +CIP=9AF377A4DF1AF6C4 +test + +I=117 +KEY=AA422314E78CEF24334AA0885C868F14 +PLT=9AF377A4DF1AF6C4 +CIP=65EE9FF12244080B +test + +I=118 +KEY=E521153D214F6409E1BB59852B2B7C31 +PLT=65EE9FF12244080B +CIP=80A0D82D08AD2727 +test + +I=119 +KEY=276D174529F90FAD4B5145B1459B82BD +PLT=80A0D82D08AD2727 +CIP=DE4A09776C8431D8 +test + +I=120 +KEY=A9B1E4AF9227192F485B77C38B290FC7 +PLT=DE4A09776C8431D8 +CIP=70CBBC4EF0232C14 +test + +I=121 +KEY=4782B49E0DCECEF649BC7486298803CE +PLT=70CBBC4EF0232C14 +CIP=335545FF9FEC562C +test + +I=122 +KEY=CD7D4A7340F5EB77E9AF2DBFE829DEAF +PLT=335545FF9FEC562C +CIP=E8D2EEB266DF09D8 +test + +I=123 +KEY=5D30BFBAE31C4E8AF4D27B5E0F308A12 +PLT=E8D2EEB266DF09D8 +CIP=4BC37331863E2F4B +test + +I=124 +KEY=B3877E7141D11D11AB051D150E31AFD1 +PLT=4BC37331863E2F4B +CIP=0D8E2A158120676B +test + +I=125 +KEY=DA0F051187C11DE58859B20598E14F35 +PLT=0D8E2A158120676B +CIP=7E026D14C8591C67 +test + +I=126 +KEY=02EEE1EC32D41A3C918075E877AA3ED4 +PLT=7E026D14C8591C67 +CIP=91C6E084E4C3A25A +test + +I=127 +KEY=BDF6B078E7AE8434908A1D483000E454 +PLT=91C6E084E4C3A25A +CIP=EC67F6FE4CD74E43 +test + +I=128 +KEY=4AFCC362B0A44ABE4B3E0E4286A27A0E +PLT=EC67F6FE4CD74E43 +CIP=1CEA06CF62B737A0 +test + +I=129 +KEY=DC6D33DF31D79A376B07C3831033C4AF +PLT=1CEA06CF62B737A0 +CIP=ABF319BEFEAB17E6 +test + +I=130 +KEY=7728EE029B18D14E0FAADB6A26EEDE0E +PLT=ABF319BEFEAB17E6 +CIP=2FA845279E184D1B +test + +I=131 +KEY=44D1F4D7A899E0BF774D8A8798237817 +PLT=2FA845279E184D1B +CIP=B59D26A53B9F3C16 +test + +I=132 +KEY=1F1F0131308DEE15B8C7380955595BB5 +PLT=B59D26A53B9F3C16 +CIP=5402D7F2843361A5 +test + +I=133 +KEY=215289D246F81ED26000EE9A547E9112 +PLT=5402D7F2843361A5 +CIP=2FDFC82DC29DEB09 +test + +I=134 +KEY=05BD7E71C4AF6B354E059B75DD47067D +PLT=2FDFC82DC29DEB09 +CIP=1405F43C5B74A09F +test + +I=135 +KEY=4ADC70808C189EACC67A4FCC922E2D2C +PLT=1405F43C5B74A09F +CIP=E3C2261579F93ADA +test + +I=136 +KEY=E195A7A5350F06050F3FC80D5D4F7CA5 +PLT=E3C2261579F93ADA +CIP=7C8E6CD59CA7DAAE +test + +I=137 +KEY=4DD36711E107A1F5540B7A257D25A7C5 +PLT=7C8E6CD59CA7DAAE +CIP=D372EAB336A44A5A +test + +I=138 +KEY=E4FB0E3FCB0D604B5F4BCBC736199403 +PLT=D372EAB336A44A5A +CIP=FA96B094C7DCEEF3 +test + +I=139 +KEY=D634AE6487686D1C0EF4B8449AF09C04 +PLT=FA96B094C7DCEEF3 +CIP=FDEA162D6EB09608 +test + +I=140 +KEY=2C01C1A1E7F959956AA131197DAB111D +PLT=FDEA162D6EB09608 +CIP=8654F781884AAC3B +test + +I=141 +KEY=54FDB8C9864F90C98A691339A53FD681 +PLT=8654F781884AAC3B +CIP=E372EE8FC03C8C4D +test + +I=142 +KEY=D461A93BB3CF624F9659C02BE693BC2F +PLT=E372EE8FC03C8C4D +CIP=87EA0DFD7ABE61E9 +test + +I=143 +KEY=7D09E059CAA56285A77191CD080FD57D +PLT=87EA0DFD7ABE61E9 +CIP=6ADFBE420889CDE3 +test + +I=144 +KEY=4B9AC05A0C827EC22A84C3DED8C0B1D2 +PLT=6ADFBE420889CDE3 +CIP=6F31C3EF3A56D66F +test + +I=145 +KEY=54BDD657FA95F60FB909EA8F0F89519F +PLT=6F31C3EF3A56D66F +CIP=F27546BDE1A1DD2A +test + +I=146 +KEY=6CC18FBD505D1BCDE5E16219CF8F5B5D +PLT=F27546BDE1A1DD2A +CIP=5271A1BF41E1F8ED +test + +I=147 +KEY=25616E4F0FBB7967B091481B58639D7F +PLT=5271A1BF41E1F8ED +CIP=B77EF9B7412D74D5 +test + +I=148 +KEY=E76DAE275EF199173CF3515739359DE7 +PLT=B77EF9B7412D74D5 +CIP=FB519D537F03C0DE +test + +I=149 +KEY=3EBDD9B3849D6E7B69EFF26B6213BCE3 +PLT=FB519D537F03C0DE +CIP=6CFF1710ADE9AFAD +test + +I=150 +KEY=93A8EC0CB1A2A59045A8BB84157E04C0 +PLT=6CFF1710ADE9AFAD +CIP=0D783FF6079C2D11 +test + +I=151 +KEY=BBC25FE2A60246CE032EB1F25B3E0716 +PLT=0D783FF6079C2D11 +CIP=791A75C228B3D365 +test + +I=152 +KEY=CBE6FB02EFDAD712ACF23AC61D98D062 +PLT=791A75C228B3D365 +CIP=63F01470159B9E47 +test + +I=153 +KEY=D87EC6240D0699681342B0307E842D60 +PLT=63F01470159B9E47 +CIP=41722CCF0A7914A8 +test + +I=154 +KEY=AF0154436B730AD7A5313C9728B748AF +PLT=41722CCF0A7914A8 +CIP=B6A366ABC8F189AE +test + +I=155 +KEY=6CC51BDB93D554C305E780CB0347EF7B +PLT=B6A366ABC8F189AE +CIP=BB37DA35FFD80457 +test + +I=156 +KEY=03ADB3A528E9BD7D1B9312B1C9B3DCD5 +PLT=BB37DA35FFD80457 +CIP=9FE86E9822A94D70 +test + +I=157 +KEY=8F20207416085F48F2B6E4F062BAB108 +PLT=9FE86E9822A94D70 +CIP=42108BFA127FAB39 +test + +I=158 +KEY=D8683FF639A6F3DA1D72B0AE4B60D9BA +PLT=42108BFA127FAB39 +CIP=C84A5F8E164485F0 +test + +I=159 +KEY=01C4A88E6C4C4C9E9182E24E58BE652E +PLT=C84A5F8E164485F0 +CIP=0D7E9B5CC0AC33DF +test + +I=160 +KEY=83F8122078746BB4AFB62E68CBC2ADEC +PLT=0D7E9B5CC0AC33DF +CIP=340E0E67ADD2D77D +test + +I=161 +KEY=B75F9DB7F6AD30CFF50F719B0C2F8DB7 +PLT=340E0E67ADD2D77D +CIP=9B2DA0E5281016C2 +test + +I=162 +KEY=4FBFEFA9C227C4ADF3C763112B2988E5 +PLT=9B2DA0E5281016C2 +CIP=411F45BC6F280B37 +test + +I=163 +KEY=62D098509208532C466249C0AADA45BC +PLT=411F45BC6F280B37 +CIP=29CA18AFF6993FEE +test + +I=164 +KEY=BB59884FB3C5973FCE7348732B93EC7F +PLT=29CA18AFF6993FEE +CIP=11D5047D502C8D28 +test + +I=165 +KEY=6869EC6541EFECADA7593BC58905A81D +PLT=11D5047D502C8D28 +CIP=613E40D662A9058F +test + +I=166 +KEY=B660296E9920772ECAF2528A65A226B6 +PLT=613E40D662A9058F +CIP=3ADAE5366AB89201 +test + +I=167 +KEY=3146DD6A5E3670963AE240DA73A63BD6 +PLT=3ADAE5366AB89201 +CIP=2685B0A6C4F47780 +test + +I=168 +KEY=0354868A55DA211ED35AADE62770EAC6 +PLT=2685B0A6C4F47780 +CIP=DC06A2F4510B0D98 +test + +I=169 +KEY=7A4292C85ACABFEC2A506684DABE93D4 +PLT=DC06A2F4510B0D98 +CIP=B5ABE033A943715F +test + +I=170 +KEY=755B4193D293783BA19307EF8AF18593 +PLT=B5ABE033A943715F +CIP=55145BC9489DC79E +test + +I=171 +KEY=8E7FA619EB4D61618A2B891119177ED9 +PLT=55145BC9489DC79E +CIP=469589A83E15795C +test + +I=172 +KEY=0E4A0F1419E04410215CAE1880049668 +PLT=469589A83E15795C +CIP=60546FDB6E75B430 +test + +I=173 +KEY=001569574191C053C9C3DCC333D79A4B +PLT=60546FDB6E75B430 +CIP=C53251F7D7794ED9 +test + +I=174 +KEY=4199BB77AC557737C06B8C9F38E788D7 +PLT=C53251F7D7794ED9 +CIP=4597FC424A659374 +test + +I=175 +KEY=1CCAF95EACA81CCA985E036A948035B2 +PLT=4597FC424A659374 +CIP=139FA4C13FE579E8 +test + +I=176 +KEY=192763495405D351F14FDC3DE2798091 +PLT=139FA4C13FE579E8 +CIP=46284F4AAE8C6762 +test + +I=177 +KEY=08BE1FDAB36CCBAADD50DA8238F0CFDA +PLT=46284F4AAE8C6762 +CIP=9A6B08B20AB64D88 +test + +I=178 +KEY=C04C0ABA375C2182998A89DADE0ABAA2 +PLT=9A6B08B20AB64D88 +CIP=A3EF435A254AA1BC +test + +I=179 +KEY=31C60CFAA936CAB241D0E512D60C559A +PLT=A3EF435A254AA1BC +CIP=F04905782C96729A +test + +I=180 +KEY=B738BC245D7693F0EAF094786338E7A8 +PLT=F04905782C96729A +CIP=D890D9B6FA044BFC +test + +I=181 +KEY=F97E762AF14AB1CE5C240E1A601E9036 +PLT=D890D9B6FA044BFC +CIP=8DF90CD89185BD2B +test + +I=182 +KEY=6C4EE4A81ED06C981DBA62F07B08A8A8 +PLT=8DF90CD89185BD2B +CIP=E9962A11CADA1476 +test + +I=183 +KEY=BB19C26DDDF7B52974DFCFB937E3A761 +PLT=E9962A11CADA1476 +CIP=01E654B4F7D702B6 +test + +I=184 +KEY=F006FCE4C8B4B4D429AE82A83936ABB4 +PLT=01E654B4F7D702B6 +CIP=DE2A01F4C83D4FBD +test + +I=185 +KEY=FE9E2908B8D6142C0386CC08624A32A4 +PLT=DE2A01F4C83D4FBD +CIP=4FBD9F7388027424 +test + +I=186 +KEY=202B7D0BC7BBEC7363DD204BA47D25E3 +PLT=4FBD9F7388027424 +CIP=EF831C50ABF89607 +test + +I=187 +KEY=DF20CEC4EE581C70AB40A894BB0859D0 +PLT=EF831C50ABF89607 +CIP=A50964BD7BAED843 +test + +I=188 +KEY=D0DDDACDCC039DED553717812BB9170D +PLT=A50964BD7BAED843 +CIP=7D782764FFA0A8BE +test + +I=189 +KEY=818676605F9A4BAC1ADE7C6018345F54 +PLT=7D782764FFA0A8BE +CIP=E926424E163DCD43 +test + +I=190 +KEY=A0C24EEE70AA9746D594D216D3D2D3BE +PLT=E926424E163DCD43 +CIP=D22F59B40BA6EF61 +test + +I=191 +KEY=10C2D770BD10BB442D1CC410CA1C09C4 +PLT=D22F59B40BA6EF61 +CIP=7622C571BBF113D6 +test + +I=192 +KEY=CF3F94B1840739310DED25D97B5DE8B1 +PLT=7622C571BBF113D6 +CIP=F12288744E04E3C2 +test + +I=193 +KEY=11A600F891D4EF2CD67A9DF04D84A6D4 +PLT=F12288744E04E3C2 +CIP=2F4476E3F9AC3806 +test + +I=194 +KEY=CD5FB9076D23584B3A6723AF73B9E973 +PLT=2F4476E3F9AC3806 +CIP=2583FF8C16ED6666 +test + +I=195 +KEY=35C82F501C8077F40592B270CEEADBBC +PLT=2583FF8C16ED6666 +CIP=A8C25E5702002AB0 +test + +I=196 +KEY=216D49CF34AD93473AED123B36CD07B7 +PLT=A8C25E5702002AB0 +CIP=4064EB43FEAFD539 +test + +I=197 +KEY=D3B36F97C497B2C3809DDD17078580D3 +PLT=4064EB43FEAFD539 +CIP=973E2EDFB4F8360A +test + +I=198 +KEY=E3F7BDE32D61621F8EC5E323ADE9482F +PLT=973E2EDFB4F8360A +CIP=4D2CAF26D7A6839F +test + +I=199 +KEY=4FA402465C36C71E36280E0A46026CD6 +PLT=4D2CAF26D7A6839F +CIP=495E72861ED2FA07 +test + +I=200 +KEY=A03404D683DCC72EF122A5960704AC46 +PLT=495E72861ED2FA07 +CIP=0E5459C40522EAA7 +test + +I=201 +KEY=803C4F14E01C1A3CDF7453DC89B2C944 +PLT=0E5459C40522EAA7 +CIP=484A71FEA947E559 +test + +I=202 +KEY=0352A7C67B94EA66E260C62A7EDE724E +PLT=484A71FEA947E559 +CIP=B89282B381559C3D +test + +I=203 +KEY=81D114C378D18D736351455BC3CFDA63 +PLT=B89282B381559C3D +CIP=2C59A1CF370982F9 +test + +I=204 +KEY=F6DD9533CB8378CFBA6910DB2A27256F +PLT=2C59A1CF370982F9 +CIP=B63893339044E3BF +test + +I=205 +KEY=B5F75B4F570B102315C133637CB360D3 +PLT=B63893339044E3BF +CIP=4CAE18100BEA368F +test + +I=206 +KEY=2362A4C8B55AA7A04CB0EB2877204E50 +PLT=4CAE18100BEA368F +CIP=508646575A15ECB9 +test + +I=207 +KEY=74857947E96FDD57EDD7476B8F0B2547 +PLT=508646575A15ECB9 +CIP=16004ECF06D205EB +test + +I=208 +KEY=341F17A354B152BF976DD477E2C7C27F +PLT=16004ECF06D205EB +CIP=5CF08AC79EBFF2BA +test + +I=209 +KEY=9F8BC59342279F1F11ED54BFDB57D027 +PLT=5CF08AC79EBFF2BA +CIP=FBEEE6E3E3FA9AAB +test + +I=210 +KEY=B55BDE67308DF1EB26556043160D78D3 +PLT=FBEEE6E3E3FA9AAB +CIP=6E345F03FF6377E8 +test + +I=211 +KEY=050BB8BFD9CD6E932D29875FBFD9E023 +PLT=6E345F03FF6377E8 +CIP=9B9611D70867C0D1 +test + +I=212 +KEY=1B39EB0352C55D1F2599C0E778D59957 +PLT=9B9611D70867C0D1 +CIP=DAF0C46A385E783F +test + +I=213 +KEY=FA9A8A22C80A73BAA922148EC406930A +PLT=DAF0C46A385E783F +CIP=D82DD2D52686F120 +test + +I=214 +KEY=AE01F9E115F9272DC0B7EF7148A1D045 +PLT=D82DD2D52686F120 +CIP=B6E7FAFF95B5601D +test + +I=215 +KEY=99579BDBA185366F0DE7178F8A43093F +PLT=B6E7FAFF95B5601D +CIP=19D24D8DB2FF6999 +test + +I=216 +KEY=C6419A75743F7BD507AB8A55BD8F825D +PLT=19D24D8DB2FF6999 +CIP=EE74D01E49B02923 +test + +I=217 +KEY=52141C3A5670A01E2C34B14EAFB6568E +PLT=EE74D01E49B02923 +CIP=650003F0AC78DDCF +test + +I=218 +KEY=5926C1A44F4A2C902BA4C7644A5E91E0 +PLT=650003F0AC78DDCF +CIP=8A1A4201CB35698E +test + +I=219 +KEY=E7476FBD9F8D12B939397EDD489BE751 +PLT=8A1A4201CB35698E +CIP=30D4B2D556325343 +test + +I=220 +KEY=8D179C51681FAE65856351A5C6231515 +PLT=30D4B2D556325343 +CIP=B84D98C1C7496DFE +test + +I=221 +KEY=60F5EEC91979A5699C393DC10C49DC51 +PLT=B84D98C1C7496DFE +CIP=A5FE28B39207D1E2 +test + +I=222 +KEY=8037D15FF6CB1D337253581F4DA50D53 +PLT=A5FE28B39207D1E2 +CIP=6082ECB44CB335B0 +test + +I=223 +KEY=84A260182C0C2D14496611E4B1343184 +PLT=6082ECB44CB335B0 +CIP=8C29FA05479CB354 +test + +I=224 +KEY=B50B6125CADDF1ADBFEB10F1A31F6AB5 +PLT=8C29FA05479CB354 +CIP=A388DBDCE3DF7C51 +test + +I=225 +KEY=E4DCB160F18A548C88A86748DEE82E6C +PLT=A388DBDCE3DF7C51 +CIP=F17792A2F0B03856 +test + +I=226 +KEY=9E4052B66B80269A489E3FCA2626CF62 +PLT=F17792A2F0B03856 +CIP=37106FB40A5A62AE +test + +I=227 +KEY=6B907674E534BCF45650662411B8C6D4 +PLT=37106FB40A5A62AE +CIP=8246745732174575 +test + +I=228 +KEY=947315A35D85738736F15D0791C57267 +PLT=8246745732174575 +CIP=0ECD20FA52B7ED7D +test + +I=229 +KEY=F6E62712066084D2B38ABAB2D8A073BA +PLT=0ECD20FA52B7ED7D +CIP=6C3AE64082C4F2D3 +test + +I=230 +KEY=CD609004646EE2986634EBA055222BA0 +PLT=6C3AE64082C4F2D3 +CIP=8E7D9F47565CA786 +test + +I=231 +KEY=F2F7C2CB9BC5EFCF2BC5937F8CCD74A7 +PLT=8E7D9F47565CA786 +CIP=76ECA83CB23DB045 +test + +I=232 +KEY=48FC37D8D734ED2C06A8617036167F0C +PLT=76ECA83CB23DB045 +CIP=5513837DB5C0AE31 +test + +I=233 +KEY=697FC95D53CD031D5E1587213945B82D +PLT=5513837DB5C0AE31 +CIP=03FA443F67D97740 +test + +I=234 +KEY=81CF44F300777B278DCF135FD8A7DB9F +PLT=03FA443F67D97740 +CIP=B6BF41C92C4BA925 +test + +I=235 +KEY=810BC62DBE1DE7E9F1E7C7A199E7E609 +PLT=B6BF41C92C4BA925 +CIP=A437A2CC60A3899A +test + +I=236 +KEY=4B1C2F8430501BCCC56C37AC7B50E73C +PLT=A437A2CC60A3899A +CIP=0D073B2DACD1DE7F +test + +I=237 +KEY=7C2982D984D11FB5F643E045B5A36C6D +PLT=0D073B2DACD1DE7F +CIP=9F1DA216D1CCB42A +test + +I=238 +KEY=75D202DE61845D0EC0C6753272C8DB66 +PLT=9F1DA216D1CCB42A +CIP=DA949E68AA4312F9 +test + +I=239 +KEY=76D8CEACDADA46C01E2EE464BE4A5358 +PLT=DA949E68AA4312F9 +CIP=7535B6508100C572 +test + +I=240 +KEY=B144D6487B660968A1D84824B46897C0 +PLT=7535B6508100C572 +CIP=9C7B2962BD28588B +test + +I=241 +KEY=A38EE37625DAA082A03476C2883E6AB2 +PLT=9C7B2962BD28588B +CIP=F4F0C5E36F1BCB4A +test + +I=242 +KEY=8FE7CD3B3E03C5EBEA59D53F685F4453 +PLT=F4F0C5E36F1BCB4A +CIP=A65FB8441CD2F52E +test + +I=243 +KEY=03708A6011C6C96C112A4400061C1CE4 +PLT=A65FB8441CD2F52E +CIP=499A7317E352869A +test + +I=244 +KEY=6EB7B73B13192F3F3B1DDC97563350D7 +PLT=499A7317E352869A +CIP=DC74E83F914CE1F5 +test + +I=245 +KEY=79D3992BF897A3D70F252427612BDC1F +PLT=DC74E83F914CE1F5 +CIP=6204047C6D1D7851 +test + +I=246 +KEY=E6AA23B0C3D262F431A40F18832EDA8C +PLT=6204047C6D1D7851 +CIP=E2CBEB58BEFE5DEF +test + +I=247 +KEY=F282785CC97A38E07E20E83C65E66D98 +PLT=E2CBEB58BEFE5DEF +CIP=AD9720A18DF4ECD8 +test + +I=248 +KEY=07B5D7A9779D8EC9E6917F817C695561 +PLT=AD9720A18DF4ECD8 +CIP=DF34149BD0B8E3D1 +test + +I=249 +KEY=C39B7EDB3F4196138E15AA8F0C73574B +PLT=DF34149BD0B8E3D1 +CIP=E7B1A2C903E20CCC +test + +I=250 +KEY=0621A845AFBF6399855D6F2D18C91EC9 +PLT=E7B1A2C903E20CCC +CIP=5F303A708CA44CC1 +test + +I=251 +KEY=3AA4F788AED061D0AB7CD568D0D644D0 +PLT=5F303A708CA44CC1 +CIP=5E3651FE419CD9FC +test + +I=252 +KEY=E472E896CDEE669E1E600392C34ED94E +PLT=5E3651FE419CD9FC +CIP=33135B2B11B94C13 +test + +I=253 +KEY=CCC95DC34527B44B3CE1AE0B571BBFDB +PLT=33135B2B11B94C13 +CIP=E8FD390B5F252B1A +test + +I=254 +KEY=2BC779EBE6490423CA49E42B91D1B72B +PLT=E8FD390B5F252B1A +CIP=762D2725FBEF2DBE +test + +I=255 +KEY=EFDFCB952B81A19D93AD2C495FCB1495 +PLT=762D2725FBEF2DBE +CIP=A8077693C5E70D85 +test + +I=256 +KEY=B9E7288F4B91B00B07290A4BAA072D23 +PLT=A8077693C5E70D85 +CIP=E517B7748C7F6DE7 +test diff -Nru linux-2.4.0-test9/crypto/testing/test.serpent linux-2.4.0-test9-int/crypto/testing/test.serpent --- linux-2.4.0-test9/crypto/testing/test.serpent Thu Jan 1 01:00:00 1970 +++ linux-2.4.0-test9-int/crypto/testing/test.serpent Sun Oct 15 12:20:50 2000 @@ -0,0 +1,6033 @@ +#!/bin/bash + +test () { + echo "Test number $I - keysize $KEYSIZE" + ./testcip -c serpent -k $KEY -p $PT -e $CT | sed '/^Registered/d' +} + +# This data is from the Serpent AES submission (filename ecb_e_m.txt) + +KEYSIZE=128 + +I=0 +KEY=00000000000000000000000000000000 +PT=00000000000000000000000000000000 +CT=90e7a5ba9497fa1bfc00f7d1a3a86a1e +test + +I=1 +KEY=90e7a5ba9497fa1bfc00f7d1a3a86a1e +PT=90e7a5ba9497fa1bfc00f7d1a3a86a1e +CT=5d0c5da998aaa940d493738892579447 +test + +I=2 +KEY=cdebf8130c3d535b2893845931fffe59 +PT=5d0c5da998aaa940d493738892579447 +CT=b5e6510fbbd63d828ade0b89ae48ef5f + +I=3 +KEY=780da91cb7eb6ed9a24d8fd09fb71106 +PT=b5e6510fbbd63d828ade0b89ae48ef5f +CT=8056b61dacb4d3f52976ef5b1d4165e8 + +I=4 +KEY=f85b1f011b5fbd2c8b3b608b82f674ee +PT=8056b61dacb4d3f52976ef5b1d4165e8 +CT=3997c4990223e5c70f3cb015f48ec57a + +I=5 +KEY=c1ccdb98197c58eb8407d09e7678b194 +PT=3997c4990223e5c70f3cb015f48ec57a +CT=b7754c34b5837b193364fc55cca342d3 + +I=6 +KEY=76b997acacff23f2b7632ccbbadbf347 +PT=b7754c34b5837b193364fc55cca342d3 +CT=e913e0510a87bdbc5307183b43e5bead + +I=7 +KEY=9faa77fda6789e4ee46434f0f93e4dea +PT=e913e0510a87bdbc5307183b43e5bead +CT=5deecef8bb9617241c3b72b0ca15d781 + +I=8 +KEY=c244b9051dee896af85f4640332b9a6b +PT=5deecef8bb9617241c3b72b0ca15d781 +CT=f93e76e8ea57a73ecf91768d887a3132 + +I=9 +KEY=3b7acfedf7b92e5437ce30cdbb51ab59 +PT=f93e76e8ea57a73ecf91768d887a3132 +CT=4155187326abdd90e66ee198b92852c5 + +I=10 +KEY=7a2fd79ed112f3c4d1a0d1550279f99c +PT=4155187326abdd90e66ee198b92852c5 +CT=5c4242407bd8348aa3c3b6a243b7c371 + +I=11 +KEY=266d95deaacac74e726367f741ce3aed +PT=5c4242407bd8348aa3c3b6a243b7c371 +CT=5b4cecf483508ff319caa2f00a0c17d5 + +I=12 +KEY=7d21792a299a48bd6ba9c5074bc22d38 +PT=5b4cecf483508ff319caa2f00a0c17d5 +CT=aeeb485281bb39e30c56a9e7aa636ca8 + +I=13 +KEY=d3ca3178a821715e67ff6ce0e1a14190 +PT=aeeb485281bb39e30c56a9e7aa636ca8 +CT=74aa340e5149fd50a92687169a5dad2c + +I=14 +KEY=a7600576f9688c0eced9ebf67bfcecbc +PT=74aa340e5149fd50a92687169a5dad2c +CT=8bcead0ed0a0932cf13fcb7ab5011a8d + +I=15 +KEY=2caea87829c81f223fe6208ccefdf631 +PT=8bcead0ed0a0932cf13fcb7ab5011a8d +CT=c4002db30e5fcde6f52f855600d1c2d5 + +I=16 +KEY=e8ae85cb2797d2c4cac9a5dace2c34e4 +PT=c4002db30e5fcde6f52f855600d1c2d5 +CT=e9dd90ae5a580fef7f81620f75390414 + +I=17 +KEY=017315657dcfdd2bb548c7d5bb1530f0 +PT=e9dd90ae5a580fef7f81620f75390414 +CT=f27e886c458ef023209736a2359d3895 + +I=18 +KEY=f30d9d0938412d0895dff1778e880865 +PT=f27e886c458ef023209736a2359d3895 +CT=8b740f950c175f95040ca834cc11e520 + +I=19 +KEY=7879929c3456729d91d359434299ed45 +PT=8b740f950c175f95040ca834cc11e520 +CT=27d47ca238d5938fa213d8638f5b0f32 + +I=20 +KEY=5fadee3e0c83e11233c08120cdc2e277 +PT=27d47ca238d5938fa213d8638f5b0f32 +CT=8b518675e0dd55858c6f8ca18baa526b + +I=21 +KEY=d4fc684bec5eb497bfaf0d814668b01c +PT=8b518675e0dd55858c6f8ca18baa526b +CT=720a221100bdf2b047c7ea8696e2b3fa + +I=22 +KEY=a6f64a5aece34627f868e707d08a03e6 +PT=720a221100bdf2b047c7ea8696e2b3fa +CT=a429e76808fa660c6d60eed37e34f1a9 + +I=23 +KEY=02dfad32e419202b950809d4aebef24f +PT=a429e76808fa660c6d60eed37e34f1a9 +CT=d3df614f50d17762938398a0831b0296 + +I=24 +KEY=d100cc7db4c85749068b91742da5f0d9 +PT=d3df614f50d17762938398a0831b0296 +CT=f29296629ff5f465fafb6bfc1f813515 + +I=25 +KEY=23925a1f2b3da32cfc70fa883224c5cc +PT=f29296629ff5f465fafb6bfc1f813515 +CT=80d6d15957374029996a623c99238958 + +I=26 +KEY=a3448b467c0ae305651a98b4ab074c94 +PT=80d6d15957374029996a623c99238958 +CT=9b47672e762432137d13f94ecd75d81b + +I=27 +KEY=3803ec680a2ed116180961fa6672948f +PT=9b47672e762432137d13f94ecd75d81b +CT=5ccd63f83b863ae198ba0698853eef2d + +I=28 +KEY=64ce8f9031a8ebf780b36762e34c7ba2 +PT=5ccd63f83b863ae198ba0698853eef2d +CT=602c04659a301521a347b8e13852af49 + +I=29 +KEY=04e28bf5ab98fed623f4df83db1ed4eb +PT=602c04659a301521a347b8e13852af49 +CT=dce9d616364728bd82007e360c7dc53e + +I=30 +KEY=d80b5de39ddfd66ba1f4a1b5d76311d5 +PT=dce9d616364728bd82007e360c7dc53e +CT=fbb8ea4fbbfddaea84b6610a620e2d51 + +I=31 +KEY=23b3b7ac26220c812542c0bfb56d3c84 +PT=fbb8ea4fbbfddaea84b6610a620e2d51 +CT=a3e2ada129623ed16a13440d0ae57bfa + +I=32 +KEY=80511a0d0f4032504f5184b2bf88477e +PT=a3e2ada129623ed16a13440d0ae57bfa +CT=b9d32b748df0e1afee4b4b1f9f659baa + +I=33 +KEY=3982317982b0d3ffa11acfad20eddcd4 +PT=b9d32b748df0e1afee4b4b1f9f659baa +CT=d3f16a2c390edd835da4cedc80fed18b + +I=34 +KEY=ea735b55bbbe0e7cfcbe0171a0130d5f +PT=d3f16a2c390edd835da4cedc80fed18b +CT=88cacedfcf3d796cd1c2c4e5da52352f + +I=35 +KEY=62b9958a748377102d7cc5947a413870 +PT=88cacedfcf3d796cd1c2c4e5da52352f +CT=93f380c72955353a6e574b1949e23ae8 + +I=36 +KEY=f14a154d5dd6422a432b8e8d33a30298 +PT=93f380c72955353a6e574b1949e23ae8 +CT=22b0471ed3f302be0be383c996452921 + +I=37 +KEY=d3fa52538e25409448c80d44a5e62bb9 +PT=22b0471ed3f302be0be383c996452921 +CT=23f177c639e0fe82ddf9c4c7044d4248 + +I=38 +KEY=f00b2595b7c5be169531c983a1ab69f1 +PT=23f177c639e0fe82ddf9c4c7044d4248 +CT=7d31de04dcd97189a0bae72bafcbbf91 + +I=39 +KEY=8d3afb916b1ccf9f358b2ea80e60d660 +PT=7d31de04dcd97189a0bae72bafcbbf91 +CT=7d2d38fb002c62ff6cc023286abb2882 + +I=40 +KEY=f017c36a6b30ad60594b0d8064dbfee2 +PT=7d2d38fb002c62ff6cc023286abb2882 +CT=a65d17620e49a844393686f87373114b + +I=41 +KEY=564ad40865790524607d8b7817a8efa9 +PT=a65d17620e49a844393686f87373114b +CT=2776e834b7c5278eccdb080c1af52e21 + +I=42 +KEY=713c3c3cd2bc22aaaca683740d5dc188 +PT=2776e834b7c5278eccdb080c1af52e21 +CT=f5219b02d9d8e287c0e1caf89ddbae70 + +I=43 +KEY=841da73e0b64c02d6c47498c90866ff8 +PT=f5219b02d9d8e287c0e1caf89ddbae70 +CT=04fa5d22c24d21bb5627f42082f5ec61 + +I=44 +KEY=80e7fa1cc929e1963a60bdac12738399 +PT=04fa5d22c24d21bb5627f42082f5ec61 +CT=c14c29d52bb22a4