Permalink
Browse files

Initial revision

  • Loading branch information...
fluffy committed Sep 21, 2005
0 parents commit 235513aa13d973d931202dfcca8b47a4a750a5e4
Showing with 36,993 additions and 0 deletions.
  1. +223 −0 CHANGES
  2. +35 −0 LICENSE
  3. +210 −0 Makefile.in
  4. +171 −0 README
  5. +66 −0 TODO
  6. +1 −0 VERSION
  7. +1,183 −0 config.guess
  8. +1,268 −0 config.sub
  9. +104 −0 config_in.h
  10. +5,776 −0 configure
  11. +115 −0 configure.in
  12. +119 −0 crypto/Makefile
  13. +1 −0 crypto/VERSION
  14. +558 −0 crypto/ae_xfm/xfm.c
  15. +2,168 −0 crypto/cipher/aes.c
  16. +444 −0 crypto/cipher/aes_cbc.c
  17. +484 −0 crypto/cipher/aes_icm.c
  18. +403 −0 crypto/cipher/cipher.c
  19. +152 −0 crypto/cipher/null_cipher.c
  20. +173 −0 crypto/hash/auth.c
  21. +271 −0 crypto/hash/hmac.c
  22. +160 −0 crypto/hash/null_auth.c
  23. +406 −0 crypto/hash/sha1.c
  24. +92 −0 crypto/include/aes.h
  25. +50 −0 crypto/include/aes_cbc.h
  26. +42 −0 crypto/include/aes_icm.h
  27. +61 −0 crypto/include/alloc.h
  28. +159 −0 crypto/include/auth.h
  29. +219 −0 crypto/include/cipher.h
  30. +121 −0 crypto/include/config.h
  31. +17 −0 crypto/include/crypto.h
  32. +288 −0 crypto/include/crypto_kernel.h
  33. +206 −0 crypto/include/crypto_types.h
  34. +133 −0 crypto/include/cryptoalg.h
  35. +378 −0 crypto/include/datatypes.h
  36. +193 −0 crypto/include/err.h
  37. +73 −0 crypto/include/gf2_8.h
  38. +77 −0 crypto/include/hmac.h
  39. +146 −0 crypto/include/integers.h
  40. +82 −0 crypto/include/key.h
  41. +435 −0 crypto/include/math.h
  42. +68 −0 crypto/include/null_auth.h
  43. +80 −0 crypto/include/null_cipher.h
  44. +58 −0 crypto/include/prng.h
  45. +91 −0 crypto/include/rand_source.h
  46. +146 −0 crypto/include/rdbx.h
  47. +109 −0 crypto/include/sha1.h
  48. +66 −0 crypto/include/stat.h
  49. +139 −0 crypto/include/xfm.h
  50. +92 −0 crypto/kernel/alloc.c
  51. +497 −0 crypto/kernel/crypto_kernel.c
  52. +104 −0 crypto/kernel/err.c
  53. +115 −0 crypto/kernel/key.c
  54. +630 −0 crypto/math/datatypes.c
  55. +94 −0 crypto/math/gf2_8.c
  56. +961 −0 crypto/math/math.c
  57. +351 −0 crypto/math/stat.c
  58. +137 −0 crypto/replay/rdb.c
  59. +289 −0 crypto/replay/rdbx.c
  60. +105 −0 crypto/replay/ut_sim.c
  61. +108 −0 crypto/rng/ctr_prng.c
  62. +180 −0 crypto/rng/prng.c
  63. +89 −0 crypto/rng/rand_source.c
  64. +111 −0 crypto/test/aes_calc.c
  65. +200 −0 crypto/test/auth_driver.c
  66. +489 −0 crypto/test/cipher_driver.c
  67. +237 −0 crypto/test/datatypes_driver.c
  68. +126 −0 crypto/test/kernel_driver.c
  69. +140 −0 crypto/test/rand_gen.c
  70. +98 −0 crypto/test/sha1_driver.c
  71. +101 −0 crypto/test/stat_driver.c
  72. +1,042 −0 doc/Doxyfile
  73. +32 −0 doc/Makefile
  74. +76 −0 doc/crypto_kernel.txt
  75. +1 −0 doc/draft-irtf-cfrg-icm-00.txt
  76. +108 −0 doc/header.tex
  77. +376 −0 doc/intro.txt
  78. BIN doc/libsrtp.pdf
  79. +21 −0 doc/references.txt
  80. +3,139 −0 doc/rfc3711.txt
  81. +184 −0 include/err.h
  82. +94 −0 include/rdb.h
  83. +146 −0 include/rdbx.h
  84. +119 −0 include/rtp.h
  85. +857 −0 include/srtp.h
  86. +293 −0 include/srtp_ust.h
  87. +66 −0 include/stat.h
  88. +81 −0 include/ut_sim.h
  89. +251 −0 install-sh
  90. +1,705 −0 srtp/srtp.c
  91. +442 −0 srtp/srtp_ust.c
  92. +346 −0 tables/aes_tables.c
  93. +111 −0 test/aes_calc.c
  94. +201 −0 test/auth_driver.c
  95. +484 −0 test/cipher_driver.c
  96. +237 −0 test/datatypes_driver.c
  97. +126 −0 test/kernel_driver.c
  98. +310 −0 test/lfsr.c
  99. +140 −0 test/rand_gen.c
  100. +306 −0 test/rdbx_driver.c
  101. +181 −0 test/replay_driver.c
  102. +165 −0 test/roc_driver.c
  103. +152 −0 test/rtp.c
  104. BIN test/rtpw
  105. +445 −0 test/rtpw.c
  106. +98 −0 test/sha1_driver.c
  107. +1,257 −0 test/srtp_driver.c
  108. +101 −0 test/stat_driver.c
  109. +1 −0 timing
  110. +10 −0 undos.sh
  111. +15 −0 update.sh
223 CHANGES
@@ -0,0 +1,223 @@
+Changelog
+
+1.3.20
+
+ Lots of changes. Thanks to Jeff Chan for catching a memory leak and
+ helping track down the endian issues with the SSRCs.
+
+1.3.8
+
+ This is an interim release. Several little-endian bugs were identified
+ and fixed; this means that we can use intel/linux for development again.
+
+ Cleaned up sha1 and hmac code significantly, got rid of some excess
+ functions and properly documented the fuctions in the .h files.
+
+ Eliminated some vestigial files.
+
+ There is a SIGBUS error in the AES encrypt function on sparc
+ (observed on both solaris and openbsd) with gcc 2.95. Was unable to
+ find bad pointer anywhere, so I'm wondering if it isn't a compiler
+ problem (there's a known problem whose profile it fits). It doesn't
+ appear on any other platform, even in the cipher_driver stress
+ tests.
+
+ Planned changes
+
+ Change interface to nonces (xtd_seq_num_t) so that it uses
+ network byte ordering, and is consistent with other arguments.
+
+
+1.3.6
+
+ Changed /dev/random (in configure.in and crypto/rng/rand_source.c) to
+ /dev/urandom; the latter is non-blocking on all known platforms (which
+ corrects some programs that seem to hang) and is actually present on
+ Open BSD (unlike /dev/random, which only works in the presence of
+ hardware supported random number generation).
+
+ Added machine/types.h case in include/integers.h.
+
+1.3.5
+
+ Removing srtp_t::template and stream_clone().
+
+ Adding a new policy structure, which will reflect a complete SRTP
+ policy (including SRTCP).
+
+ This version is *incomplete* and will undergo more changes. It is
+ provided only as a basis for discussion.
+
+1.3.4
+
+ Removed tmmh.c and tmmh.h, which implemented version one of TMMH.
+
+ Changed srtp_get_trailer_length() to act on streams rather than
+ sessions, and documented the macro SRTP_MAX_TRAILER_LEN, which should
+ usually be used rather than that function.
+
+ Removed 'salt' from cipher input.
+
+ Changed rdbx to use err.h error codes.
+
+ Changed malloc() and free() to xalloc() and xfree; these functions
+ are defined in crypto/kernel/alloc.c and declared in
+ include/alloc.h.
+
+ Added 'output' functions to cipher, in addition to 'encrypt'
+ functions. It is no longer necessary to zeroize a buffer before
+ encrypting in order to get keystream.
+
+ Changed octet_string_hex_string() so that "times two" isn't needed
+ in its input.
+
+ Added crypto_kernel_init() prior to command-line parsing, so that
+ kernel can be passed command-line arguments, such as "-d
+ debug_module". This was done to for the applications
+ test/srtp-driver, test/kernel-driver, and test/ust-driver.
+
+ Improved srtp_init_aes_128_prf - wrote key derivation function
+ (srtp_kdf_t).
+
+ Add the tag_len as an argument to the auth_compute() function, but
+ not the corresponding macro. This change allows the tag length for
+ a given auth func to be set to different values at initialization
+ time. Previously, the structure auth_t contained the
+ output_length, but that value was inaccessible from hmac_compute()
+ and other functions.
+
+ Re-named files from a-b.c to a_b.c. in order to help portability.
+
+ Re-named rijndael to aes (or aes_128 as appropriate).
+
+
+1.2.1
+
+ Changes so that 1.2.0 compiles on cygwin-win2k.
+
+ Added better error reporting system. If syslog is present on the
+ OS, then it is used.
+
+
+1.2.0 Many improvements and additions, and a fex fixes
+
+ Fixed endian issues in RTP header construction in the function
+ rtp_sendto() in srtp/rtp.c.
+
+ Implemented RIJNDAEL decryption operation, adding the functions
+ rijndael_decrypt() and rijndael_expand_decryption_key(). Also
+ re-named rijndael_expand_key() to rijndael_expand_encryption_key()
+ for consistency.
+
+ Implemented random number source using /dev/random, in the files
+ crypto/rng/rand_source.c and include/rand_source.h.
+
+ Added index check to SEAL cipher (only values less than 2^32 are
+ allowed)
+
+ Added test case for null_auth authentication function.
+
+ Added a timing test which tests the effect of CPU cache thrash on
+ cipher throughput. The test is done by the function
+ cipher_test_throughput_array(); the function
+ cipher_array_alloc_init() creates an array of ciphers for use in
+ this test. This test can be accessed by using the -a flag to
+ the application cipher-driver in the test subdirectory.
+
+ Added argument processing to ust-driver.c, and added that app to
+ the 'runtest' target in Makefile.in.
+
+ A minor auth_t API change: last argument of auth_init() eliminated.
+
+
+1.0.6 A small but important fix
+
+ Fixed srtp_init_aes_128_prf() by adding octet_string_set_to_zero()
+ after buffer allocation.
+
+ Eliminated references to no-longer-existing variables in debugging
+ code in srtp/srtp.c. This fixes the compilation failure that
+ occured when using PRINT_DEBUG in that file.
+
+ Corrected spelling of Richard Priestley's name in credits. Sorry
+ Richard!
+
+
+1.0.5 Many little fixes
+
+ Fixed octet_string_set_to_zero(), which was writing one
+ more zero octet than it should. This bug caused srtp_protect()
+ and srtp_unprotect() to overwrite the byte that followed the
+ srtp packet.
+
+ Changed sizeof(uint32_t) to srtp_get_trailer_length() in
+ srtp-driver.c. This is just defensive coding.
+
+ Added NULL check to malloc in srtp_alloc().
+
+
+1.0.4 Many minor fixes and two big ones (thanks for the bug reports!)
+
+ Removed 'ssrc' from the srtp_init_aes_128_prf() function argument
+ list. This is so that applications which do not a priori know the
+ ssrc which they will be receiving can still use libsrtp. Now the
+ SSRC value is gleaned from the rtp header and exored into the
+ counter mode offset in the srtp_protect() and srtp_unprotect()
+ functions, if that cipher is used. This change cascaed through
+ many other functions, including srtp_init_from_hex(),
+ srtp_sender_init() and srtp_receiver_init() in rtp.c, and also
+ changing the CLI to test/rtpw. In the future, another function
+ call will be added to the library that enables multiple ssrc/key
+ pairs to be installed into the same srtp session, so that libsrtp
+ works with multiple srtp senders. For now, this functionality is
+ lacking.
+
+ Removed the GDOI interface to the rtpw demo program. This will be
+ added again at a later date, after the SRTP and GDOI distributions
+ stabilize. For now, I've left in the GDOI #defines and autoconf
+ definitions so that they'll be in place when needed.
+
+ Updated tmmhv2_compute() so that it didn't assume any particular
+ alginment of the output tag.
+
+ Changed bit field variables in srtp.h to unsigned char from
+ unsigned int in order to avoid a potential endianness issue.
+
+ Fixed rdbx_estimate_index() to handle all input cases. This solves
+ the now notorious "abaft" bug in the rtpw demo app on linux/intel,
+ in which spurious replay protection failures happen after that word
+ is received.
+
+ Added ntohs(hdr->seq) to srtp_protect and srtp_unprotect, removed
+ from rijndael_icm_set_segment().
+
+ Added error checking and handling to srtp_sender_init() and
+ srtp_receiver_init().
+
+ Changed srtp_alloc() so that it does what you'd expect: allocate an
+ srtp_ctx_t structure. This hides the library internals.
+
+
+1.0.1 Many minor fixes
+
+ Added cipher_driver_buffer_test(...) to test/cipher-driver.c. This
+ function checks that the byte-buffering functions used by a cipher
+ are correct.
+
+ Fixed SunOS/Solaris build problems: added HAVE_SYS_INT_TYPES_H and
+ changed index_t to xtd_seq_num_t (see include/rdbx.h).
+
+ Fixed SEAL3.0 output byte buffering, added byte-buffering test to
+ cipher/cipher-driver.c.
+
+ Fixed roc-driver so that the non-sequential insertion test
+ automatically recovers from bad estimates. This was required to
+ prevent spurious failures.
+
+ Made rdbx_estimate_index(...) function smarter, so that initial RTP
+ sequence numbers greater than 32,768 don't cause it to estimate the
+ rollover counter of 0xffffffff.
+
+
+1.0.0 Initial release
+
35 LICENSE
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (c) 2001-2003 Cisco Systems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the Cisco Systems, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
Oops, something went wrong.

0 comments on commit 235513a

Please sign in to comment.