Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Basic 256 with SunJCE provider not interoperable (Mantis 2933) #7

Closed
dk2129 opened this issue Jan 18, 2016 · 2 comments
Closed

Basic 256 with SunJCE provider not interoperable (Mantis 2933) #7

dk2129 opened this issue Jan 18, 2016 · 2 comments
Milestone

Comments

@dk2129
Copy link

dk2129 commented Jan 18, 2016

http://bouncy-castle.1462172.n4.nabble.com/Problems-with-OAEP-SHA-256-hash-crypto-td1466852.html [^]

Using basic 256 (rsa oaep), encrypting data with SunJCE provider and decrypting the encrypted data with
Bouncy Castle lightweight crypto API (non-jce provider) produces the following exception:

org.opcfoundation.ua.common.ServiceResultException: Bad_InternalError (code=0x80020000, description="2147614720, data hash wrong")
at org.opcfoundation.ua.transport.security.BcCryptoProvider.decryptAsymm(BcCryptoProvider.java:184)
at org.opcfoundation.ua.transport.security.BcCryptoProvider.decryptAsymm(BcCryptoProvider.java:154)
at org.opcfoundation.ua.unittests.TestCrypto.encryptDecryptAsymm(TestCrypto.java:73)
at org.opcfoundation.ua.unittests.TestCrypto.testEncryptDecryptRsaOaep(TestCrypto.java:43)
...
Caused by: org.bouncycastle.crypto.InvalidCipherTextException: data hash wrong
at org.bouncycastle.crypto.encodings.OAEPEncoding.decodeBlock(Unknown Source)
at org.bouncycastle.crypto.encodings.OAEPEncoding.processBlock(Unknown Source)
at org.opcfoundation.ua.transport.security.BcCryptoProvider.decryptAsymm(BcCryptoProvider.java:177)
... 22 more

@jouniaro jouniaro added this to the 1.03.341 milestone Sep 29, 2016
@jouniaro
Copy link
Contributor

Should check if there is something to do about this or is it just an "unsupported feature" of the Sun JCE implementation.

@jouniaro jouniaro modified the milestones: 1.03.341, 1.03.342 Dec 8, 2016
@bjakke bjakke modified the milestones: 1.03.342, 1.03.343 Nov 20, 2017
@bjakke bjakke modified the milestones: 1.3.343, 1.3.344 Mar 22, 2018
@bjakke bjakke removed this from the 1.3.344 milestone Jun 18, 2018
@bjakke bjakke added this to the 1.04 milestone Nov 8, 2018
@bjakke
Copy link
Contributor

bjakke commented Nov 8, 2018

Closing the issue as per #164 it has been deprecated and moved away from the main stack part (did never work properly in all cases and additionally cannot be used anyway in modern java versions).

@bjakke bjakke closed this as completed Nov 8, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants