Coder Social home page Coder Social logo

Comments (4)

azure-hu avatar azure-hu commented on August 15, 2024 1

Sorry for the late response. Built the BC-Sharp code from the latest commit.
Now the cipher was created, but when the code reaches this part:
CmsTypedStream recData = recipient.GetContentStream(privateKey);
an exception occured.

2024-03-12 10:54:26.8281 | ERROR | Program | Org.BouncyCastle.Cms.CmsException: originator key invalid. ---> Org.BouncyCastle.Crypto.InvalidCipherTextException: checksum failed
   at Org.BouncyCastle.Crypto.Engines.Rfc3394WrapEngine.Unwrap(Byte[] input, Int32 inOff, Int32 inLen)
   at Org.BouncyCastle.Cms.KeyAgreeRecipientInformation.UnwrapSessionKey(DerObjectIdentifier wrapAlgOid, KeyParameter agreedKey)
   at Org.BouncyCastle.Cms.KeyAgreeRecipientInformation.GetSessionKey(AsymmetricKeyParameter receiverPrivateKey)

I still cannot figure out why it fails, because the code finds the corresponding private key from the supplied keystore.

from bc-csharp.

peterdettman avatar peterdettman commented on August 15, 2024

I see that this OID and other similar ones are not mapped (bc-csharp usually lags bc-java on what features are supported). However I think we already have the underlying implementation so it may be a reasonably simple fix.

from bc-csharp.

peterdettman avatar peterdettman commented on August 15, 2024

I've added dhSinglePass-stdDH-sha256kdf-scheme (along with other similar ones) to the registries. If you are able to build from the latest source code, you could check whether that fixes things for you, or else let me know what else is blocking this for you.

from bc-csharp.

heldpeet92 avatar heldpeet92 commented on August 15, 2024

Any update on this thread? I am facing the same problem, I updated to the latest version of BouncyCastle and getting the same error as in the latest comment. Is there any solution to this?

from bc-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.