Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Decryption of CDOC 1.0 container encrypted by JDigiDoc 3.12.0-785 results with broken datafile content #7

Open
sgaktors opened this issue Jan 16, 2020 · 6 comments

Comments

@sgaktors
Copy link

Decryption of CDOC 1.0 container encrypted by JDigiDoc 3.12.0-785 results with broken datafile content. E.g decryption works without errors, however the org.openeid.cdoc4j.DataFile content differs from the expected.
The decryption of the same cdoc container using JDigiDoc 3.x library works fine.

CDOC Library used for decryption: org.open-eid.cdoc4j 1.3.

Container and algorithm details:

...
</denc:CipherValue></denc:CipherData>denc:EncryptionProperties<denc:EncryptionProperty Name="LibraryVersion">JDigiDoc|3.12.0-785</denc:EncryptionProperty><denc:EncryptionProperty Name="DocumentFormat">ENCDOC-XML|1.0</denc:EncryptionProperty><denc:EncryptionProperty Name="Filename">XX-response.xml</denc:EncryptionProperty><denc:EncryptionProperty Name="OriginalMimeType">text/xml</denc:EncryptionProperty><denc:EncryptionProperty Name="OriginalSize">8843</denc:EncryptionProperty></denc:EncryptionProperties></denc:EncryptedData>

@purikas
Copy link

purikas commented Jan 30, 2020

Can confirm this issue - I've had also problems with decrypting cdoc containers created with jdigidoc 3.x

@andresrosenthal
Copy link
Contributor

andresrosenthal commented Feb 19, 2020

I was unable to reproduce the given issue.
Could you give more input about the setup?

Ideally it would be really nice to receive a mini (for example: maven) project that demonstrates the given issue just by running it.
If that's too much to ask for then could you produce it with PKCS#12 and give following inputs to help in reproducing the issue:

  • JDigiDoc code used for encryption
  • Original datafile
  • Encrypted cdoc
  • Soft certificate & private key

You could use this for soft certificate & priv key: https://github.com/open-eid/cdoc4j/blob/master/src/test/resources/rsa/rsa.p12

@purikas
Copy link

purikas commented Feb 20, 2020

I was unable to reproduce the given issue.
Could you give more input about the setup?

Discovered issue when trying to interface with 3rd party REST API which uses PKCS#12 encryption.

* JDigiDoc code used for encryption

Can't share the code as it's property of 3rd party.

@purikas
Copy link

purikas commented Feb 20, 2020

Unfortunately also can't use any other keys apart from the keys supplied by 3rd party.

@andresrosenthal
Copy link
Contributor

JDigiDoc is a dead project, actually for quite some time now.
If you're not able to supply any relevant information that'll help us potentially find the issue,
then I'm afraid this is a dead end

@sgaktors
Copy link
Author

sgaktors commented Apr 6, 2020

Sorry for delay. Same case, unfortunately can't share the 3rd part code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants