Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BouncyCastle updated pgp key now getting checksum mismatch error

I have a utility that is using the BouncyCastle.Crypto dll (version 1.7.4, runtime version 1.1.4), in order to decrypt a file that is given to it by another system.

I just updated the pgp key (and provided the encryptor with the new public key). The new key uses 4096 bit RSA encryption and has a 24 character password, which are the only differences I can think of between the new key and the old key. The old key used I believe 2048 bit encryption with a 7 character password.

When I attempt to decrypt a file the process is now failing when calling the PgpSecretKey.ExtractPrivateKey(char[] passPhrase) function, provided by BouncyCastle. The error is "Checksum mismatch at 0 of 20." The weird part is that the first time I tested it worked fine, then with no changes it began failing. I have tried with multiple encrypted files.

Since it's such an old version of BouncyCastle and this particular permutation of the ExtractPrivateKey function is no longer in use I am finding it difficult to locate relevant information. Any thoughts are appreciated.

like image 213
user1161505 Avatar asked Dec 03 '15 01:12

user1161505


People also ask

What is checksum mismatch?

A Checksum Mismatch error could happen if an operation that sends or retrieves information from the repository to the working copy is interrupted. This means that there is a problem with the synchronization between a local item and its corresponding remote item.


1 Answers

I got that error once "Checksum mismatch at 0 of 20." . My issue was due to a wrong pass phrase. Hope this should help someone.

like image 122
user5178129 Avatar answered Sep 17 '22 13:09

user5178129