what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

linux-egcs111.txt

linux-egcs111.txt
Posted Dec 21, 1999

linux-egcs111.txt

tags | encryption
systems | linux
SHA-256 | 7ccdc3221cfb35bf6827e691a914adc652f09752a91008850e02366ee456f86d

linux-egcs111.txt

Change Mirror Download
Please see http://www.eskimo.com/~weidai/egcs.txt and then apply this
patch if you get template errors while compiling Crypto++ 3.0.

---
diff -x *.out --new-file -upr -x Makefile -x *.o ../import/crypto-3.0/config.h crypto-3.0/config.h
--- ../import/crypto-3.0/config.h Fri Dec 18 19:17:54 1998
+++ crypto-3.0/config.h Thu Jan 14 08:32:33 1999
@@ -8,7 +8,12 @@
// define this if your compiler doesn't support namespaces

#ifdef __GNUC__
-#define NO_NAMESPACE
+//#define NO_NAMESPACE
+#endif
+
+// define this if your compiler needs the external template.
+#ifdef __GNUC__
+#define EXTERN_TEMPLATE extern
#endif

// switch between different secure memory allocation mechnisms, this is the only
@@ -75,15 +80,23 @@ typedef unsigned int word;
typedef unsigned long dword;
#endif

+/* We need it to do conversion. */
+union dword_union
+{
+ dword_union (const dword &d) { dw = d; }
+ dword dw;
+ word w [2];
+};
+
const unsigned int WORD_SIZE = sizeof(word);
const unsigned int WORD_BITS = WORD_SIZE * 8;

#define LOW_WORD(x) (word)(x)

#ifdef IS_LITTLE_ENDIAN
-#define HIGH_WORD(x) (*(((word *)&(x))+1))
+#define HIGH_WORD(x) (((dword_union) (x)).w [1])
#else
-#define HIGH_WORD(x) (*((word *)&(x)))
+#define HIGH_WORD(x) (((dword_union) (x)).w [0])
#endif

// if the above HIGH_WORD macro doesn't work (if you are not sure, compile it
diff -x *.out --new-file -upr -x Makefile -x *.o ../import/crypto-3.0/luc.cpp crypto-3.0/luc.cpp
--- ../import/crypto-3.0/luc.cpp Tue Dec 29 23:53:38 1998
+++ crypto-3.0/luc.cpp Thu Jan 14 08:30:12 1999
@@ -11,7 +11,7 @@

NAMESPACE_BEGIN(CryptoPP)

-template class OAEP<SHA>;
+EXTERN_TEMPLATE template class OAEP<SHA>;
INSTANTIATE_PUBKEY_TEMPLATES_MACRO(OAEP<SHA>, PKCS_SignaturePaddingScheme, LUCFunction, InvertableLUCFunction);

LUCFunction::LUCFunction(BufferedTransformation &bt)
diff -x *.out --new-file -upr -x Makefile -x *.o ../import/crypto-3.0/oaepsha.cpp crypto-3.0/oaepsha.cpp
--- ../import/crypto-3.0/oaepsha.cpp Wed Dec 31 16:00:00 1969
+++ crypto-3.0/oaepsha.cpp Thu Jan 14 08:31:09 1999
@@ -0,0 +1,17 @@
+// oaepsha.cpp - written and placed in the public domain by Wei Dai
+
+#include "config.h"
+
+#ifdef EXTERN_TEMPLATE
+#include "pch.h"
+#include "asn.h"
+#include "nbtheory.h"
+#include "sha.h"
+
+#include "pubkey.cpp"
+#include "oaep.cpp"
+
+NAMESPACE_BEGIN(CryptoPP)
+template class OAEP<SHA>;
+NAMESPACE_END
+#endif
diff -x *.out --new-file -upr -x Makefile -x *.o ../import/crypto-3.0/rabin.cpp crypto-3.0/rabin.cpp
--- ../import/crypto-3.0/rabin.cpp Fri Dec 18 19:18:10 1998
+++ crypto-3.0/rabin.cpp Thu Jan 14 08:30:07 1999
@@ -11,7 +11,7 @@

NAMESPACE_BEGIN(CryptoPP)

-template class OAEP<SHA>;
+EXTERN_TEMPLATE template class OAEP<SHA>;
template class DecryptorTemplate<OAEP<SHA>, InvertableRabinFunction>;
template class EncryptorTemplate<OAEP<SHA>, RabinFunction>;

diff -x *.out --new-file -upr -x Makefile -x *.o ../import/crypto-3.0/rsa.cpp crypto-3.0/rsa.cpp
--- ../import/crypto-3.0/rsa.cpp Fri Dec 18 19:18:12 1998
+++ crypto-3.0/rsa.cpp Thu Jan 14 08:30:01 1999
@@ -12,7 +12,7 @@
NAMESPACE_BEGIN(CryptoPP)

INSTANTIATE_PUBKEY_TEMPLATES_MACRO(PKCS_EncryptionPaddingScheme, PKCS_SignaturePaddingScheme, RSAFunction, InvertableRSAFunction);
-template class OAEP<SHA>;
+EXTERN_TEMPLATE template class OAEP<SHA>;
template class DecryptorTemplate<OAEP<SHA>, InvertableRSAFunction>;
template class EncryptorTemplate<OAEP<SHA>, RSAFunction>;

diff -x *.out --new-file -upr -x Makefile -x *.o ../import/crypto-3.0/xormac.h crypto-3.0/xormac.h
--- ../import/crypto-3.0/xormac.h Sat Dec 12 14:23:50 1998
+++ crypto-3.0/xormac.h Wed Jan 13 09:40:19 1999
@@ -37,7 +37,7 @@ private:
};

template <class T> XMACC<T>::XMACC(const byte *userKey, word32 counter)
- : IteratedHash<T::HashWordType>(DATASIZE, T::DIGESTSIZE)
+ : IteratedHash<typename T::HashWordType>(DATASIZE, T::DIGESTSIZE)
, key(KEYLENGTH)
, buffer(T::DIGESTSIZE/sizeof(HashWordType))
, counter(counter)

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close