summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/builtin
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branches/nss to trunkGreg Hudson2010-10-022-2/+45
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24416 dc483132-0cff-0310-8789-dd5450dbe970
* Make dependGreg Hudson2010-09-088-80/+100
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24298 dc483132-0cff-0310-8789-dd5450dbe970
* Don't build the built-in Camellia block cipher code if Camellia-CCMGreg Hudson2010-09-082-0/+10
| | | | | | enctypes aren't enabled. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24297 dc483132-0cff-0310-8789-dd5450dbe970
* Merge the camellia-ccm branch to trunk. Since there are no IANAGreg Hudson2010-09-0712-39/+2328
| | | | | | | | | assignments for Camellia-CCM enctypes or cksumtypes yet, they are disabled in a default build. They can be made available by defining (via CPPFLAGS) local-use enctype numbers for the enctypes and cksumtypes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24295 dc483132-0cff-0310-8789-dd5450dbe970
* make dependGreg Hudson2010-06-077-111/+122
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24119 dc483132-0cff-0310-8789-dd5450dbe970
* krb5int_pbkdf2_hmac_sha1 fails to set enctype on keyblockEzra Peisach2010-01-091-0/+1
| | | | | | | | | | | krb5int_pbkdf2_hmac_sha1 fails to set enctype on a termporary keyblock - resulting in valgrind picking up on a conditional branch w/ unset value. Initialize value. ticket: 6630 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23622 dc483132-0cff-0310-8789-dd5450dbe970
* Enable caching of key-derived context info such as key schedules fromKen Raeburn2010-01-031-18/+52
| | | | | | | | | | | | | one encryption operation to another. Use a new function in the enc_provider structure for cleanup. Implement caching of aes_ctx values. Using Greg's performance tests from the derived-key caching work, on a 2.8GHz Xeon, I see 1 million AES-128 encryptions of 16 bytes improved by 5-6%; encryptions of 1024 bytes and checksums are not significantly affected. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23574 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a case where krb5int_aes_decrypt was trying to encrypt a blockGreg Hudson2010-01-031-1/+1
| | | | | | instead of decrypting it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23573 dc483132-0cff-0310-8789-dd5450dbe970
* Remove $(TOBJS) for make cleanEzra Peisach2009-12-311-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23556 dc483132-0cff-0310-8789-dd5450dbe970
* Restructure the crypto checksum implementation to minimizeGreg Hudson2009-12-106-33/+119
| | | | | | | | | | | | | | | | | | | | | dependencies on the internals of modules. * Keyhash providers are gone. * The cksumtypes table contains checksum and verify functions, similar to the etypes encrypt and decrypt functions. New checksum functions parallel the old keyhash providers, and there are also functions for unkeyed and derived-key HMAC checksums. * The flags field is now used to indicate whether a checksum is unkeyed, but not whether it is a derived-key HMAC checksum. * The descbc checksum is handled through a new enc_provider function which calculates a CBC MAC. The OpenSSL module does not implement the CBC MAC function (it didn't implement descbc before). builtin/des could probably get rid of f_cksum.c (the old DES CBC routine) with some alterations to string2key.c. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23462 dc483132-0cff-0310-8789-dd5450dbe970
* Initialize ihash_iov in case fall through to cleanup handler and tryEzra Peisach2009-12-061-1/+1
| | | | | | to free garbarge. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23453 dc483132-0cff-0310-8789-dd5450dbe970
* Make dependGreg Hudson2009-12-061-26/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23451 dc483132-0cff-0310-8789-dd5450dbe970
* Make the libk5crypto hash_provider interface take crypto_iov listsGreg Hudson2009-12-067-161/+113
| | | | | | | instead of lists of krb5_data. Make the base HMAC APIs take crypto_iov lists and drop the _iov variants. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23450 dc483132-0cff-0310-8789-dd5450dbe970
* In the built-in des3 provider, remove the unused version ofGreg Hudson2009-12-061-29/+3
| | | | | | | validate_and_schedule, and drop the _iov suffix from the one we do use. (Cleanup from r23444.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23449 dc483132-0cff-0310-8789-dd5450dbe970
* Consolidate the IOV and non-IOV encryption/decryption code paths, andGreg Hudson2009-12-0417-906/+213
| | | | | | | | | | | | | | | | | | | | | | | | drop the _iov suffix from most encryption- and decryption-related functions. The enc_provider encrypt and decrypt functions take IOVs, as do the enctype entries in etypes.c, and there are no separate encrypt_iov or decrypt_iov functions. aead_provider is gone. Enctype functions now take pointers to the enctype entry instead of pointers to the enc/hash/aead providers; this allows dk_encrypt and dk_decrypt to be polymorphic in the length function they use now that AES and DES3 can't differentiate by aead provider. aes_string_to_key needed to be moved into the krb/ fold for this since it's an enctype function; it was duplicated between builtin/ and openssl/ before. This leaves openssl/aes empty; the build system currently demands that all modules have the same directory structure, so the directory and Makefile will stick around for now. Three separate copies of the derive_random logic are also now consolidated into one. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23444 dc483132-0cff-0310-8789-dd5450dbe970
* Revert r23442. Revert r23436 changes unrelated to comment reformattingTom Yu2009-12-031-12/+139
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23443 dc483132-0cff-0310-8789-dd5450dbe970
* Reformat new block comment per coding styleGreg Hudson2009-12-021-152/+26
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23436 dc483132-0cff-0310-8789-dd5450dbe970
* Perform the AES-CBC XOR operations 4 bytes at a time, using the helperKen Raeburn2009-12-021-2/+18
| | | | | | | | functions for loading and storing potentially-unaligned values. Improves bulk AES encryption performance by 2% or so on 32-bit x86 with gcc 4. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23432 dc483132-0cff-0310-8789-dd5450dbe970
* Speed up the per-block loops of AES, DES3, and DES IOV encryption byGreg Hudson2009-12-023-196/+111
| | | | | | | | | avoiding function calls and copies in the case where the next block is wholly contained within the current buffer. To do this, introduce two new inline functions in aead.h called iov_next_block and iov_store_block. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23430 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up the AES enc_provider code a bit. Chiefly, work with unsignedGreg Hudson2009-12-021-80/+64
| | | | | | | | char blocks, casting input->data and output->data once each upon entry to the non-IOV encrypt and decrypt functions, rather than casting our working buffers each time we need to work with an outside function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23428 dc483132-0cff-0310-8789-dd5450dbe970
* Fix ivec chaining for DES iov encryptionGreg Hudson2009-11-301-2/+5
| | | | | | | | | | | | | krb5int_des_cbc_decrypt_iov was using a plaintext block to update the ivec. Fix it to use the last cipher block, borrowing from the corresponding des3 function. The impact of this bug is not serious since ivec chaining is not typically used with IOV encryption in 1.7. ticket: 6588 tags: pullup target_version: 1.7.1 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23389 dc483132-0cff-0310-8789-dd5450dbe970
* In the des enc_provider decrypt_iov function, count header blocks asGreg Hudson2009-11-301-1/+1
| | | | | | | well as data and padding blocks when checking for correctly padded input. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23387 dc483132-0cff-0310-8789-dd5450dbe970
* Make the crc32 hash provider correctly chain multiple input buffers,Greg Hudson2009-11-301-5/+3
| | | | | | | | so that it returns the same result if you pass it one big buffer or many small buffers containing the same data. To do this, change the contract of mit_crc32 so that the cksum parameter is in-out. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23386 dc483132-0cff-0310-8789-dd5450dbe970
* Add do-while(0) around multi-statement macros in f_tables.h for moreGreg Hudson2009-11-291-44/+48
| | | | | | consistent and elegant emacs auto-formatting. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23379 dc483132-0cff-0310-8789-dd5450dbe970
* Mark and reindent lib/cryptoGreg Hudson2009-11-2842-3883/+3904
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23374 dc483132-0cff-0310-8789-dd5450dbe970
* Move the arcfour directory from the crypto module dirs into krb. ThisGreg Hudson2009-11-2710-899/+15
| | | | | | | | | | | | | directory contains the token encryption code (similar to dk, old, and raw) which is Kerberos-specific. The actual stream cipher lives in enc_provider/rc4.c, which is still in the module dirs. arcfour/arcfour-int.h contained the definitions of some structures used only in enc_provider/rc4.c. Move those definitions into that source file so that everything in arcfour is at the right level of abstraction to live in krb. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23367 dc483132-0cff-0310-8789-dd5450dbe970
* Consolidate Makefile variables now that we have only a single globalGreg Hudson2009-11-2218-267/+250
| | | | | | | | | | | | | configure script: $(SRCTOP) --> $(top_srcdir) $(srcdir)/$(thisconfigdir) --> $(top_srcdir) $(thisconfigdir) --> $(BUILDTOP) $(myfulldir) --> $(mydir) ticket: 6583 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23308 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up a bunch of signed/unsigned comparison warningsGreg Hudson2009-11-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23120 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-3142-434/+426
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Replace krb5_ with krb5Int_ prefix for non-API functionsZhanna Tsitkov2009-10-2813-45/+46
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23079 dc483132-0cff-0310-8789-dd5450dbe970
* Remove "verify" on make cleanEzra Peisach2009-10-281-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23076 dc483132-0cff-0310-8789-dd5450dbe970
* Do not include com_err.h - not used hereEzra Peisach2009-10-271-2/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23060 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2009-10-259-75/+58
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23030 dc483132-0cff-0310-8789-dd5450dbe970
* Resurrect deleted test files. Adjust Makefile.in files to correctlyTom Yu2009-10-244-0/+729
| | | | | | define RUN_SETUP. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23029 dc483132-0cff-0310-8789-dd5450dbe970
* Changed the crypto make system to add build flexibility. The update cancels ↵Zhanna Tsitkov2009-10-2324-201/+917
| | | | | | the requirement for the dir structures to be identical in all crypto implementation and supports impl. dependent tests. Also, minor libk5crypto.exports list reduction ( from f_tables) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22995 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leaks in enc-perf workGreg Hudson2009-10-201-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22949 dc483132-0cff-0310-8789-dd5450dbe970
* Implement new APIs to allow improved crypto performanceGreg Hudson2009-10-1910-165/+228
| | | | | | | | | | | Merge branches/enc-perf to trunk. Adds the krb5_key opaque type, the krb5_k_* APIs to use them, and caching of derived keys when krb5_k_* functions are used. Updates the krb5 auth context and GSS id-rec to use krb5_keys. ticket: 6576 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22944 dc483132-0cff-0310-8789-dd5450dbe970
* Fix the value of ivec in aes_decrypt_iovZhanna Tsitkov2009-10-161-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22905 dc483132-0cff-0310-8789-dd5450dbe970
* Move destest to builtin/des, because it depends on overriding someTom Yu2009-10-1012-119/+577
| | | | | | | | internals. Make depend. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22877 dc483132-0cff-0310-8789-dd5450dbe970
* Get aes-gen to build again (for the default back end, at least)Greg Hudson2009-10-091-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22873 dc483132-0cff-0310-8789-dd5450dbe970
* Fix object file pathZhanna Tsitkov2009-10-061-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22856 dc483132-0cff-0310-8789-dd5450dbe970
* CleanupZhanna Tsitkov2009-10-011-7/+17
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22819 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj: SHS_INFO structure is defined differently for crypto ↵Zhanna Tsitkov2009-09-3010-3/+384
| | | | | | | | | impl's. Files hash_sha1.c and yhash.h are affected by this difference. Move hash_provider into the backend The following bigredbutton is used to suppress svn complains about the trailing spaces in the moved/copied dirs. bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22815 dc483132-0cff-0310-8789-dd5450dbe970
* Fix include path to pick up the correct headersZhanna Tsitkov2009-09-291-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22814 dc483132-0cff-0310-8789-dd5450dbe970
* Remove OBJS.ST from SUBDIROBJLISTS so that running make does notEzra Peisach2009-09-291-1/+1
| | | | | | | | rebuild shared library when running make from the top. (make otherwise thinks that OBJS.ST depends on "all-recurse" - which does not exist, and rebuilds it all the time. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22806 dc483132-0cff-0310-8789-dd5450dbe970
* Re-run make depend without autoconf.h in the source treeGreg Hudson2009-09-168-209/+199
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22775 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj.: Move prf and random-to-key ops from backend to krbZhanna Tsitkov2009-09-1619-378/+237
| | | | | | bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22769 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj: OpemSSL crypto feed for ↵Zhanna Tsitkov2009-09-031-9/+11
| | | | | | | | hmac/md5/md4/sha1/rc4/des/des3(w/o iov) bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22709 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj: Move enc_provider into builtin dir. Adjust builtin ↵Zhanna Tsitkov2009-09-0213-81/+1318
| | | | | | make system to handle new crypto implementations git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22707 dc483132-0cff-0310-8789-dd5450dbe970
* Re-run make depend. (I am not certain why the dependencies fromGreg Hudson2009-08-037-173/+159
| | | | | | r22477 didn't work for me.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22482 dc483132-0cff-0310-8789-dd5450dbe970