Patch 4.1B / INTRODUCTIONCrypto++ is a free c++ library available with source file. The version 4.1 support few compilers but c++ builder is not supported unlike the version 3.2 which is supported with few issues. The goal of this patch is to make this library compatible with c++ builder at least at the same level Installation for c++ builder 5Be sure to use at least c++ builder 5 update #1. See the last section about the status of version 6 If you have not the update you can download it from Borland Download crypto++ 4.1 and copy files to the project folder Download my patch (or second source) and copy files to the same folder The project file cryptotst.bpr can be used do compile the validation program cryptotst. if you have any problem you can visits my site on www.chez.com/psylon (french site, sorry) or e-mail me User manualInterface changeSorry but some modifications change the syntax for few templates
CompatibilityThis patch has been tested with c++ builder 5 update 1. without update 1 you will have a compiler error on zdeflate.cpp module Some algorithms don't pass validation test : // pass=ElGamalValidate() && pass; The same were not working in version 3.2 Some others don't pass general bench : CRC32, BlumGoldwasser
Warning about cfb usageCFB decryption must be associated with encryption object, eg : cfb = new CFBDecryption(*rijndaelEncrypt,iv);
Description of patch :Description of patchs applied to crypto4.1 for c++ builder 5p1 : 1/ limitation on template parameterCan't pass a parameter from derived template to base template, so in files changed : hmac.h,xormac.h,mdc.h hmac.h :template <class T> class HMAC : public MessageAuthenticationCode, public VariableKeyLength<16, 0, T::BLOCKSIZE> xormac.h :template <class T> class XMACC : public IteratedHash<typename T::HashWordType, T::HIGHFIRST, T::BLOCKSIZE>, public MessageAuthenticationCode mdc.h :template <class T> class MDC : public FixedBlockSize<T::DIGESTSIZE>, public FixedKeyLength<T::BLOCKSIZE> 2/ Borland bug on algebra compilationBorland deny to create MultiplicativeGroupT member inside AbstractRing. it declare it abstract extract MultiplicativeGroupT from AbstractRing similary to version 3 but 3/ runtime bug on pubkey moduleborland seem losts in virtual propagation table from trap in pubkey re-integrate in rsaFunction class (file rsa.h) the two functions : 4/ Borland bug on PK_WithPrecomputationIn dsa.h, elgamal.h, ecrypto.h replacement macro has been defined and used : #ifndef PK_WithPrecomputationB I replaced reference from PK_WithPrecomputation to PK_WithPrecomputationB Borland seems not like this emty class wich refer two other one causing crash in my own program test on DSA even if the validation test was working. This allow to pass validation test on ECXXX but not elgamal sorry. 5/ Theses validation fail in version 4.1// pass=ElGamalValidate() && pass; 6/ Specific filescryptotst.bpr & cryptotst.bpf : borland projects files cryptotst.cpp : main test file c++ builder 6The patch doesn't work today for c++ builder 6, I'm locked on some compilation error. Sorry Here is the current state of my work: C++ builder seems to have problème to find the std::swap function. You can correct it in change "std::swap" to ::swap and adding in begining of the file: #include <algorith.h>
Compilation problem on
patch 5.0Travaux en cours de test sous c++ builder 5
crypto 5.1Thanks to WBR, Dmitry, i try again with
Changes:
|
|