You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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).
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
The text was updated successfully, but these errors were encountered: