[cryptopp-users] FileSink Constructor take std::ostream as argument... Puzzling File Output

2018-06-26 Thread Martin
[Scene] GCM + AES [Code 01] encrypt: write IV to write encryped stuff to decrypt: using and -- ok [Code 02] encrypt: open std::ofstream for write IV to write encryped stuff to ... (FileSource(, true, new AuthenticatedEncryptionFilter(e, new FileSink()));) decrypt: using -- error

[cryptopp-users] Re: FileSink Constructor take std::ostream as argument... Puzzling File Output

2018-06-26 Thread Martin
is not "IV + encrypted". I doubt FileSink Constructor "FileSink (std::ostream )" will modify std::ostream rather than continuing writing stream. 在 2018年6月26日星期二 UTC+8下午3:40:14,Jeffrey Walton写道: > > > > On Tuesday, June 26, 2018 at 2:13:25 AM UTC-4, Martin wrote:

vector source

2007-12-05 Thread Martin Drasar
. stringSource are accepted as well :-) Thanks Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Crypto++ Users Google Group. To unsubscribe, send an email to [EMAIL PROTECTED] More information about Crypto++ and this group

Re: Multiple messages with AES-GCM and nonce resynchronize

2015-09-29 Thread Martin Raiber
Thanks! I did some further research and the general idea seems to be good. They are even moving from the explicit nonce in TLS v1.1 and v1.2 to (again) a fully implicit nonce in TLS v1.3 (https://tools.ietf.org/html/draft-ietf-tls-tls13-07 ). The implementation I had in the original message,

Multiple messages with AES-GCM and nonce resynchronize

2015-09-28 Thread Martin Raiber
hod which does not change the iv, like: class CtrNonceGCMEncryption : public CryptoPP::GCM:: Encryption { public: void Resynchronize() { m_state = State_IVSet; } }; and using this method instead (as well as in Decryption)? This would save on random nonce generation and transmission. Regar

[cryptopp-users] Debug build LNK2005 errors

2018-08-03 Thread Martin Dušek
Hi, I built Crypto++ 7 using msvc2013, release dll. I linked it to my msvc2013 Qt app. If my app is built in release mode it runs. When I build it in debug configuration, linker outputs several LNK2005 errors: cryptopp.lib(cryptopp.dll):-1: error: LNK2005: "public: static char const * __cdecl

[cryptopp-users] Debug build LNK2005 errors

2018-08-03 Thread Martin Dušek
Hi, I built Crypto++ 7 using msvc2013, release dll. I linked it to my msvc2013 Qt app. If my app is built in release mode it runs. When I build it in debug configuration, linker outputs several LNK2005 errors: cryptopp.lib(cryptopp.dll):-1: error: LNK2005: "public: __thiscall

[cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
To be honest, at the moment, I have no clue how to supply my file data contents and signature (which is separated from my file, it exists in std:string variable) to cryptopp verifying pipeline. Any advise welcome. -- You received this message because you are subscribed to "Crypto++ Users".

[cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
Thanks. I'm going to study it. However, if someone know sample code how to verifyy lare file signature, please post it here. -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and

[cryptopp-users] Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
I would like to verify a signature I previously created for a file using CryptoPP::ECDSA::Signer . The file is quite big (several GB) and I don't want to load it to memory in one piece as my device can run out of RAM. Is there a way crypto++ can verify large file's signature without loading

[cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
The exception is thrown on line 1408 of pubkey.h: virtual size_t SLen(const DL_GroupParameters ) const > > {return params.GetSubgroupOrder().ByteCount();} > > -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and

[cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
I wrote this code (at the moment my intention is to be able to supply signature and file contents from different sources which is my case, after it works I will optimize it to pump file contents in small pieces): CryptoPP::ByteQueue queue; > > queue.Put((const CryptoPP::byte

[cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
OK, I isolated minimal example whih causes R6025 pure virtual fucntion call exception. This code is OK: CryptoPP::FileSource ss1( file.absoluteFilePath().toLocal8Bit().constData(), true, > > > new CryptoPP::SignerFilter( prng, > > > CryptoPP::ECDSA::Signer( key ), > > >

Re: [cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
For me, it seems that Cryptopp has some problems reading signature length when pumpall = false. Do you think it is a bug or compiler issue? This code (it copies contents of file to signature variable) works: CryptoPP::StringSink signatureSink( signature ); CryptoPP::FileSource

Re: [cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
This is the call stack when the exeption is thrown: 1 memcmp MSVCR120D0xfa614fa 2 purecall

Re: [cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
On Wednesday, October 24, 2018 at 8:02:38 PM UTC+2, Jeffrey Walton wrote: > > > Missing signerFilter in this one. > > Jeff > I know...it was just a demonstration what works and what doesn't. So this code doesn't work, it prouces pure function call exception on pumpall: CryptoPP::StringSink

Re: [cryptopp-users] Re: Crypto++ verify large file signature

2018-10-24 Thread Martin Dušek
On Wednesday, October 24, 2018 at 8:02:38 PM UTC+2, Jeffrey Walton wrote: > > > Missing signerFilter in this one. > > Jeff > I don't understand it, this code works: CryptoPP::FileSource f( file.absoluteFilePath().toLocal8Bit().constData(), true, new

Re: [cryptopp-users] Re: Crypto++ verify large file signature

2018-10-27 Thread Martin Dušek
I finally have working code: CryptoPP::ECDSA::PublicKey key; key.Load( queue); CryptoPP::ECDSA::Verifier verifier(key); CryptoPP::SignatureVerificationFilter verificationFilter(verifier, NULL, CryptoPP::SignatureVerificationFilter::SIGNATURE_AT_BEGIN); CryptoPP::FileSource fileSource(