summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/des
Commit message (Collapse)AuthorAgeFilesLines
* Crypto modularity proj: Separate files under crypto directory based on their ↵Zhanna Tsitkov2009-08-0324-5002/+0
| | | | | | | | functionality. Move Kerberos specific files into krb subdir and MIT specific - into builtin subdir. Place all tests into crypto_tests subfolder. bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22477 dc483132-0cff-0310-8789-dd5450dbe970
* make dependSam Hartman2009-04-301-0/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22299 dc483132-0cff-0310-8789-dd5450dbe970
* Implement DES and 3DES PRF. Patch fromKAMADA Ken'ichiSam Hartman2009-04-303-1/+62
| | | | | | | | | | | | | Currently the DES and 3DES PRF output 16-byte results. This is consistent with RFC 3961, but we need to confirm it is consistent with Heimdal and WG decisions. See IETF 74 minutes for some discussion of the concern as it applies to AES and thus possibly all simplified profile enctypes. ticket: 5587 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22298 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except ↵Ken Raeburn2009-02-021-1/+1
| | | | | | unicode, windows code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875 dc483132-0cff-0310-8789-dd5450dbe970
* Start to phase out krb5_xfree macro, which just casts its argument toKen Raeburn2009-01-281-2/+2
| | | | | | | | | | | char* and calls free. Replace most uses, outside of the LDAP KDB plugin, which doesn't build on my test system of the moment because of version dependencies. Add one explicit cast to make the change warning-neutral (under gcc 4.0.1 on Mac OS X 10.5.6). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21812 dc483132-0cff-0310-8789-dd5450dbe970
* Include cksumtypes.h from aead.h to get struct krb5_cksumtypes (movedKen Raeburn2009-01-231-2/+4
| | | | | | | | in rev 21753). Protect cksumtypes.h from multiple inclusions. Update dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21780 dc483132-0cff-0310-8789-dd5450dbe970
* move generated dependencies out of Makefile.inKen Raeburn2009-01-052-136/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move automatically-generated dependencies into separate files in the source tree, and take the data out of Makefile.in. Keep the "make depend" rules for stripping out the dependencies from Makefile.in, in case some optional directories were missed, but everything that builds on my UNIX build has been converted. (Converting a directory just requires creating an empty "deps" file so that config.status can build the makefile, and then later running "make depend" in that directory to get the correct content for it.) Change configure scripts to incorporate the "deps" file when building each Makefile. This change requires the existence of a file "deps" in each source directory where we build a makefile, even if there are no sources for which to compute dependencies; a switch to GNU make would let us conditionalize that, but we can assess that later. Update dependencies for the generate Makefile itself to list the deps file. This will also require some minor tweaking of the Windows build, to make it incorporate the new deps file. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21701 dc483132-0cff-0310-8789-dd5450dbe970
* Merge mskrb-integ onto trunkSam Hartman2009-01-034-2/+227
| | | | | | | | | | | | | | | | | | | | | | | | The mskrb-integ branch includes support for the following projects: Projects/Aliases * Projects/PAC and principal APIs * Projects/AEAD encryption API * Projects/GSSAPI DCE * Projects/RFC 3244 In addition, it includes support for enctype negotiation, and a variety of GSS-API extensions. In the KDC it includes support for protocol transition, constrained delegation and a new authorization data interface. The old authorization data interface is also supported. This commit merges the mskrb-integ branch on to the trunk. Additional review and testing is required. Merge commit 'mskrb-integ' into trunk ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21690 dc483132-0cff-0310-8789-dd5450dbe970
* Remove krb524, lib/des425, lib/krb4, and include/kerberosIV.Greg Hudson2008-12-182-55/+92
| | | | | | | | | | Remove krb4 build system references and conditionals. Move des425 header stuff referenced by des_int.h into des_int.h. Remove krb4 test cases. ticket: 6303 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21544 dc483132-0cff-0310-8789-dd5450dbe970
* make dependSam Hartman2008-12-021-0/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21266 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto IOV API per Projects/AEAD encryption APISam Hartman2008-12-023-0/+216
| | | | | | | | | | | | | | Merge in the mskrb-crypto-iov branch at r21259 in order to move an implementation of http://k5wiki.kerberos.org/wiki/Projects/AEAD_encryption_API onto the trunk. This branch contains a subset of the commits on the mskrb-integ branch that implement the krb5 library part of the crypto IOV API. ticket: new Status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21263 dc483132-0cff-0310-8789-dd5450dbe970
* Don't build dependencies for v4rcp.c.Ken Raeburn2008-11-041-63/+72
| | | | | | Rebuild dependencies for k5-buf.h, and without krb4 support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20964 dc483132-0cff-0310-8789-dd5450dbe970
* makedependKen Raeburn2008-09-181-63/+65
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20731 dc483132-0cff-0310-8789-dd5450dbe970
* Based on patch from lxs, with some changes:Ken Raeburn2008-08-273-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add several new gcc warning flags, used in the KfM build process. Put declarations before code. Fix a bunch of signed/unsigned type mixes, mostly by changing variable types to unsigned int. Fix constness in handling name of default ccache name. Make sure functions get declared with prototypes: krb5int_pthread_loaded krb5int_gmt_mktime krb5int_aes_encrypt krb5int_aes_decrypt gssint_mecherrmap_init gssint_mecherramp_get. Don't shadow global names: stat accept index open encrypt. Fix variable shadowing in LDAP ASN.1 support. Don't define unused krb5int_local_addresses. Don't export internal krb5_change_set_password. Fix error return indications from gssint_oid_to_mech. Create and use k5-gmt_mktime.h to provide one global declaration of krb5int_gmt_mktime, needed before we've generated krb5.h on some platforms. Not incorporated from initial patch: const changes in function signatures. ticket: 6096 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20697 dc483132-0cff-0310-8789-dd5450dbe970
* If CONFIG_SMALL_NO_CRYPTO is defined, turn off CONFIG_SMALL changes for ↵Ken Raeburn2008-08-122-2/+2
| | | | | | crypto code only git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20648 dc483132-0cff-0310-8789-dd5450dbe970
* Update copyright notices to reflect donation of DES implementation byTom Yu2008-08-125-25/+120
| | | | | | | | Dennis Ferguson. ticket: 6070 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20642 dc483132-0cff-0310-8789-dd5450dbe970
* Make more uses of load/store_32_be/le, which on x86 at least expandsKen Raeburn2008-08-021-8/+4
| | | | | | | to a single unaligned load/store instruction, instead of open-coding the shifts and masks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20599 dc483132-0cff-0310-8789-dd5450dbe970
* Use GET_HALF_BLOCK to fetch new values instead of open-codingKen Raeburn2008-08-022-16/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20598 dc483132-0cff-0310-8789-dd5450dbe970
* After malloc/realloc/calloc failures, return ENOMEM explicitly insteadKen Raeburn2008-04-301-2/+2
| | | | | | | of reading it from errno. This may make static analysis tools less confused about when we return zero vs nonzero values. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20312 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2007-08-161-57/+66
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19832 dc483132-0cff-0310-8789-dd5450dbe970
* Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) orKen Raeburn2006-10-131-5/+5
| | | | | | | | | | | | | | | | | | $(RUN_SETUP). Replaces old hack with MAYBE_VALGRIND added to RUN_ENV in a way that would break in some of the tests. Set VALGRIND in site.exp in tests/dejagnu. (Not used yet.) Runs some shell scripts under valgrind, rather than changing them to run only the executables under valgrind; this is mostly okay, just creates lots of extra log data, and requires --trace-children=yes. This should work for any instrumentation program invocation that gets followed immediately by the name and argument list for the program being instrumented. For example, VALGRIND="env LD_PRELOAD=..." should work, though I haven't tested it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18699 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2006-10-061-25/+27
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18652 dc483132-0cff-0310-8789-dd5450dbe970
* autoconf 2.60 compatibilityKen Raeburn2006-06-281-1/+1
| | | | | | | | | | | Change all file substitutions so that @-patterns start at the beginning of their lines, as now required by autoconf 2.60 (released Monday). ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18249 dc483132-0cff-0310-8789-dd5450dbe970
* Create crypto, des425 Makefiles from top levelKen Raeburn2006-05-251-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18042 dc483132-0cff-0310-8789-dd5450dbe970
* Rename locate.h to locate_plugin.h. Change references, update dependenciesKen Raeburn2006-05-241-11/+11
| | | | | | ticket: 3784 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18037 dc483132-0cff-0310-8789-dd5450dbe970
* install headers into include/krb5Ken Raeburn2006-05-231-57/+66
| | | | | | | | | | | Create include/krb5 directory, and put krb5.h and (k5-)locate.h there in the build tree. Stub krb5.h in main include directory just includes krb5/krb5.h. Update dependencies, and add dependencies in a couple Makefiles that didn't have them. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18030 dc483132-0cff-0310-8789-dd5450dbe970
* Don't include kdb.h from k5-int.h; instead, include it in the handfulKen Raeburn2006-04-131-36/+27
| | | | | | of places where it's actually needed. Update dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17898 dc483132-0cff-0310-8789-dd5450dbe970
* Remove ChangeLog files from the source tree. From now on, theSam Hartman2006-04-111-769/+0
| | | | | | | subversion commit log entry needs to include information that would have been in the changelog. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17893 dc483132-0cff-0310-8789-dd5450dbe970
* Remove .Sanitize and .rconf files, no longer usedKen Raeburn2006-04-112-103/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17888 dc483132-0cff-0310-8789-dd5450dbe970
* don't use configure-defined macros on command line, use autoconf.h onlyKen Raeburn2006-04-022-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17830 dc483132-0cff-0310-8789-dd5450dbe970
* make depend, now with dependency sortingKen Raeburn2006-03-311-82/+88
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17811 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2006-03-271-33/+37
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17786 dc483132-0cff-0310-8789-dd5450dbe970
* Instead of arbitrary division of headers into include and include/krb5, withKen Raeburn2006-03-111-33/+33
| | | | | | | | | | | | include directives sometimes using krb5/foo.h and sometimes using foo.h, and -I options always given for both directories in both source and build trees, push include/krb5/* up a level and drop the krb5 directory (except, for the moment, the change log). Updated #include directives, -I options, and dependencies accordingly, and deleted one or two bits of old, unused code that was noticed in the process. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17730 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2006-03-081-11/+22
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17708 dc483132-0cff-0310-8789-dd5450dbe970
* Include the support library when linking various test programs, because onKen Raeburn2006-01-182-2/+6
| | | | | | | | | Solaris, with the vendor compiler, we'll always get references to krb5int_pthread_loaded due to unused inline functions not being eliminated. (Also inclued it in dependencies, and use CC_LINK when it wasn't used before.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17592 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2005-11-291-37/+26
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17505 dc483132-0cff-0310-8789-dd5450dbe970
* Delete .cvsignore files; contents have already been Sam Hartman2005-08-241-3/+0
| | | | | | set on svn:ignore properties. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17353 dc483132-0cff-0310-8789-dd5450dbe970
* Update dependenciesKen Raeburn2005-06-211-26/+37
| | | | | | | | | N.B.: The version of gcc used this time ("gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)") seems to emit some duplicate dependencies -- some header files get listed twice. This is annoying but shouldn't cause any harm.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17256 dc483132-0cff-0310-8789-dd5450dbe970
* * destest.c (main): Force testing of unaligned access to input, output, and keyKen Raeburn2005-06-102-3/+17
| | | | | | blocks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17237 dc483132-0cff-0310-8789-dd5450dbe970
* * f_tables.h: Include k5-platform.h.Ken Raeburn2005-06-092-11/+9
| | | | | | | (GET_HALF_BLOCK): Use load_32_be. (PUT_HALF_BLOCK): Use store_32_be. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17231 dc483132-0cff-0310-8789-dd5450dbe970
* Allow compile-time specification that small code space is desiredKen Raeburn2005-04-135-15/+61
| | | | | | | | | | | | | | | | | | | | | * d3_cbc.c (krb5int_des3_cbc_encrypt, krb5int_des3_cbc_decrypt): Don't declare left and right variables as registers. * f_cksum.c (mit_des_cbc_cksum): Likewise. * f_cbc.c (krb5int_des_cbc_encrypt, krb5int_des_cbc_decrypt): Likewise. (krb5int_des_cbc_encrypt): For full blocks, use GET_HALF_BLOCK to read and then xor, instead of processing each byte individually. (krb5int_des_do_encrypt_2, krb5int_des_do_decrypt_2) [CONFIG_SMALL]: New functions, wrapping large macros with the DES inner loops. * f_tables.h (DES_DO_ENCRYPT_1, DES_DO_DECRYPT_1): Renamed from non-_1 names. (krb5int_des_do_encrypt_2, krb5int_des_do_decrypt_2): Declare if CONFIG_SMALL is defined. (DES_DO_ENCRYPT, DES_DO_DECRYPT): Expand to _1 macros or _2 function calls depending on whether CONFIG_SMALL is defined. With CONFIG_SMALL defined, on x86/gcc/glibc, this drops about 5K (25%) of the code/table space. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17183 dc483132-0cff-0310-8789-dd5450dbe970
* run "make depend"Ken Raeburn2004-12-301-71/+77
| | | | | | | | In most library directories, this just affects where the line breaks are. In most other directories, it's just dropping a trailing blank line. One or two files really do have updated dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16987 dc483132-0cff-0310-8789-dd5450dbe970
* Link test programs against thread support libraryKen Raeburn2004-05-132-4/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16332 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2004-04-241-44/+48
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16270 dc483132-0cff-0310-8789-dd5450dbe970
* * string2key.c: Replaced with a new implementation.Ken Raeburn2004-04-032-199/+205
| | | | | | (Smaller and faster, at least on gcc for x86.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16227 dc483132-0cff-0310-8789-dd5450dbe970
* protoizeKen Raeburn2004-02-1911-53/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16102 dc483132-0cff-0310-8789-dd5450dbe970
* * f_tables.h (DES_DO_ENCRYPT, DES_DO_DECRYPT): Allocate temporary variableKen Raeburn2004-02-175-24/+30
| | | | | | | | | | | locally instead of taking the extra argument. * d3_cbc.c (krb5int_des3_cbc_encrypt): Don't pass the extra argument, and delete the automatic variable. (krb5int_des3_cbc_decrypt): Likewise. * f_cbc.c (krb5int_des_cbc_encrypt, krb5int_des_cbc_decrypt): Likewise. * f_cksum.c (mit_des_cbc_cksum): Likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16095 dc483132-0cff-0310-8789-dd5450dbe970
* * afsstring2key.c (krb5_afs_encrypt): Drop EDFLAG as an argument, make it localKen Raeburn2004-02-172-4/+23
| | | | | | | | instead, since we always pass 0. (afs_crypt): Call changed. (krb5_afs_crypt_setkey, krb5_afs_encrypt): Use memcpy. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16094 dc483132-0cff-0310-8789-dd5450dbe970
* Replace the array of 8 mit_des_cblock object 'mit_des_zeroblock' definedKen Raeburn2003-12-203-0/+12
| | | | | | | locally in multiple files with one defined in f_cbc.c; make it a single element rather than an array. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15945 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2003-12-151-37/+44
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15928 dc483132-0cff-0310-8789-dd5450dbe970