[asterisk-commits] tilghman: branch tilghman/tomcrypt r82910 - in /team/tilghman/tomcrypt: inclu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 18 16:15:23 CDT 2007


Author: tilghman
Date: Tue Sep 18 16:15:23 2007
New Revision: 82910

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82910
Log:
Adding targets to compile

Modified:
    team/tilghman/tomcrypt/include/asterisk/crypto.h
    team/tilghman/tomcrypt/main/   (props changed)
    team/tilghman/tomcrypt/main/Makefile

Modified: team/tilghman/tomcrypt/include/asterisk/crypto.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/tomcrypt/include/asterisk/crypto.h?view=diff&rev=82910&r1=82909&r2=82910
==============================================================================
--- team/tilghman/tomcrypt/include/asterisk/crypto.h (original)
+++ team/tilghman/tomcrypt/include/asterisk/crypto.h Tue Sep 18 16:15:23 2007
@@ -29,8 +29,36 @@
 
 #define AST_KEY_PUBLIC	(1 << 0)
 #define AST_KEY_PRIVATE	(1 << 1)
+typedef unsigned long long ulong64;
+typedef unsigned long ulong32;
 
 struct ast_key;
+
+struct sha512_state {
+    ulong64  length, state[8];
+    unsigned long curlen;
+    unsigned char buf[128];
+};
+
+struct sha1_state {
+    ulong64 length;
+    ulong32 state[5], curlen;
+    unsigned char buf[64];
+};
+
+struct md5_state {
+    ulong64 length;
+    ulong32 state[4], curlen;
+    unsigned char buf[64];
+};
+
+typedef union Hash_state {
+    char dummy[1];
+    struct sha512_state sha512;
+    struct sha1_state   sha1;
+    struct md5_state    md5;
+    void *data;
+} ltc_hash_state;
 
 /*! 
  * \brief Retrieve a key
@@ -119,6 +147,22 @@
  *
  */
 int (*ast_decrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
+
+/*! \brief MD5 cryptographic hash routines */
+int ltc_md5_init(ltc_hash_state * md);
+int ltc_md5_process(ltc_hash_state * md, const unsigned char *in, unsigned long inlen);
+int ltc_md5_done(ltc_hash_state * md, unsigned char *hash);
+
+/*! \brief SHA1 cryptographic hash routines */
+int ltc_sha1_init(ltc_hash_state * md);
+int ltc_sha1_process(ltc_hash_state * md, const unsigned char *in, unsigned long inlen);
+int ltc_sha1_done(ltc_hash_state * md, unsigned char *hash);
+
+/*! \brief SHA512 cryptographic hash routines (not used yet) */
+int ltc_sha512_init(ltc_hash_state * md);
+int ltc_sha512_process(ltc_hash_state * md, const unsigned char *in, unsigned long inlen);
+int ltc_sha512_done(ltc_hash_state * md, unsigned char *hash);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Propchange: team/tilghman/tomcrypt/main/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Tue Sep 18 16:15:23 2007
@@ -1,0 +1,1 @@
+tomcrypt https://origsvn.digium.com/svn/libtomcrypt/trunk

Modified: team/tilghman/tomcrypt/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/tilghman/tomcrypt/main/Makefile?view=diff&rev=82910&r1=82909&r2=82910
==============================================================================
--- team/tilghman/tomcrypt/main/Makefile (original)
+++ team/tilghman/tomcrypt/main/Makefile Tue Sep 18 16:15:23 2007
@@ -33,6 +33,88 @@
 # otherwise modules will not have them available if none of the static
 # objects use it.
 OBJS+=stdtime/localtime.o
+OBJS+=tomcrypt/src/ciphers/aes/aes.o \
+      tomcrypt/src/ciphers/aes/aes_tab.o \
+      tomcrypt/src/misc/crypt/crypt_argchk.o \
+      tomcrypt/src/misc/crypt/crypt.o \
+      tomcrypt/src/misc/crypt/crypt_cipher_descriptor.o \
+      tomcrypt/src/misc/crypt/crypt_cipher_is_valid.o \
+      tomcrypt/src/misc/crypt/crypt_find_cipher_any.o \
+      tomcrypt/src/misc/crypt/crypt_find_cipher.o \
+      tomcrypt/src/misc/crypt/crypt_find_cipher_id.o \
+      tomcrypt/src/misc/crypt/crypt_find_hash_any.o \
+      tomcrypt/src/misc/crypt/crypt_find_hash.o \
+      tomcrypt/src/misc/crypt/crypt_find_hash_id.o \
+      tomcrypt/src/misc/crypt/crypt_find_hash_oid.o \
+      tomcrypt/src/misc/crypt/crypt_hash_descriptor.o \
+      tomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.o \
+      tomcrypt/src/misc/crypt/crypt_register_cipher.o \
+      tomcrypt/src/misc/crypt/crypt_register_hash.o \
+      tomcrypt/src/misc/crypt/crypt_unregister_cipher.o \
+      tomcrypt/src/misc/crypt/crypt_unregister_hash.o \
+      tomcrypt/src/misc/crypt/crypt_prng_is_valid.o \
+      tomcrypt/src/misc/crypt/crypt_prng_descriptor.o \
+      tomcrypt/src/misc/crypt/crypt_hash_is_valid.o \
+      tomcrypt/src/misc/zeromem.o \
+      tomcrypt/src/hashes/helper/hash_memory.o \
+      tomcrypt/src/pk/asn1/der/bit/der_length_bit_string.o \
+      tomcrypt/src/pk/asn1/der/bit/der_decode_bit_string.o \
+      tomcrypt/src/pk/asn1/der/bit/der_encode_bit_string.o \
+      tomcrypt/src/pk/asn1/der/boolean/der_length_boolean.o \
+      tomcrypt/src/pk/asn1/der/boolean/der_encode_boolean.o \
+      tomcrypt/src/pk/asn1/der/boolean/der_decode_boolean.o \
+      tomcrypt/src/pk/asn1/der/choice/der_decode_choice.o \
+      tomcrypt/src/pk/asn1/der/ia5/der_length_ia5_string.o \
+      tomcrypt/src/pk/asn1/der/ia5/der_encode_ia5_string.o \
+      tomcrypt/src/pk/asn1/der/ia5/der_decode_ia5_string.o \
+      tomcrypt/src/pk/asn1/der/integer/der_length_integer.o \
+      tomcrypt/src/pk/asn1/der/integer/der_encode_integer.o \
+      tomcrypt/src/pk/asn1/der/integer/der_decode_integer.o \
+      tomcrypt/src/pk/asn1/der/object_identifier/der_length_object_identifier.o \
+      tomcrypt/src/pk/asn1/der/object_identifier/der_encode_object_identifier.o \
+      tomcrypt/src/pk/asn1/der/object_identifier/der_decode_object_identifier.o \
+      tomcrypt/src/pk/asn1/der/octet/der_length_octet_string.o \
+      tomcrypt/src/pk/asn1/der/octet/der_encode_octet_string.o \
+      tomcrypt/src/pk/asn1/der/octet/der_decode_octet_string.o \
+      tomcrypt/src/pk/asn1/der/printable_string/der_length_printable_string.o \
+      tomcrypt/src/pk/asn1/der/printable_string/der_encode_printable_string.o \
+      tomcrypt/src/pk/asn1/der/printable_string/der_decode_printable_string.o \
+      tomcrypt/src/pk/asn1/der/sequence/der_length_sequence.o \
+      tomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_multi.o \
+      tomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.o \
+      tomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_ex.o \
+      tomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_ex.o \
+      tomcrypt/src/pk/asn1/der/set/der_encode_set.o \
+      tomcrypt/src/pk/asn1/der/set/der_encode_setof.o \
+      tomcrypt/src/pk/asn1/der/short_integer/der_length_short_integer.o \
+      tomcrypt/src/pk/asn1/der/short_integer/der_encode_short_integer.o \
+      tomcrypt/src/pk/asn1/der/short_integer/der_decode_short_integer.o \
+      tomcrypt/src/pk/asn1/der/utctime/der_length_utctime.o \
+      tomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.o \
+      tomcrypt/src/pk/asn1/der/utctime/der_decode_utctime.o \
+      tomcrypt/src/pk/asn1/der/utf8/der_length_utf8_string.o \
+      tomcrypt/src/pk/asn1/der/utf8/der_encode_utf8_string.o \
+      tomcrypt/src/pk/asn1/der/utf8/der_decode_utf8_string.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_mgf1.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.o \
+      tomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.o \
+      tomcrypt/src/pk/rsa/rsa_encrypt_key.o \
+      tomcrypt/src/pk/rsa/rsa_export.o \
+      tomcrypt/src/pk/rsa/rsa_exptmod.o \
+      tomcrypt/src/pk/rsa/rsa_free.o \
+      tomcrypt/src/pk/rsa/rsa_import.o \
+      tomcrypt/src/pk/rsa/rsa_make_key.o \
+      tomcrypt/src/pk/rsa/rsa_sign_hash.o \
+      tomcrypt/src/pk/rsa/rsa_verify_hash.o \
+      tomcrypt/src/pk/rsa/rsa_decrypt_key.o \
+      tomcrypt/src/math/rand_prime.o \
+      tomcrypt/src/math/multi.o
+
+ASTCFLAGS+=-Itomcrypt/src/headers
 
 # At the moment say.o is an optional component which can be overridden
 # by a module.




More information about the asterisk-commits mailing list