The following code produces a "CryptoMaterial: this object does not support saving" exception when executing the DEREncode method:
AutoSeededRandomPool rng; PK_Encryptor* pub; PK_Decryptor* priv; FileSink* pubsink, *privsink;
int keylen = 512;
pubsink = new FileSink("C:\\LUCES-Public.key");
privsink = new FileSink ("C:\\LUCES-Private.key");priv = new LUCES<OAEP<SHA> >::Decryptor(rng, keylen); static_cast<LUCES<OAEP<SHA> >::Decryptor*>(priv)->DEREncode(*privsink); privsink->MessageEnd();
pub = new LUCES<OAEP<SHA> >::Encryptor(*(static_cast<LUCES<OAEP<SHA> >::Decryptor*>(priv)));
static_cast<LUCES<OAEP<SHA> >::Decryptor*>(pub)->DEREncode(*pubsink);
pubsink->MessageEnd();
delete pubsink, privsink, priv, pub;
RabinES also fails with a similar exception while RSAES, DLIES, ECIES, LUC_IES and ElGamal work fine. I've tried without downcasting but I still get the same error.
Thanks for any comments/suggestions
- Ed Addario
_________________________________________________________________
Find things fast with the new MSN Toolbar � includes FREE pop-up blocking! http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/
