Article 13705 of alt.sources: Archive-name: ufc-CryptPP Submitted-by: andreas@informatik.fh-augsburg.de ufc-CryptPP: C++ Encapsulation of ultra fast 'crypt' implementation Based on ufc-crypt implementation of Michael Glad, email: glad@daimi.aau.dk. It has been donated to the Free Software Foundation, Inc. It is covered by the GNU library license version 2, see the file 'COPYING'. The author of this implementation is Andreas Penzel, email: andreas@informatik.fh-augsburg.de. However, the source is still under GPL. Please drop me a note if you have questions, etc. For further details, please refer to the enclosed README. Andreas. #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw-r--r-- 1 andreas stud 25261 Oct 27 17:22 COPYING # -rw-r--r-- 1 andreas stud 5840 Oct 27 17:17 README # -rw-r--r-- 1 andreas stud 1005 Oct 27 17:22 Makefile # -rw-r--r-- 1 andreas stud 20815 Oct 27 16:30 CryptPP.cc # -rw-r--r-- 1 andreas stud 3079 Oct 27 16:30 CryptPP.h # -rw-r--r-- 1 andreas stud 2283 Oct 27 16:17 ufc-crypt.h # -rw-r--r-- 1 andreas stud 1837 Oct 27 15:20 cert.c # -rw-r--r-- 1 andreas stud 1456 Oct 27 16:17 speeds.c # -rw-r--r-- 1 andreas stud 657 Oct 27 15:24 ufc.c # -rw-r--r-- 1 andreas stud 8721 Oct 27 15:10 cert.data # echo 'x - COPYING' if test -f COPYING; then echo 'shar: not overwriting COPYING'; else sed 's/^X//' << '________This_Is_The_END________' > COPYING X GNU LIBRARY GENERAL PUBLIC LICENSE X Version 2, June 1991 X X Copyright (C) 1991 Free Software Foundation, Inc. X 675 Mass Ave, Cambridge, MA 02139, USA X Everyone is permitted to copy and distribute verbatim copies X of this license document, but changing it is not allowed. X X[This is the first released version of the library GPL. It is X numbered 2 because it goes with version 2 of the ordinary GPL.] X X Preamble X X The licenses for most software are designed to take away your Xfreedom to share and change it. By contrast, the GNU General Public XLicenses are intended to guarantee your freedom to share and change Xfree software--to make sure the software is free for all its users. X X This license, the Library General Public License, applies to some Xspecially designated Free Software Foundation software, and to any Xother libraries whose authors decide to use it. You can use it for Xyour libraries, too. X X When we speak of free software, we are referring to freedom, not Xprice. Our General Public Licenses are designed to make sure that you Xhave the freedom to distribute copies of free software (and charge for Xthis service if you wish), that you receive source code or can get it Xif you want it, that you can change the software or use pieces of it Xin new free programs; and that you know you can do these things. X X To protect your rights, we need to make restrictions that forbid Xanyone to deny you these rights or to ask you to surrender the rights. XThese restrictions translate to certain responsibilities for you if Xyou distribute copies of the library, or if you modify it. X X For example, if you distribute copies of the library, whether gratis Xor for a fee, you must give the recipients all the rights that we gave Xyou. You must make sure that they, too, receive or can get the source Xcode. If you link a program with the library, you must provide Xcomplete object files to the recipients so that they can relink them Xwith the library, after making changes to the library and recompiling Xit. And you must show them these terms so they know their rights. X X Our method of protecting your rights has two steps: (1) copyright Xthe library, and (2) offer you this license which gives you legal Xpermission to copy, distribute and/or modify the library. X X Also, for each distributor's protection, we want to make certain Xthat everyone understands that there is no warranty for this free Xlibrary. If the library is modified by someone else and passed on, we Xwant its recipients to know that what they have is not the original Xversion, so that any problems introduced by others will not reflect on Xthe original authors' reputations. X X Finally, any free program is threatened constantly by software Xpatents. We wish to avoid the danger that companies distributing free Xsoftware will individually obtain patent licenses, thus in effect Xtransforming the program into proprietary software. To prevent this, Xwe have made it clear that any patent must be licensed for everyone's Xfree use or not licensed at all. X X Most GNU software, including some libraries, is covered by the ordinary XGNU General Public License, which was designed for utility programs. This Xlicense, the GNU Library General Public License, applies to certain Xdesignated libraries. This license is quite different from the ordinary Xone; be sure to read it in full, and don't assume that anything in it is Xthe same as in the ordinary license. X X The reason we have a separate public license for some libraries is that Xthey blur the distinction we usually make between modifying or adding to a Xprogram and simply using it. Linking a program with a library, without Xchanging the library, is in some sense simply using the library, and is Xanalogous to running a utility program or application program. However, in Xa textual and legal sense, the linked executable is a combined work, a Xderivative of the original library, and the ordinary General Public License Xtreats it as such. X X Because of this blurred distinction, using the ordinary General XPublic License for libraries did not effectively promote software Xsharing, because most developers did not use the libraries. We Xconcluded that weaker conditions might promote sharing better. X X However, unrestricted linking of non-free programs would deprive the Xusers of those programs of all benefit from the free status of the Xlibraries themselves. This Library General Public License is intended to Xpermit developers of non-free programs to use free libraries, while Xpreserving your freedom as a user of such programs to change the free Xlibraries that are incorporated in them. (We have not seen how to achieve Xthis as regards changes in header files, but we have achieved it as regards Xchanges in the actual functions of the Library.) The hope is that this Xwill lead to faster development of free libraries. X X The precise terms and conditions for copying, distribution and Xmodification follow. Pay close attention to the difference between a X"work based on the library" and a "work that uses the library". The Xformer contains code derived from the library, while the latter only Xworks together with the library. X X Note that it is possible for a library to be covered by the ordinary XGeneral Public License rather than by this special one. X X GNU LIBRARY GENERAL PUBLIC LICENSE X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION X X 0. This License Agreement applies to any software library which Xcontains a notice placed by the copyright holder or other authorized Xparty saying it may be distributed under the terms of this Library XGeneral Public License (also called "this License"). Each licensee is Xaddressed as "you". X X A "library" means a collection of software functions and/or data Xprepared so as to be conveniently linked with application programs X(which use some of those functions and data) to form executables. X X The "Library", below, refers to any such software library or work Xwhich has been distributed under these terms. A "work based on the XLibrary" means either the Library or any derivative work under Xcopyright law: that is to say, a work containing the Library or a Xportion of it, either verbatim or with modifications and/or translated Xstraightforwardly into another language. (Hereinafter, translation is Xincluded without limitation in the term "modification".) X X "Source code" for a work means the preferred form of the work for Xmaking modifications to it. For a library, complete source code means Xall the source code for all modules it contains, plus any associated Xinterface definition files, plus the scripts used to control compilation Xand installation of the library. X X Activities other than copying, distribution and modification are not Xcovered by this License; they are outside its scope. The act of Xrunning a program using the Library is not restricted, and output from Xsuch a program is covered only if its contents constitute a work based Xon the Library (independent of the use of the Library in a tool for Xwriting it). Whether that is true depends on what the Library does Xand what the program that uses the Library does. X X 1. You may copy and distribute verbatim copies of the Library's Xcomplete source code as you receive it, in any medium, provided that Xyou conspicuously and appropriately publish on each copy an Xappropriate copyright notice and disclaimer of warranty; keep intact Xall the notices that refer to this License and to the absence of any Xwarranty; and distribute a copy of this License along with the XLibrary. X X You may charge a fee for the physical act of transferring a copy, Xand you may at your option offer warranty protection in exchange for a Xfee. X X 2. You may modify your copy or copies of the Library or any portion Xof it, thus forming a work based on the Library, and copy and Xdistribute such modifications or work under the terms of Section 1 Xabove, provided that you also meet all of these conditions: X X a) The modified work must itself be a software library. X X b) You must cause the files modified to carry prominent notices X stating that you changed the files and the date of any change. X X c) You must cause the whole of the work to be licensed at no X charge to all third parties under the terms of this License. X X d) If a facility in the modified Library refers to a function or a X table of data to be supplied by an application program that uses X the facility, other than as an argument passed when the facility X is invoked, then you must make a good faith effort to ensure that, X in the event an application does not supply such function or X table, the facility still operates, and performs whatever part of X its purpose remains meaningful. X X (For example, a function in a library to compute square roots has X a purpose that is entirely well-defined independent of the X application. Therefore, Subsection 2d requires that any X application-supplied function or table used by this function must X be optional: if the application does not supply it, the square X root function must still compute square roots.) X XThese requirements apply to the modified work as a whole. If Xidentifiable sections of that work are not derived from the Library, Xand can be reasonably considered independent and separate works in Xthemselves, then this License, and its terms, do not apply to those Xsections when you distribute them as separate works. But when you Xdistribute the same sections as part of a whole which is a work based Xon the Library, the distribution of the whole must be on the terms of Xthis License, whose permissions for other licensees extend to the Xentire whole, and thus to each and every part regardless of who wrote Xit. X XThus, it is not the intent of this section to claim rights or contest Xyour rights to work written entirely by you; rather, the intent is to Xexercise the right to control the distribution of derivative or Xcollective works based on the Library. X XIn addition, mere aggregation of another work not based on the Library Xwith the Library (or with a work based on the Library) on a volume of Xa storage or distribution medium does not bring the other work under Xthe scope of this License. X X 3. You may opt to apply the terms of the ordinary GNU General Public XLicense instead of this License to a given copy of the Library. To do Xthis, you must alter all the notices that refer to this License, so Xthat they refer to the ordinary GNU General Public License, version 2, Xinstead of to this License. (If a newer version than version 2 of the Xordinary GNU General Public License has appeared, then you can specify Xthat version instead if you wish.) Do not make any other change in Xthese notices. X X Once this change is made in a given copy, it is irreversible for Xthat copy, so the ordinary GNU General Public License applies to all Xsubsequent copies and derivative works made from that copy. X X This option is useful when you wish to copy part of the code of Xthe Library into a program that is not a library. X X 4. You may copy and distribute the Library (or a portion or Xderivative of it, under Section 2) in object code or executable form Xunder the terms of Sections 1 and 2 above provided that you accompany Xit with the complete corresponding machine-readable source code, which Xmust be distributed under the terms of Sections 1 and 2 above on a Xmedium customarily used for software interchange. X X If distribution of object code is made by offering access to copy Xfrom a designated place, then offering equivalent access to copy the Xsource code from the same place satisfies the requirement to Xdistribute the source code, even though third parties are not Xcompelled to copy the source along with the object code. X X 5. A program that contains no derivative of any portion of the XLibrary, but is designed to work with the Library by being compiled or Xlinked with it, is called a "work that uses the Library". Such a Xwork, in isolation, is not a derivative work of the Library, and Xtherefore falls outside the scope of this License. X X However, linking a "work that uses the Library" with the Library Xcreates an executable that is a derivative of the Library (because it Xcontains portions of the Library), rather than a "work that uses the Xlibrary". The executable is therefore covered by this License. XSection 6 states terms for distribution of such executables. X X When a "work that uses the Library" uses material from a header file Xthat is part of the Library, the object code for the work may be a Xderivative work of the Library even though the source code is not. XWhether this is true is especially significant if the work can be Xlinked without the Library, or if the work is itself a library. The Xthreshold for this to be true is not precisely defined by law. X X If such an object file uses only numerical parameters, data Xstructure layouts and accessors, and small macros and small inline Xfunctions (ten lines or less in length), then the use of the object Xfile is unrestricted, regardless of whether it is legally a derivative Xwork. (Executables containing this object code plus portions of the XLibrary will still fall under Section 6.) X X Otherwise, if the work is a derivative of the Library, you may Xdistribute the object code for the work under the terms of Section 6. XAny executables containing that work also fall under Section 6, Xwhether or not they are linked directly with the Library itself. X X 6. As an exception to the Sections above, you may also compile or Xlink a "work that uses the Library" with the Library to produce a Xwork containing portions of the Library, and distribute that work Xunder terms of your choice, provided that the terms permit Xmodification of the work for the customer's own use and reverse Xengineering for debugging such modifications. X X You must give prominent notice with each copy of the work that the XLibrary is used in it and that the Library and its use are covered by Xthis License. You must supply a copy of this License. If the work Xduring execution displays copyright notices, you must include the Xcopyright notice for the Library among them, as well as a reference Xdirecting the user to the copy of this License. Also, you must do one Xof these things: X X a) Accompany the work with the complete corresponding X machine-readable source code for the Library including whatever X changes were used in the work (which must be distributed under X Sections 1 and 2 above); and, if the work is an executable linked X with the Library, with the complete machine-readable "work that X uses the Library", as object code and/or source code, so that the X user can modify the Library and then relink to produce a modified X executable containing the modified Library. (It is understood X that the user who changes the contents of definitions files in the X Library will not necessarily be able to recompile the application X to use the modified definitions.) X X b) Accompany the work with a written offer, valid for at X least three years, to give the same user the materials X specified in Subsection 6a, above, for a charge no more X than the cost of performing this distribution. X X c) If distribution of the work is made by offering access to copy X from a designated place, offer equivalent access to copy the above X specified materials from the same place. X X d) Verify that the user has already received a copy of these X materials or that you have already sent this user a copy. X X For an executable, the required form of the "work that uses the XLibrary" must include any data and utility programs needed for Xreproducing the executable from it. However, as a special exception, Xthe source code distributed need not include anything that is normally Xdistributed (in either source or binary form) with the major Xcomponents (compiler, kernel, and so on) of the operating system on Xwhich the executable runs, unless that component itself accompanies Xthe executable. X X It may happen that this requirement contradicts the license Xrestrictions of other proprietary libraries that do not normally Xaccompany the operating system. Such a contradiction means you cannot Xuse both them and the Library together in an executable that you Xdistribute. X X 7. You may place library facilities that are a work based on the XLibrary side-by-side in a single library together with other library Xfacilities not covered by this License, and distribute such a combined Xlibrary, provided that the separate distribution of the work based on Xthe Library and of the other library facilities is otherwise Xpermitted, and provided that you do these two things: X X a) Accompany the combined library with a copy of the same work X based on the Library, uncombined with any other library X facilities. This must be distributed under the terms of the X Sections above. X X b) Give prominent notice with the combined library of the fact X that part of it is a work based on the Library, and explaining X where to find the accompanying uncombined form of the same work. X X 8. You may not copy, modify, sublicense, link with, or distribute Xthe Library except as expressly provided under this License. Any Xattempt otherwise to copy, modify, sublicense, link with, or Xdistribute the Library is void, and will automatically terminate your Xrights under this License. However, parties who have received copies, Xor rights, from you under this License will not have their licenses Xterminated so long as such parties remain in full compliance. X X 9. You are not required to accept this License, since you have not Xsigned it. However, nothing else grants you permission to modify or Xdistribute the Library or its derivative works. These actions are Xprohibited by law if you do not accept this License. Therefore, by Xmodifying or distributing the Library (or any work based on the XLibrary), you indicate your acceptance of this License to do so, and Xall its terms and conditions for copying, distributing or modifying Xthe Library or works based on it. X X 10. Each time you redistribute the Library (or any work based on the XLibrary), the recipient automatically receives a license from the Xoriginal licensor to copy, distribute, link with or modify the Library Xsubject to these terms and conditions. You may not impose any further Xrestrictions on the recipients' exercise of the rights granted herein. XYou are not responsible for enforcing compliance by third parties to Xthis License. X X 11. If, as a consequence of a court judgment or allegation of patent Xinfringement or for any other reason (not limited to patent issues), Xconditions are imposed on you (whether by court order, agreement or Xotherwise) that contradict the conditions of this License, they do not Xexcuse you from the conditions of this License. If you cannot Xdistribute so as to satisfy simultaneously your obligations under this XLicense and any other pertinent obligations, then as a consequence you Xmay not distribute the Library at all. For example, if a patent Xlicense would not permit royalty-free redistribution of the Library by Xall those who receive copies directly or indirectly through you, then Xthe only way you could satisfy both it and this License would be to Xrefrain entirely from distribution of the Library. X XIf any portion of this section is held invalid or unenforceable under any Xparticular circumstance, the balance of the section is intended to apply, Xand the section as a whole is intended to apply in other circumstances. X XIt is not the purpose of this section to induce you to infringe any Xpatents or other property right claims or to contest validity of any Xsuch claims; this section has the sole purpose of protecting the Xintegrity of the free software distribution system which is Ximplemented by public license practices. Many people have made Xgenerous contributions to the wide range of software distributed Xthrough that system in reliance on consistent application of that Xsystem; it is up to the author/donor to decide if he or she is willing Xto distribute software through any other system and a licensee cannot Ximpose that choice. X XThis section is intended to make thoroughly clear what is believed to Xbe a consequence of the rest of this License. X X 12. If the distribution and/or use of the Library is restricted in Xcertain countries either by patents or by copyrighted interfaces, the Xoriginal copyright holder who places the Library under this License may add Xan explicit geographical distribution limitation excluding those countries, Xso that distribution is permitted only in or among countries not thus Xexcluded. In such case, this License incorporates the limitation as if Xwritten in the body of this License. X X 13. The Free Software Foundation may publish revised and/or new Xversions of the Library General Public License from time to time. XSuch new versions will be similar in spirit to the present version, Xbut may differ in detail to address new problems or concerns. X XEach version is given a distinguishing version number. If the Library Xspecifies a version number of this License which applies to it and X"any later version", you have the option of following the terms and Xconditions either of that version or of any later version published by Xthe Free Software Foundation. If the Library does not specify a Xlicense version number, you may choose any version ever published by Xthe Free Software Foundation. X X 14. If you wish to incorporate parts of the Library into other free Xprograms whose distribution conditions are incompatible with these, Xwrite to the author to ask for permission. For software which is Xcopyrighted by the Free Software Foundation, write to the Free XSoftware Foundation; we sometimes make exceptions for this. Our Xdecision will be guided by the two goals of preserving the free status Xof all derivatives of our free software and of promoting the sharing Xand reuse of software generally. X X NO WARRANTY X X 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO XWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. XEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR XOTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY XKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE XIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR XPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE XLIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME XTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. X X 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN XWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY XAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU XFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR XCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE XLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING XRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A XFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF XSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH XDAMAGES. X X END OF TERMS AND CONDITIONS X X Appendix: How to Apply These Terms to Your New Libraries X X If you develop a new library, and you want it to be of the greatest Xpossible use to the public, we recommend making it free software that Xeveryone can redistribute and change. You can do so by permitting Xredistribution under these terms (or, alternatively, under the terms of the Xordinary General Public License). X X To apply these terms, attach the following notices to the library. It is Xsafest to attach them to the start of each source file to most effectively Xconvey the exclusion of warranty; and each file should have at least the X"copyright" line and a pointer to where the full notice is found. X X X Copyright (C) X X This library is free software; you can redistribute it and/or X modify it under the terms of the GNU Library General Public X License as published by the Free Software Foundation; either X version 2 of the License, or (at your option) any later version. X X This library is distributed in the hope that it will be useful, X but WITHOUT ANY WARRANTY; without even the implied warranty of X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X Library General Public License for more details. X X You should have received a copy of the GNU Library General Public X License along with this library; if not, write to the Free X Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X XAlso add information on how to contact you by electronic and paper mail. X XYou should also get your employer (if you work as a programmer) or your Xschool, if any, to sign a "copyright disclaimer" for the library, if Xnecessary. Here is a sample; alter the names: X XYoyodyne, Inc., hereby disclaims all copyright interest in the Xlibrary `Frob' (a library for tweaking knobs) written by James Random XHacker. X X , 1 April 1990 X Ty Coon, President of Vice X XThat's all there is to it! ________This_Is_The_END________ if test `wc -l < COPYING` -ne 482; then echo 'shar: COPYING was damaged during transit (should have been 482 bytes)' fi fi ; : end of overwriting check echo 'x - README' if test -f README; then echo 'shar: not overwriting README'; else sed 's/^X//' << '________This_Is_The_END________' > README X X ufc-CryptPP: C++ Encapsulation of ultra fast 'crypt' implementation X ------------------------------------------------------------------- X X Based on ufc-crypt implementation of Michael Glad, email: X glad@daimi.aau.dk. It has been donated to the Free Software X Foundation, Inc. It is covered by the GNU library license version 2, X see the file 'COPYING'. X X The author of THIS `encapsulation' is Andreas Penzel, email: X andreas@informatik.fh-augsburg.de. However, the source is still X under GPL. Please drop me a note if you have questions etc. X X The following informations are taken from the original README and X have been adapted to this implementation. X X X Design goals/non goals: X X - Crypt implementation plugin compatible with crypt(3)/fcrypt. X - High performance when used for password cracking. X - Portable to most 32/64 bit machines. X - Startup time/mixed salt performance not critical. X X X Features of the implementation: X X - On most machines, ufc-CryptPP runs 30-60 times faster than X crypt(3) when invoked repeated times with the same salt and X varying passwords. X - With mostly constant salts, performance is about two to three X times that of the default fcrypt implementation shipped with Alec X Muffets 'Crack' password cracker. X - With alternating salts, performance is only about twice that of X crypt(3). X - Tested on SPARC (SunOS 5.4) X - Requires 165 kb for tables. X X X Installing: X X Set the following variables.. X X CC : The compiler to use. X CFLAGS : Some machine depedent flags. X OFLAGS : The highest level of optimization available. X X Now run 'make'. A test program 'ufc' is linked. X Try it out: './ufc 1' to test proper operation. X X For a more thorough test, run 'make tests'. This compiles and X invokes a DES validation suite as well as two benchmark programs X comparing ufc-CryptPP with the native crypt(3) implementation. If X your friendly vendor has omitted crypt(3) from libc, compilation X of the native benchmark program 'speedc' will fail. Compilation of X the 'speed*' programs may also fail as they use timer facilities X not present in the same form in all UNIX implementations. X X X Benchmark table: X X The table shows how many operations per second ufc-CryptPP X can do on some machines. X X +--------------+-------------------------------------------+ X | Machine | Sparc Intel386 Alpha | X | | 20 33MHz 148 | X | | OS5.4 Linux OSF3.2 | X +--------------+-------------------------------------------+ X | Crypt(3)/sec | 149 358 124 | X | CryptPP/sec | 3238 419 6807 | X +--------------+-------------------------------------------+ X | Speedup | 20 1.2 53 | X +--------------+-------------------------------------------+ X X It seems as if performance is limited by CPU bus and data cache X capacity. This also makes the benchmarks debatable compared to a X real test with ufc-CryptPP wired into Crack. However, the table X gives an outline of what can be expected. X X X Optimizations: X X Here are the optimizations used relative to an ordinary X implementation such as the one said to be used in crypt(3). X X Major optimizations: X - Keep data packed as bits in integer variables -- allows for X fast permutations & parallel xor's in CPU hardware. X - Let adjacent final & initial permutations collapse. X - Keep working data in 'E expanded' format all the time. X - Implement DES 'f' function mostly by table lookup X - Calculate the above function on 12 bit basis rather than 6 X as would be the most natural. X - Implement setup routines so that performance is limited by X the DES inner loops only. X X Minor (dirty) optimizations: X - combine iterations of DES inner loop so that DES only loops X 8 times. This saves a lot of variable swapping. X - Implement key access by a walking pointer rather than coding X as array indexing. X - As described, the table based f function uses a 3 X dimensional array: X X sb ['number of 12 bit segment']['12 bit index']['48 bit half index'] X X Code the routine with 4 (one dimensional) vectors. X - Design the internal data format & uglify the DES loops so X that the compiler does not need to do bit shifts when indexing X vectors. X X X Portability issues: X X ufc-CryptPP does not need to know the byte endianness of the machine X is runs on. X X To speed up the DES inner loop, it does a dirty trick requiring X the availability of a integer flavoured data type occupying X exactly 32 (or 64) bits. This is normally the case of 'long'. The X header file 'ufc-crypt.h' contains typedefs for this type. If you X have to change it (or any other part) to get things working, X please drop me a note (glad@daimi.aau.dk). X X ufc-CryptPP can take advantage of 64 bit integers. At the moment, it X is only configured to do so automatically for Convex machines. X X X Revision history (of original ufc-implementation): X X UFC patchlevel 0: base version; released to alt.sources on Sep 24 X 1991 X X UFC patchlevel 1: patch released to alt.sources on Sep 27 1991. X No longer rebuilds sb tables when seeing a new X salt. X X UFC-crypt pl0: Essentially UFC pl 1. Released to comp.sources.misc X on Oct 22 1991. X X UFC-crypt pl1: Released to comp.sources.misc in march 1992 X - setkey/encrypt routines added X - added validation/benchmarking programs X - reworked keyschedule setup code X - memory demands reduced X - 64 bit support added X ________This_Is_The_END________ if test `wc -l < README` -ne 148; then echo 'shar: README was damaged during transit (should have been 148 bytes)' fi fi ; : end of overwriting check echo 'x - Makefile' if test -f Makefile; then echo 'shar: not overwriting Makefile'; else sed 's/^X//' << '________This_Is_The_END________' > Makefile X XCC = g++ X X# generic options (eg. Linux, ...) X#CFLAGS = -O2 -Wall -ansi X# options for Solaris 2.4 XCFLAGS = -O2 -Wall -ansi -DSVR4 X# options for Alpha with OSF 2.3 X#CFLAGS = -O2 -Wall -ansi -DSVR4 -Dalpha X X Xall: ufc cert speedf speedc Xtests: ufc cert speedf speedc X ./cert <./cert.data X ./ufc 1 X ./speedc X ./speedf X X Xufc: CryptPP.o ufc.o X $(CC) $(LDFLAGS) -o ufc CryptPP.o ufc.o X Xcert: CryptPP.o cert.o X $(CC) $(LDFLAGS) -o cert CryptPP.o cert.o X Xspeedf: CryptPP.o X $(CC) $(CFLAGS) -DFCRYPT -c speeds.c X $(CC) $(LDFLAGS) -o speedf CryptPP.o speeds.o X -rm -f speeds.o X Xspeedc: CryptPP.o speeds.o X $(CC) $(LDFLAGS) -o speedc CryptPP.o speeds.o X Xclean: X -rm -f *.o ufc cert speedf speedc *~ core *.tar shar X Xshar: X mkshar -v \ X COPYING\ X README \ X Makefile \ X CryptPP.cc \ X *.h \ X *.c \ X cert.data X Xtar archive: X tar cf CryptPP.tar \ X COPYING\ X README \ X Makefile \ X CryptPP.cc \ X *.h \ X *.c \ X cert.data \ X mkshar X X.SUFFIXES: .cc X.cc.o: X $(CC) -c $(CFLAGS) $< X.c.o: X $(CC) -c $(CFLAGS) $< X ________This_Is_The_END________ if test `wc -l < Makefile` -ne 63; then echo 'shar: Makefile was damaged during transit (should have been 63 bytes)' fi fi ; : end of overwriting check echo 'x - CryptPP.cc' if test -f CryptPP.cc; then echo 'shar: not overwriting CryptPP.cc'; else sed 's/^X//' << '________This_Is_The_END________' > CryptPP.cc X X/* X * CryptPP.cc: encapsulate ufc-crypt password encryption X * X * $Id: CryptPP.cc,v 1.2 1996/10/27 13:03:02 andreas Exp $ X * X * X * UFC-crypt: ultra fast crypt(3) implementation X * X * Copyright (C) 1991, 1992, Free Software Foundation, Inc. X * X * This library is free software; you can redistribute it and/or X * modify it under the terms of the GNU Library General Public X * License as published by the Free Software Foundation; either X * version 2 of the License, or (at your option) any later version. X * X * This library is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X * Library General Public License for more details. X * X * You should have received a copy of the GNU Library General Public X * License along with this library; if not, write to the Free X * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * @(#)crypt.c 2.17 2/22/92 X * X * Semiportable C version X * X */ X X#include X#include "CryptPP.h" X X#define ascii_to_bin(c) \ X ((c)>='a'?(c-59):(c)>='A'?((c)-53):(c)-'.') X#define bin_to_ascii(c) \ X ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') X/* macro to set a bit (0..23) */ X#define BITMASK(i) ( (1<<(11-(i)%12+3)) << ((i)<12?16:0) ) X/* lookup a 6 Bit value in sbox */ X#define s_lookup(i,s) \ X sbox[(i)][(((s)>>4) & 0x2)|((s) & 0x1)][((s)>>1) & 0xf]; X X Xint Crypt::pc1[56] = { X 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, X 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, X 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, X 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4 X}; X Xint Crypt::rots[16] = { X 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 X}; X Xint Crypt::pc2[48] = { X 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, X 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, X 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, X 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32 X}; X Xint Crypt::esel[48] = { X 32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, X 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, X 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, X 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1 X}; X Xint Crypt::perm32[32] = { X 16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10, X 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25 X}; X Xint Crypt::sbox[8][4][16] = { X {{14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7}, X {0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8}, X {4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0}, X {15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13} X }, X X {{15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10}, X {3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5}, X {0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15}, X {13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9} X }, X X {{10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8}, X {13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1}, X {13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7}, X {1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12} X }, X X {{7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15}, X {13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9}, X {10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4}, X {3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14} X }, X X {{2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9}, X {14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6}, X {4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14}, X {11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3} X }, X X {{12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11}, X {10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8}, X {9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6}, X {4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13} X }, X X {{4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1}, X {13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6}, X {1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2}, X {6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12} X }, X X {{13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7}, X {1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2}, X {7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8}, X {2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11} X } X}; X Xint Crypt::initial_perm[64] = { X 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, X 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, X 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, X 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7 X}; X Xint Crypt::final_perm[64] = { X 40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31, X 38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29, X 36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27, X 34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25 X}; X Xunsigned char Crypt::bytemask[8] = { X 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 X}; X Xufc_long Crypt::longmask[32] = { X 0x80000000, 0x40000000, 0x20000000, 0x10000000, X 0x08000000, 0x04000000, 0x02000000, 0x01000000, X 0x00800000, 0x00400000, 0x00200000, 0x00100000, X 0x00080000, 0x00040000, 0x00020000, 0x00010000, X 0x00008000, 0x00004000, 0x00002000, 0x00001000, X 0x00000800, 0x00000400, 0x00000200, 0x00000100, X 0x00000080, 0x00000040, 0x00000020, 0x00000010, X 0x00000008, 0x00000004, 0x00000002, 0x00000001 X}; X X XCrypt::Crypt () X{ X strncpy ((char *) current_salt, "&&\0", 3); X current_saltbits = 0; X direction = 0; X X sb[0] = _ufc_sb0; X sb[1] = _ufc_sb1; X sb[2] = _ufc_sb2; X sb[3] = _ufc_sb3; X X init_des (); // initialize des X} X XCrypt::~Crypt () X{ X} X Xvoid XCrypt::init_des () X{ X int comes_from_bit; X int bit, X sg; X ufc_long j; X ufc_long mask1, X mask2; X X /* X * create the do_pc1 table used to affect pc1 X * permutation when generating keys X */ X for (bit = 0; bit < 56; bit++) { X comes_from_bit = pc1[bit] - 1; X mask1 = bytemask[comes_from_bit % 8 + 1]; X mask2 = longmask[bit % 28 + 4]; X for (j = 0; j < 128; j++) { X if (j & mask1) X do_pc1[comes_from_bit / 8][bit / 28][j] |= mask2; X } X } X X /* X * create the do_pc2 table used to affect pc2 X * permutation when generating * keys X */ X for (bit = 0; bit < 48; bit++) { X comes_from_bit = pc2[bit] - 1; X mask1 = bytemask[comes_from_bit % 7 + 1]; X mask2 = BITMASK (bit % 24); X for (j = 0; j < 128; j++) { X if (j & mask1) X do_pc2[comes_from_bit / 7][j] |= mask2; X } X } X X /* X * now generate the table used to do combined X * 32 bit permutation and e expansion X * X * we use it because we have to permute 16384 X * 32 bit longs into 48 bit in order to initialize sb. X * X * looping 48 rounds per permutation becomes just too slow... X */ X clearmem ((char *) eperm32tab, sizeof (eperm32tab)); X X for (bit = 0; bit < 48; bit++) { X ufc_long mask1, X comes_from; X X comes_from = perm32[esel[bit] - 1] - 1; X mask1 = bytemask[comes_from % 8]; X X for (j = 256; j--;) { X if (j & mask1) X eperm32tab[comes_from / 8][j][bit / 24] |= BITMASK (bit % 24); X } X } X X /* X * create the sb tables: X * X * For each 12 bit segment of an 48 bit intermediate X * result, the sb table precomputes the two 4 bit X * values of the sbox lookups done with the two 6 X * bit halves, shifts them to their proper place, X * sends them through perm32 and finally E expands X * them so that they are ready for the next DES X * round. X */ X for (sg = 0; sg < 4; sg++) { X int j1, X j2; X int s1, X s2; X X for (j1 = 0; j1 < 64; j1++) { X s1 = s_lookup (2 * sg, j1); X for (j2 = 0; j2 < 64; j2++) { X ufc_long to_permute, X inx; X X s2 = s_lookup (2 * sg + 1, j2); X to_permute = ((s1 << 4) | s2) << (24 - 8 * sg); X X#ifdef _UFC_32_ X inx = ((j1 << 6) | j2) << 1; X sb[sg][inx] = eperm32tab[0][(to_permute >> 24) & 0xff][0]; X sb[sg][inx + 1] = eperm32tab[0][(to_permute >> 24) & 0xff][1]; X sb[sg][inx] |= eperm32tab[1][(to_permute >> 16) & 0xff][0]; X sb[sg][inx + 1] |= eperm32tab[1][(to_permute >> 16) & 0xff][1]; X sb[sg][inx] |= eperm32tab[2][(to_permute >> 8) & 0xff][0]; X sb[sg][inx + 1] |= eperm32tab[2][(to_permute >> 8) & 0xff][1]; X sb[sg][inx] |= eperm32tab[3][(to_permute) & 0xff][0]; X sb[sg][inx + 1] |= eperm32tab[3][(to_permute) & 0xff][1]; X#endif X#ifdef _UFC_64_ X inx = ((j1 << 6) | j2); X sb[sg][inx] = X ((long64) eperm32tab[0][(to_permute >> 24) & 0xff][0] << 32) | X (long64) eperm32tab[0][(to_permute >> 24) & 0xff][1]; X sb[sg][inx] |= X ((long64) eperm32tab[1][(to_permute >> 16) & 0xff][0] << 32) | X (long64) eperm32tab[1][(to_permute >> 16) & 0xff][1]; X sb[sg][inx] |= X ((long64) eperm32tab[2][(to_permute >> 8) & 0xff][0] << 32) | X (long64) eperm32tab[2][(to_permute >> 8) & 0xff][1]; X sb[sg][inx] |= X ((long64) eperm32tab[3][(to_permute) & 0xff][0] << 32) | X (long64) eperm32tab[3][(to_permute) & 0xff][1]; X#endif X } X } X } X X /* X * create an inverse matrix for esel telling X * where to plug out bits if undoing it X */ X for (bit = 48; bit--;) { X e_inverse[esel[bit] - 1] = bit; X e_inverse[esel[bit] - 1 + 32] = bit + 48; X } X X /* X * create efp: the matrix used to undo the E X * expansion and effect final permutation X */ X clearmem ((char *) efp, sizeof efp); X for (bit = 0; bit < 64; bit++) { X int o_bit, X o_long; X ufc_long word_value, X mask1, X mask2; X int comes_from_f_bit, X comes_from_e_bit; X int comes_from_word, X bit_within_word; X X /* see where bit i belongs in the two 32 bit long's */ X o_long = bit / 32; // 0..1 X X o_bit = bit % 32; // 0..31 X X /* X * and find a bit in the e permutated value X * setting this bit. X * X * note: the e selection may have selected the X * same bit several times. By the X * initialization of e_inverse, we only look X * for one specific instance. X */ X comes_from_f_bit = final_perm[bit] - 1; // 0..63 X comes_from_e_bit = e_inverse[comes_from_f_bit]; // 0..95 X comes_from_word = comes_from_e_bit / 6; // 0..15 X bit_within_word = comes_from_e_bit % 6; // 0..5 X X mask1 = longmask[bit_within_word + 26]; X mask2 = longmask[o_bit]; X X for (word_value = 64; word_value--;) { X if (word_value & mask1) X efp[comes_from_word][word_value][o_long] |= mask2; X } X } X} X X/* X * unix crypt function X */ Xchar * XCrypt::crypt (char *key, char *salt) X{ X ufc_long *s; X char ktab[9]; X X setup_salt (salt); // hack DES tables according to salt X clearmem (ktab, sizeof ktab); // setup key schedule X X strncpy (ktab, key, 8); X ufc_mk_keytab (ktab); X X /* go for the 25 DES encryptions */ X s = _ufc_doit ((ufc_long) 0, (ufc_long) 0, X (ufc_long) 0, (ufc_long) 0, (ufc_long) 25); X X /* and convert back to 6 bit ASCII */ X return output_conversion (s[0], s[1], salt); X} X X/* X * to make fcrypt users happy. X * They don't need to call init_des. X */ Xchar * XCrypt::fcrypt (char *key, char *salt) X{ X return crypt(key, salt); X} X X/* X * unix encrypt function. Takes a bitvector represented by one X * byte per bit and encrypt/decrypt according to edflag X */ Xvoid XCrypt::encrypt (char *block, int edflag) X{ X ufc_long l1, X l2, X r1, X r2, X *s; X int i; X X /* undo any salt changes to E expansion */ X setup_salt (".."); X X /* reverse key table if changing operation (encrypt/decrypt) */ X if ((edflag == 0) != (direction == 0)) { X for (i = 0; i < 8; i++) { X#ifdef _UFC_32_ X long32 x; X X x = _ufc_keytab[15 - i][0]; X _ufc_keytab[15 - i][0] = _ufc_keytab[i][0]; X _ufc_keytab[i][0] = x; X X x = _ufc_keytab[15 - i][1]; X _ufc_keytab[15 - i][1] = _ufc_keytab[i][1]; X _ufc_keytab[i][1] = x; X#endif X#ifdef _UFC_64_ X long64 x; X X x = _ufc_keytab[15 - i]; X _ufc_keytab[15 - i] = _ufc_keytab[i]; X _ufc_keytab[i] = x; X#endif X } X direction = edflag; X } X /* do initial permutation + E expansion */ X i = 0; X for (l1 = 0; i < 24; i++) { X if (block[initial_perm[esel[i] - 1] - 1]) X l1 |= BITMASK (i); X } X for (l2 = 0; i < 48; i++) { X if (block[initial_perm[esel[i] - 1] - 1]) X l2 |= BITMASK (i - 24); X } X X i = 0; X for (r1 = 0; i < 24; i++) { X if (block[initial_perm[esel[i] - 1 + 32] - 1]) X r1 |= BITMASK (i); X } X for (r2 = 0; i < 48; i++) { X if (block[initial_perm[esel[i] - 1 + 32] - 1]) X r2 |= BITMASK (i - 24); X } X X /* do DES inner loops + final conversion */ X s = _ufc_doit (l1, l2, r1, r2, (ufc_long) 1); X X /* and convert to bit array */ X l1 = s[0]; X r1 = s[1]; X for (i = 0; i < 32; i++) { X *block++ = (l1 & longmask[i]) != 0; X } X for (i = 0; i < 32; i++) { X *block++ = (r1 & longmask[i]) != 0; X } X} X X/* X * UNIX setkey function. Take a 64 bit DES key and setup the machinery. X */ Xvoid XCrypt::setkey (char *key) X{ X int i, X j; X unsigned char c; X unsigned char ktab[8]; X X setup_salt (".."); // be sure we're initialized X X for (i = 0; i < 8; i++) { X for (j = 0, c = 0; j < 8; j++) X c = c << 1 | *key++; X ktab[i] = c >> 1; X } X X ufc_mk_keytab ((char *) ktab); // cast is o.k. X X} X X/* silly rewrite of 'bzero' */ Xvoid XCrypt::clearmem (char *start, int cnt) X{ X while (cnt--) X *start++ = '\0'; X} X X/* X * process the elements of the sb table permuting the bits swapped in the X * expansion by the current salt. X */ X#ifdef _UFC_32_ Xvoid XCrypt::shuffle_sb (long32 * k, ufc_long saltbits) X{ X ufc_long j; X long32 x; X X for (j = 4096; j--;) { X x = (k[0] ^ k[1]) & (long32) saltbits; X *k++ ^= x; X *k++ ^= x; X } X} X X#endif X#ifdef _UFC_64_ Xvoid XCrypt::shuffle_sb (long64 * k, ufc_long saltbits) X{ X ufc_long j; X long64 x; X X for (j = 4096; j--;) { X x = ((*k >> 32) ^ *k) & (long64) saltbits; X *k++ ^= (x << 32) | x; X } X} X X#endif X X/* X * setup the unit for a new salt hopefully we'll not see a new salt in each X * crypt call. X */ Xvoid XCrypt::setup_salt (char *s) X{ X ufc_long i, X j, X saltbits; X X /* initialisation of des already done in consructor */ X X if (s[0] == current_salt[0] && s[1] == current_salt[1]) X return; X X current_salt[0] = s[0]; X current_salt[1] = s[1]; X X /* X * this is the only crypt change to DES: entries are swapped in the X * expansion table according to the bits set in the salt. X */ X saltbits = 0; X for (i = 0; i < 2; i++) { X long c = ascii_to_bin (s[i]); X X if (c < 0 || c > 63) X c = 0; X for (j = 0; j < 6; j++) { X if ((c >> j) & 0x1) X saltbits |= BITMASK (6 * i + j); X } X } X X /* X * permute the sb table values to reflect the changed e selection table X */ X shuffle_sb (_ufc_sb0, current_saltbits ^ saltbits); X shuffle_sb (_ufc_sb1, current_saltbits ^ saltbits); X shuffle_sb (_ufc_sb2, current_saltbits ^ saltbits); X shuffle_sb (_ufc_sb3, current_saltbits ^ saltbits); X X current_saltbits = saltbits; X} X Xvoid XCrypt::ufc_mk_keytab (char *key) X{ X ufc_long v1, X v2, X *k1; X int i; X X#ifdef _UFC_32_ X long32 v, X *k2 = &_ufc_keytab[0][0]; X X#endif X#ifdef _UFC_64_ X long64 v, X *k2 = &_ufc_keytab[0]; X X#endif X X v1 = v2 = 0; X k1 = &do_pc1[0][0][0]; X for (i = 8; i--;) { X v1 |= k1[*key & 0x7f]; X k1 += 128; X v2 |= k1[*key++ & 0x7f]; X k1 += 128; X } X X for (i = 0; i < 16; i++) { X k1 = &do_pc2[0][0]; X X v1 = (v1 << rots[i]) | (v1 >> (28 - rots[i])); X v = k1[(v1 >> 21) & 0x7f]; X k1 += 128; X v |= k1[(v1 >> 14) & 0x7f]; X k1 += 128; X v |= k1[(v1 >> 7) & 0x7f]; X k1 += 128; X v |= k1[(v1) & 0x7f]; X k1 += 128; X X#ifdef _UFC_32_ X *k2++ = v; X v = 0; X#endif X#ifdef _UFC_64_ X v <<= 32; X#endif X X v2 = (v2 << rots[i]) | (v2 >> (28 - rots[i])); X v |= k1[(v2 >> 21) & 0x7f]; X k1 += 128; X v |= k1[(v2 >> 14) & 0x7f]; X k1 += 128; X v |= k1[(v2 >> 7) & 0x7f]; X k1 += 128; X v |= k1[(v2) & 0x7f]; X X *k2++ = v; X } X X direction = 0; X} X X/* undo an extra E selection and do final permutations */ Xufc_long * XCrypt::_ufc_dofinalperm (ufc_long l1, ufc_long l2, X ufc_long r1, ufc_long r2) X{ X ufc_long v1, X v2, X x; X static ufc_long ary[2]; X X x = (l1 ^ l2) & current_saltbits; X l1 ^= x; X l2 ^= x; X x = (r1 ^ r2) & current_saltbits; X r1 ^= x; X r2 ^= x; X X v1 = v2 = 0; X l1 >>= 3; X l2 >>= 3; X r1 >>= 3; X r2 >>= 3; X X v1 |= efp[15][r2 & 0x3f][0]; X v2 |= efp[15][r2 & 0x3f][1]; X v1 |= efp[14][(r2 >>= 6) & 0x3f][0]; X v2 |= efp[14][r2 & 0x3f][1]; X v1 |= efp[13][(r2 >>= 10) & 0x3f][0]; X v2 |= efp[13][r2 & 0x3f][1]; X v1 |= efp[12][(r2 >>= 6) & 0x3f][0]; X v2 |= efp[12][r2 & 0x3f][1]; X X v1 |= efp[11][r1 & 0x3f][0]; X v2 |= efp[11][r1 & 0x3f][1]; X v1 |= efp[10][(r1 >>= 6) & 0x3f][0]; X v2 |= efp[10][r1 & 0x3f][1]; X v1 |= efp[9][(r1 >>= 10) & 0x3f][0]; X v2 |= efp[9][r1 & 0x3f][1]; X v1 |= efp[8][(r1 >>= 6) & 0x3f][0]; X v2 |= efp[8][r1 & 0x3f][1]; X X v1 |= efp[7][l2 & 0x3f][0]; X v2 |= efp[7][l2 & 0x3f][1]; X v1 |= efp[6][(l2 >>= 6) & 0x3f][0]; X v2 |= efp[6][l2 & 0x3f][1]; X v1 |= efp[5][(l2 >>= 10) & 0x3f][0]; X v2 |= efp[5][l2 & 0x3f][1]; X v1 |= efp[4][(l2 >>= 6) & 0x3f][0]; X v2 |= efp[4][l2 & 0x3f][1]; X X v1 |= efp[3][l1 & 0x3f][0]; X v2 |= efp[3][l1 & 0x3f][1]; X v1 |= efp[2][(l1 >>= 6) & 0x3f][0]; X v2 |= efp[2][l1 & 0x3f][1]; X v1 |= efp[1][(l1 >>= 10) & 0x3f][0]; X v2 |= efp[1][l1 & 0x3f][1]; X v1 |= efp[0][(l1 >>= 6) & 0x3f][0]; X v2 |= efp[0][l1 & 0x3f][1]; X X ary[0] = v1; X ary[1] = v2; X return ary; X} X X/* X * crypt only: convert from 64 bit to 11 bit ASCII prefixing with the salt X */ Xchar * XCrypt::output_conversion (ufc_long v1, ufc_long v2, char *salt) X{ X static char outbuf[14]; X int i, X s; X X outbuf[0] = salt[0]; X outbuf[1] = salt[1] ? salt[1] : salt[0]; X X for (i = 0; i < 5; i++) X outbuf[i + 2] = bin_to_ascii ((v1 >> (26 - 6 * i)) & 0x3f); X X s = (v2 & 0xf) << 2; X v2 = (v2 >> 2) | ((v1 & 0x3) << 30); X X for (i = 5; i < 10; i++) X outbuf[i + 2] = bin_to_ascii ((v2 >> (56 - 6 * i)) & 0x3f); X X outbuf[12] = bin_to_ascii (s); X outbuf[13] = 0; X X return outbuf; X} X X#ifdef _UFC_32_ X/* 32 Bit version */ X#define SBA(sb, v) (*(long32*)((char*)(sb)+(v))) X Xufc_long * XCrypt::_ufc_doit (ufc_long l1, ufc_long l2, X ufc_long r1, ufc_long r2, X ufc_long itr) X{ X int i; X long32 s, X *k; X X while (itr--) { X k = &_ufc_keytab[0][0]; X for (i = 8; i--;) { X s = *k++ ^ r1; X l1 ^= SBA (_ufc_sb1, s & 0xffff); X l2 ^= SBA (_ufc_sb1, (s & 0xffff) + 4); X l1 ^= SBA (_ufc_sb0, s >>= 16); X l2 ^= SBA (_ufc_sb0, (s) + 4); X s = *k++ ^ r2; X l1 ^= SBA (_ufc_sb3, s & 0xffff); X l2 ^= SBA (_ufc_sb3, (s & 0xffff) + 4); X l1 ^= SBA (_ufc_sb2, s >>= 16); X l2 ^= SBA (_ufc_sb2, (s) + 4); X X s = *k++ ^ l1; X r1 ^= SBA (_ufc_sb1, s & 0xffff); X r2 ^= SBA (_ufc_sb1, (s & 0xffff) + 4); X r1 ^= SBA (_ufc_sb0, s >>= 16); X r2 ^= SBA (_ufc_sb0, (s) + 4); X s = *k++ ^ l2; X r1 ^= SBA (_ufc_sb3, s & 0xffff); X r2 ^= SBA (_ufc_sb3, (s & 0xffff) + 4); X r1 ^= SBA (_ufc_sb2, s >>= 16); X r2 ^= SBA (_ufc_sb2, (s) + 4); X } X s = l1; X l1 = r1; X r1 = s; X s = l2; X l2 = r2; X r2 = s; X } X X return _ufc_dofinalperm (l1, l2, r1, r2); X} X X#endif X#ifdef _UFC_64_ X/* 64 Bit version */ X#define SBA(sb, v) (*(long64*)((char*)(sb)+(v))) X Xufc_long * XCrypt::_ufc_doit (ufc_long l1, ufc_long l2, X ufc_long r1, ufc_long r2, X ufc_long itr) X{ X int i; X long64 l, X r, X s, X *k; X X l = (((long64) l1) << 32) | ((long64) l2); X r = (((long64) r1) << 32) | ((long64) r2); X X while (itr--) { X k = &_ufc_keytab[0]; X for (i = 8; i--;) { X s = *k++ ^ r; X l ^= SBA (_ufc_sb3, (s >> 0) & 0xffff); X l ^= SBA (_ufc_sb2, (s >> 16) & 0xffff); X l ^= SBA (_ufc_sb1, (s >> 32) & 0xffff); X l ^= SBA (_ufc_sb0, (s >> 48) & 0xffff); X X s = *k++ ^ l; X r ^= SBA (_ufc_sb3, (s >> 0) & 0xffff); X r ^= SBA (_ufc_sb2, (s >> 16) & 0xffff); X r ^= SBA (_ufc_sb1, (s >> 32) & 0xffff); X r ^= SBA (_ufc_sb0, (s >> 48) & 0xffff); X } X s = l; X l = r; X r = s; X } X X l1 = l >> 32; X l2 = l & 0xffffffff; X r1 = r >> 32; X r2 = r & 0xffffffff; X X return _ufc_dofinalperm (l1, l2, r1, r2); X} X X#endif X ________This_Is_The_END________ if test `wc -l < CryptPP.cc` -ne 819; then echo 'shar: CryptPP.cc was damaged during transit (should have been 819 bytes)' fi fi ; : end of overwriting check echo 'x - CryptPP.h' if test -f CryptPP.h; then echo 'shar: not overwriting CryptPP.h'; else sed 's/^X//' << '________This_Is_The_END________' > CryptPP.h X X/* X * CryptPP.h: encapsulate ufc-crypt password encryption X * X * $Id: CryptPP.h,v 1.3 1996/10/27 15:33:40 andreas Exp andreas $ X * X * X * UFC-crypt: ultra fast crypt(3) implementation X * X * Copyright (C) 1991, 1992, Free Software Foundation, Inc. X * X * This library is free software; you can redistribute it and/or X * modify it under the terms of the GNU Library General Public X * License as published by the Free Software Foundation; either X * version 2 of the License, or (at your option) any later version. X * X * This library is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X * Library General Public License for more details. X * X * You should have received a copy of the GNU Library General Public X * License along with this library; if not, write to the Free X * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * @(#)crypt.c 2.17 2/22/92 X * X * Semiportable C version X * X */ X X#ifndef _CRYPTPP_H_ X#define _CRYPTPP_H_ X X/* X * iinclude original datatype definitions for 32 X * and 64 Bit architectures (this file is really unchanged) X */ X#include "ufc-crypt.h" X X Xclass Crypt { X private: /* and static members */ X static int pc1[]; X static int rots[]; X static int pc2[]; X static int esel[]; X static int perm32[]; X static int sbox[][][]; X static int initial_perm[]; X static int final_perm[]; X static unsigned char bytemask[]; X static ufc_long longmask[]; X X private: /* non-static members */ X int direction; X int e_inverse[64]; X ufc_long current_saltbits; X unsigned char current_salt[3]; X ufc_long eperm32tab[4][256][2]; X ufc_long do_pc1[8][2][128]; X ufc_long do_pc2[8][128]; X ufc_long efp[16][64][2]; X#ifdef _UFC_32_ X long32 _ufc_keytab[16][2]; X long32 _ufc_sb0[8192], X _ufc_sb1[8192], X _ufc_sb2[8192], X _ufc_sb3[8192]; X long32 *sb[4]; X#endif X#ifdef _UFC_64_ X long64 _ufc_keytab[16]; X long64 _ufc_sb0[4096], X _ufc_sb1[4096], X _ufc_sb2[4096], X _ufc_sb3[4096]; X long64 *sb[4]; X#endif X X private: /* member functions */ X void init_des (void); X void setup_salt (char *); X void ufc_mk_keytab (char *); X ufc_long *_ufc_doit (ufc_long, ufc_long, ufc_long, ufc_long, ufc_long); X ufc_long *_ufc_dofinalperm (ufc_long, ufc_long, ufc_long, ufc_long); X char *output_conversion (ufc_long, ufc_long, char *); X#ifdef _UFC_32_ X void shuffle_sb (long32 *, ufc_long); X#endif X#ifdef _UFC_64_ X void shuffle_sb (long64 *, ufc_long); X#endif X X X public: /* member functions */ X Crypt (); X ~Crypt (); X X char *crypt (char *, char *); X char *fcrypt (char *, char *); X void encrypt (char *, int); X void setkey (char *); X X void clearmem (char *, int); X}; X X#endif ________This_Is_The_END________ if test `wc -l < CryptPP.h` -ne 108; then echo 'shar: CryptPP.h was damaged during transit (should have been 108 bytes)' fi fi ; : end of overwriting check echo 'x - ufc-crypt.h' if test -f ufc-crypt.h; then echo 'shar: not overwriting ufc-crypt.h'; else sed 's/^X//' << '________This_Is_The_END________' > ufc-crypt.h X/* X * UFC-crypt: ultra fast crypt(3) implementation X * X * Copyright (C) 1991, 1992, Free Software Foundation, Inc. X * X * This library is free software; you can redistribute it and/or X * modify it under the terms of the GNU Library General Public X * License as published by the Free Software Foundation; either X * version 2 of the License, or (at your option) any later version. X * X * This library is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X * Library General Public License for more details. X X * You should have received a copy of the GNU Library General Public X * License along with this library; if not, write to the Free X * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * @(#)ufc-crypt.h 1.13 2/22/92 X * X * Definitions of datatypes X * X */ X X/* X * Requirements for datatypes: X * X * A datatype 'ufc_long' of at least 32 bit X * *and* X * A type 'long32' of exactly 32 bits (_UFC_32_) X * *or* X * A type 'long64' of exactly 64 bits (_UFC_64_) X * X * 'int' is assumed to be at least 8 bit X */ X X/* X * #ifdef's for various architectures X */ X X#ifdef cray X/* thanks to (Tom Hutton) for testing */ Xtypedef unsigned long ufc_long; Xtypedef unsigned long long64; X#define _UFC_64_ X#endif X X#ifdef convex X/* thanks to pcl@convex.oxford.ac.uk (Paul Leyland) for testing */ Xtypedef unsigned long ufc_long; Xtypedef long long long64; X#define _UFC_64_ X#endif X X#ifdef alpha Xtypedef unsigned long ufc_long; Xtypedef long long long64; X#define _UFC_64_ X#endif X X/* X * For debugging 64 bit code etc with 'gcc' X */ X X#ifdef GCC3232 Xtypedef unsigned long ufc_long; Xtypedef unsigned long long32; X#define _UFC_32_ X#endif X X#ifdef GCC3264 Xtypedef unsigned long ufc_long; Xtypedef long long long64; X#define _UFC_64_ X#endif X X#ifdef GCC6432 Xtypedef long long ufc_long; Xtypedef unsigned long long32; X#define _UFC_32_ X#endif X X#ifdef GCC6464 Xtypedef long long ufc_long; Xtypedef long long long64; X#define _UFC_64_ X#endif X X/* X * Catch all for 99.95% of all UNIX machines X */ X X#ifndef _UFC_64_ X#ifndef _UFC_32_ X#define _UFC_32_ Xtypedef unsigned ufc_long; Xtypedef unsigned long long32; X#endif X#endif X X ________This_Is_The_END________ if test `wc -l < ufc-crypt.h` -ne 102; then echo 'shar: ufc-crypt.h was damaged during transit (should have been 102 bytes)' fi fi ; : end of overwriting check echo 'x - cert.c' if test -f cert.c; then echo 'shar: not overwriting cert.c'; else sed 's/^X//' << '________This_Is_The_END________' > cert.c X X/* X * This crypt(3) validation program shipped with UFC-crypt is derived from X * one distributed with Phil Karns PD DES package. X * X * @(#)cert.c 1.5 02/08/92 X */ X X#include X#include "CryptPP.h" X Xvoid get8 (char *cp); Xvoid put8 (char *cp); X Xint totfails = 0; X Xvoid Xgood_bye () X{ X if (totfails == 0) { X printf ("Passed DES validation suite\n"); X exit (0); X } else { X printf ("%d failures during DES validation suite!!!\n", totfails); X exit (1); X } X} X Xmain () X{ X char key[64], X plain[64], X cipher[64], X answer[64]; X int i; X int test; X int fail; X X Crypt cert; X X for (test = 0; !feof (stdin); test++) { X get8 (key); X printf (" K: "); X put8 (key); X cert.setkey (key); X X get8 (plain); X printf (" P: "); X put8 (plain); X X get8 (answer); X printf (" C: "); X put8 (answer); X X for (i = 0; i < 64; i++) X cipher[i] = plain[i]; X cert.encrypt (cipher, 0); X X for (i = 0; i < 64; i++) X if (cipher[i] != answer[i]) X break; X fail = 0; X if (i != 64) { X printf (" Encrypt FAIL"); X fail++; X totfails++; X } X cert.encrypt (cipher, 1); X X for (i = 0; i < 64; i++) X if (cipher[i] != plain[i]) X break; X if (i != 64) { X printf (" Decrypt FAIL"); X fail++; X totfails++; X } X if (fail == 0) X printf (" OK"); X printf ("\n"); X } X good_bye (); X} X Xvoid Xget8 (char *cp) X{ X int i, X j, X t; X X for (i = 0; i < 8; i++) { X scanf ("%2x", &t); X if (feof (stdin)) X good_bye (); X for (j = 0; j < 8; j++) { X *cp++ = (t & (0x01 << (7 - j))) != 0; X } X } X} X Xvoid Xput8 (char *cp) X{ X int i, X j, X t; X X for (i = 0; i < 8; i++) { X t = 0; X for (j = 0; j < 8; j++) X t = (t << 1) | *cp++; X printf ("%02x", t); X } X} ________This_Is_The_END________ if test `wc -l < cert.c` -ne 115; then echo 'shar: cert.c was damaged during transit (should have been 115 bytes)' fi fi ; : end of overwriting check echo 'x - speeds.c' if test -f speeds.c; then echo 'shar: not overwriting speeds.c'; else sed 's/^X//' << '________This_Is_The_END________' > speeds.c X X/* X * This fcrypt/crypt speed testing program is derived from one floating X * around in the net. It's distributed along with UFC-crypt but is not. X * X * @(#)speeds.c 1.6 02/08/92 X */ X X#include X#include X#include X#include X#ifdef SVR4 X #include X#endif X#ifdef FCRYPT X #include "CryptPP.h" X#endif X X Xstatic int cnt; X X#define ITIME 10 /* Number of seconds to run test. */ X Xvoid XStop (int) X{ X printf ("Did %f %s()s per second.\n", X ((float) cnt) / ((float) ITIME), X#if defined(FCRYPT) X "fcrypt" X#else X "crypt" X#endif X ); X exit (0); X} X X#ifndef FCRYPT X/* X * Silly rewrite of 'bzero'. I do so X * because some machines don't have X * bzero and some don't have memset. X */ Xstatic void clearmem(char *start, int cnt) X{ X while(cnt--) X *start++ = '\0'; X} X#endif X X Xmain () X{ X#ifdef FCRYPT X Crypt speed; X#endif X struct itimerval itv; X X#ifdef FCRYPT X speed.clearmem ((char *) &itv, sizeof (itv)); X#else X clearmem ((char *)&itv, sizeof (itv)); X#endif X X printf ("Running %s for %d seconds of virtual time ...\n", X X#ifdef FCRYPT X "Crypt-Class", X#else X "crypt(libc)", X#endif X ITIME); X X signal (SIGVTALRM, Stop); X itv.it_value.tv_sec = ITIME; X itv.it_value.tv_usec = 0; X setitimer (ITIMER_VIRTUAL, &itv, NULL); X X for (cnt = 0;; cnt++) { X#ifdef FCRYPT X speed.fcrypt ("fredfred", "eek"); X#else X crypt ("fredfred", "eek"); X#endif X } X} X ________This_Is_The_END________ if test `wc -l < speeds.c` -ne 88; then echo 'shar: speeds.c was damaged during transit (should have been 88 bytes)' fi fi ; : end of overwriting check echo 'x - ufc.c' if test -f ufc.c; then echo 'shar: not overwriting ufc.c'; else sed 's/^X//' << '________This_Is_The_END________' > ufc.c X X/* X * ufc.c: small test-suite for CryptPP.cc X */ X X#include X#include X#include "CryptPP.h" X Xint Xmain (int argc, char *argv[]) X{ X char *s = 0; X unsigned long iterations, X i; X X if (argc != 2) { X fprintf (stderr, "usage: ufc iterations\n"); X exit (1); X } X argv++; X iterations = atoi (*argv); X X printf ("ufc: running %d iterations\n", (int) iterations); X X Crypt pwd; X for (i = 0; i < iterations; i++) { X s = pwd.crypt ("foob", "ar"); X } X if (strcmp (s, "arlEKn0OzVJn.") == 0) X printf ("OK\n"); X else { X printf ("wrong result: %s!!\n", s); X return (1); X } X return (0); X} X ________This_Is_The_END________ if test `wc -l < ufc.c` -ne 38; then echo 'shar: ufc.c was damaged during transit (should have been 38 bytes)' fi fi ; : end of overwriting check echo 'x - cert.data' if test -f cert.data; then echo 'shar: not overwriting cert.data'; else sed 's/^X//' << '________This_Is_The_END________' > cert.data X0101010101010101 95f8a5e5dd31d900 8000000000000000 X0101010101010101 dd7f121ca5015619 4000000000000000 X0101010101010101 2e8653104f3834ea 2000000000000000 X0101010101010101 4bd388ff6cd81d4f 1000000000000000 X0101010101010101 20b9e767b2fb1456 0800000000000000 X0101010101010101 55579380d77138ef 0400000000000000 X0101010101010101 6cc5defaaf04512f 0200000000000000 X0101010101010101 0d9f279ba5d87260 0100000000000000 X0101010101010101 d9031b0271bd5a0a 0080000000000000 X0101010101010101 424250b37c3dd951 0040000000000000 X0101010101010101 b8061b7ecd9a21e5 0020000000000000 X0101010101010101 f15d0f286b65bd28 0010000000000000 X0101010101010101 add0cc8d6e5deba1 0008000000000000 X0101010101010101 e6d5f82752ad63d1 0004000000000000 X0101010101010101 ecbfe3bd3f591a5e 0002000000000000 X0101010101010101 f356834379d165cd 0001000000000000 X0101010101010101 2b9f982f20037fa9 0000800000000000 X0101010101010101 889de068a16f0be6 0000400000000000 X0101010101010101 e19e275d846a1298 0000200000000000 X0101010101010101 329a8ed523d71aec 0000100000000000 X0101010101010101 e7fce22557d23c97 0000080000000000 X0101010101010101 12a9f5817ff2d65d 0000040000000000 X0101010101010101 a484c3ad38dc9c19 0000020000000000 X0101010101010101 fbe00a8a1ef8ad72 0000010000000000 X0101010101010101 750d079407521363 0000008000000000 X0101010101010101 64feed9c724c2faf 0000004000000000 X0101010101010101 f02b263b328e2b60 0000002000000000 X0101010101010101 9d64555a9a10b852 0000001000000000 X0101010101010101 d106ff0bed5255d7 0000000800000000 X0101010101010101 e1652c6b138c64a5 0000000400000000 X0101010101010101 e428581186ec8f46 0000000200000000 X0101010101010101 aeb5f5ede22d1a36 0000000100000000 X0101010101010101 e943d7568aec0c5c 0000000080000000 X0101010101010101 df98c8276f54b04b 0000000040000000 X0101010101010101 b160e4680f6c696f 0000000020000000 X0101010101010101 fa0752b07d9c4ab8 0000000010000000 X0101010101010101 ca3a2b036dbc8502 0000000008000000 X0101010101010101 5e0905517bb59bcf 0000000004000000 X0101010101010101 814eeb3b91d90726 0000000002000000 X0101010101010101 4d49db1532919c9f 0000000001000000 X0101010101010101 25eb5fc3f8cf0621 0000000000800000 X0101010101010101 ab6a20c0620d1c6f 0000000000400000 X0101010101010101 79e90dbc98f92cca 0000000000200000 X0101010101010101 866ecedd8072bb0e 0000000000100000 X0101010101010101 8b54536f2f3e64a8 0000000000080000 X0101010101010101 ea51d3975595b86b 0000000000040000 X0101010101010101 caffc6ac4542de31 0000000000020000 X0101010101010101 8dd45a2ddf90796c 0000000000010000 X0101010101010101 1029d55e880ec2d0 0000000000008000 X0101010101010101 5d86cb23639dbea9 0000000000004000 X0101010101010101 1d1ca853ae7c0c5f 0000000000002000 X0101010101010101 ce332329248f3228 0000000000001000 X0101010101010101 8405d1abe24fb942 0000000000000800 X0101010101010101 e643d78090ca4207 0000000000000400 X0101010101010101 48221b9937748a23 0000000000000200 X0101010101010101 dd7c0bbd61fafd54 0000000000000100 X0101010101010101 2fbc291a570db5c4 0000000000000080 X0101010101010101 e07c30d7e4e26e12 0000000000000040 X0101010101010101 0953e2258e8e90a1 0000000000000020 X0101010101010101 5b711bc4ceebf2ee 0000000000000010 X0101010101010101 cc083f1e6d9e85f6 0000000000000008 X0101010101010101 d2fd8867d50d2dfe 0000000000000004 X0101010101010101 06e7ea22ce92708f 0000000000000002 X0101010101010101 166b40b44aba4bd6 0000000000000001 X8001010101010101 0000000000000000 95a8d72813daa94d X4001010101010101 0000000000000000 0eec1487dd8c26d5 X2001010101010101 0000000000000000 7ad16ffb79c45926 X1001010101010101 0000000000000000 d3746294ca6a6cf3 X0801010101010101 0000000000000000 809f5f873c1fd761 X0401010101010101 0000000000000000 c02faffec989d1fc X0201010101010101 0000000000000000 4615aa1d33e72f10 X0180010101010101 0000000000000000 2055123350c00858 X0140010101010101 0000000000000000 df3b99d6577397c8 X0120010101010101 0000000000000000 31fe17369b5288c9 X0110010101010101 0000000000000000 dfdd3cc64dae1642 X0108010101010101 0000000000000000 178c83ce2b399d94 X0104010101010101 0000000000000000 50f636324a9b7f80 X0102010101010101 0000000000000000 a8468ee3bc18f06d X0101800101010101 0000000000000000 a2dc9e92fd3cde92 X0101400101010101 0000000000000000 cac09f797d031287 X0101200101010101 0000000000000000 90ba680b22aeb525 X0101100101010101 0000000000000000 ce7a24f350e280b6 X0101080101010101 0000000000000000 882bff0aa01a0b87 X0101040101010101 0000000000000000 25610288924511c2 X0101020101010101 0000000000000000 c71516c29c75d170 X0101018001010101 0000000000000000 5199c29a52c9f059 X0101014001010101 0000000000000000 c22f0a294a71f29f X0101012001010101 0000000000000000 ee371483714c02ea X0101011001010101 0000000000000000 a81fbd448f9e522f X0101010801010101 0000000000000000 4f644c92e192dfed X0101010401010101 0000000000000000 1afa9a66a6df92ae X0101010201010101 0000000000000000 b3c1cc715cb879d8 X0101010180010101 0000000000000000 19d032e64ab0bd8b X0101010140010101 0000000000000000 3cfaa7a7dc8720dc X0101010120010101 0000000000000000 b7265f7f447ac6f3 X0101010110010101 0000000000000000 9db73b3c0d163f54 X0101010108010101 0000000000000000 8181b65babf4a975 X0101010104010101 0000000000000000 93c9b64042eaa240 X0101010102010101 0000000000000000 5570530829705592 X0101010101800101 0000000000000000 8638809e878787a0 X0101010101400101 0000000000000000 41b9a79af79ac208 X0101010101200101 0000000000000000 7a9be42f2009a892 X0101010101100101 0000000000000000 29038d56ba6d2745 X0101010101080101 0000000000000000 5495c6abf1e5df51 X0101010101040101 0000000000000000 ae13dbd561488933 X0101010101020101 0000000000000000 024d1ffa8904e389 X0101010101018001 0000000000000000 d1399712f99bf02e X0101010101014001 0000000000000000 14c1d7c1cffec79e X0101010101012001 0000000000000000 1de5279dae3bed6f X0101010101011001 0000000000000000 e941a33f85501303 X0101010101010801 0000000000000000 da99dbbc9a03f379 X0101010101010401 0000000000000000 b7fc92f91d8e92e9 X0101010101010201 0000000000000000 ae8e5caa3ca04e85 X0101010101010180 0000000000000000 9cc62df43b6eed74 X0101010101010140 0000000000000000 d863dbb5c59a91a0 X0101010101010120 0000000000000000 a1ab2190545b91d7 X0101010101010110 0000000000000000 0875041e64c570f7 X0101010101010108 0000000000000000 5a594528bebef1cc X0101010101010104 0000000000000000 fcdb3291de21f0c0 X0101010101010102 0000000000000000 869efd7f9f265a09 X1046913489980131 0000000000000000 88d55e54f54c97b4 X1007103489988020 0000000000000000 0c0cc00c83ea48fd X10071034c8980120 0000000000000000 83bc8ef3a6570183 X1046103489988020 0000000000000000 df725dcad94ea2e9 X1086911519190101 0000000000000000 e652b53b550be8b0 X1086911519580101 0000000000000000 af527120c485cbb0 X5107b01519580101 0000000000000000 0f04ce393db926d5 X1007b01519190101 0000000000000000 c9f00ffc74079067 X3107915498080101 0000000000000000 7cfd82a593252b4e X3107919498080101 0000000000000000 cb49a2f9e91363e3 X10079115b9080140 0000000000000000 00b588be70d23f56 X3107911598090140 0000000000000000 406a9a6ab43399ae X1007d01589980101 0000000000000000 6cb773611dca9ada X9107911589980101 0000000000000000 67fd21c17dbb5d70 X9107d01589190101 0000000000000000 9592cb4110430787 X1007d01598980120 0000000000000000 a6b7ff68a318ddd3 X1007940498190101 0000000000000000 4d102196c914ca16 X0107910491190401 0000000000000000 2dfa9f4573594965 X0107910491190101 0000000000000000 b46604816c0e0774 X0107940491190401 0000000000000000 6e7e6221a4f34e87 X19079210981a0101 0000000000000000 aa85e74643233199 X1007911998190801 0000000000000000 2e5a19db4d1962d6 X10079119981a0801 0000000000000000 23a866a809d30894 X1007921098190101 0000000000000000 d812d961f017d320 X100791159819010b 0000000000000000 055605816e58608f X1004801598190101 0000000000000000 abd88e8b1b7716f1 X1004801598190102 0000000000000000 537ac95be69da1e1 X1004801598190108 0000000000000000 aed0f6ae3c25cdd8 X1002911598100104 0000000000000000 b3e35a5ee53e7b8d X1002911598190104 0000000000000000 61c79c71921a2ef8 X1002911598100201 0000000000000000 e2f5728f0995013c X1002911698100101 0000000000000000 1aeac39a61f0a464 X7ca110454a1a6e57 01a1d6d039776742 690f5b0d9a26939b X0131d9619dc1376e 5cd54ca83def57da 7a389d10354bd271 X07a1133e4a0b2686 0248d43806f67172 868ebb51cab4599a X3849674c2602319e 51454b582ddf440a 7178876e01f19b2a X04b915ba43feb5b6 42fd443059577fa2 af37fb421f8c4095 X0113b970fd34f2ce 059b5e0851cf143a 86a560f10ec6d85b X0170f175468fb5e6 0756d8e0774761d2 0cd3da020021dc09 X43297fad38e373fe 762514b829bf486a ea676b2cb7db2b7a X07a7137045da2a16 3bdd119049372802 dfd64a815caf1a0f X04689104c2fd3b2f 26955f6835af609a 5c513c9c4886c088 X37d06bb516cb7546 164d5e404f275232 0a2aeeae3ff4ab77 X1f08260d1ac2465e 6b056e18759f5cca ef1bf03e5dfa575a X584023641aba6176 004bd6ef09176062 88bf0db6d70dee56 X025816164629b007 480d39006ee762f2 a1f9915541020b56 X49793ebc79b3258f 437540c8698f3cfa 6fbf1cafcffd0556 X4fb05e1515ab73a7 072d43a077075292 2f22e49bab7ca1ac X49e95d6d4ca229bf 02fe55778117f12a 5a6b612cc26cce4a X018310dc409b26d6 1d9d5c5018f728c2 5f4c038ed12b2e41 X1c587f1c13924fef 305532286d6f295a 63fac0d034d9f793 ________This_Is_The_END________ if test `wc -l < cert.data` -ne 171; then echo 'shar: cert.data was damaged during transit (should have been 171 bytes)' fi fi ; : end of overwriting check exit 0