I forgot to mention that I am running on Mavericks and Xcode 6.0.1 with iOS
8 SDK and all the new trimmings with swift etc.
On Wednesday, 1 October 2014 17:44:38 UTC+1, Pierre Chanquion wrote:
>
>
> I have been using crypto++'s RSA cryptographic methods for a project.
> Encryption, decryption, signing and verifying all worked well until about
> two days ago, when I updated xcode and its libraries. Since then signing
> and verification has completely stopped working returning the error:
> *PK_Signer:
> key too short for this signature scheme*. I am using the recommended 3072
> byte key size and all my methods are essentially copies of the RSA
> examples.
>
> // -----------------------------------------------
>
> // Save Buffered Transformation to File
>
> void Crypto::RSAKey::Save(const string& filename, CryptoPP::
> BufferedTransformation& bt){
>
> FileSink file(filename.c_str());
>
>
>
> bt.CopyTo(file);
>
> file.MessageEnd();
>
> }
>
>
>
> // -----------------------------------------------
>
> // Load Buffered Transformation from file
>
> void Crypto::RSAKey::Load(const string& filename, BufferedTransformation&
> bt){
>
> CryptoPP::FileSource file(filename.c_str(), true);
>
>
>
> file.TransferTo(bt);
>
> bt.MessageEnd();
>
> }
>
>
>
> // -----------------------------------------------
>
> // Save Public Key to File
>
> RC Crypto::RSAKey::SavePublicKey(const string& fp, RSA::PublicKey& key){
>
> try {
>
> CryptoPP::ByteQueue queue;
>
> key.Save(queue);
>
>
>
> Save(fp, queue);
>
> } catch (CryptoPP::Exception e) {
>
> LOG(ERROR) << "Error: Failed to Save Public Key to File("
> << fp << "): " << e.what() << std::endl;
>
> return RC::ERR_CRYPTOPP;
>
> }
>
> return RC::SUCCESS;
>
> }
>
>
>
> // -----------------------------------------------
>
> // Save Private Key to File
>
> RC Crypto::RSAKey::SavePrivateKey(const string& fp, RSA::PrivateKey& key){
>
> try {
>
> CryptoPP::ByteQueue queue;
>
> key.Save(queue);
>
>
>
> Save(fp, queue);
>
> } catch (CryptoPP::Exception e) {
>
> LOG(ERROR) << "Error: Failed to Save Private Key to File("
> << fp << "): " << e.what() << std::endl;
>
> return RC::ERR_CRYPTOPP;
>
> }
>
> return RC::SUCCESS;
>
> }
>
>
>
> // -----------------------------------------------
>
> // Load Public Key from file
>
> RC Crypto::RSAKey::LoadPublicKey(const string& fp, RSA::PublicKey& key,
> bool validate){
>
> AutoSeededRandomPool rnd;
>
> try {
>
> CryptoPP::ByteQueue queue;
>
> Load(fp, queue);
>
>
>
> key.Load(queue);
>
>
>
> if(validate)
>
> key.Validate(rnd, 3);
>
>
>
> } catch (CryptoPP::Exception e) {
>
> LOG(ERROR) << "Error: Failed to Load Public Key from
> File(" << fp <span style="color: #660;" class="style
> ...
--
--
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 is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.