Bug 23255 - Please support Chiasmus key files and encrypted files
Summary: Please support Chiasmus key files and encrypted files
Status: RESOLVED MOVED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-11 09:39 UTC by Helge Kreutzmann
Modified: 2018-10-13 10:40 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
A sample file encrypted with Chiasmus (21.06 KB, application/octet-stream)
2009-08-11 09:39 UTC, Helge Kreutzmann
Details
proposed patch (1004 bytes, patch)
2010-01-29 11:29 UTC, Daniel Leidert
Details | Splinter Review
A sample chiasmus key (152 bytes, application/octet-stream)
2010-12-02 09:41 UTC, Helge Kreutzmann
Details
Updated patch to the proposed one by Daniel Leidert (977 bytes, text/plain)
2013-11-15 20:24 UTC, Helge Kreutzmann
Details
Updated patch to the one from Daniel (2nd try) (977 bytes, patch)
2013-11-15 20:48 UTC, Helge Kreutzmann
Details | Splinter Review

Description Helge Kreutzmann 2009-08-11 09:39:21 UTC
Created attachment 28519 [details]
A sample file encrypted with Chiasmus

Chiasmus is a encryption standard developed by the German Federal
Office for Information Security ("Bundesamt für Sicherheit in der
Informationstechnik").

The encrypted files usually have an extension of .xia and start with
the three letters "XIA1". I attached a sample file for your reference. 
Currently the bubble pop up in konqueror says "Unkown".

The chiasmus keys are usually stored in a file with an extension of
.xis and have the following header:
XIS
*** Aendern Sie diese Datei nicht direkt!! ***
(i.e. two lines with those characters, the key itself starts in the
next line) and are currently by konqueror recogonized as "diff files".

I confirmed these information with the developer of Chiasmus.

For more information either see
http://www.bsi.de/produkte/chiasmus/indexeng.htm
with the english version or
http://www.bsi.de/produkte/chiasmus/index.htm
which also shows the Linux version but is only in German.

A (German) wikipedia article is also available under
http://de.wikipedia.org/wiki/Chiasmus_(Software)

I initially filed this to the Debian konqueror package whose maintainer asked me to carry it upstream where David Faure requested it to be filed here.
Comment 1 Daniel Leidert 2010-01-29 11:29:02 UTC
Created attachment 32905 [details] [review]
proposed patch

The attached patch adds the MIME types application/x-chiasmus-encrypted and application/x-chiasmus-key based on the information in the report.
Comment 2 Bastien Nocera 2010-12-01 09:03:34 UTC
Missing a test file, and an entry in the test suite.
Comment 3 Helge Kreutzmann 2010-12-01 10:43:34 UTC
I already added a sample file to the report, what kind of "test file" is required?
Comment 4 Bastien Nocera 2010-12-01 11:01:13 UTC
(In reply to comment #3)
> I already added a sample file to the report, what kind of "test file" is
> required?

You need both an xsi and an xia file in the test suite, and you need to add them to tests/list. See the HACKING file for details.
Comment 5 Helge Kreutzmann 2010-12-02 09:41:23 UTC
Created attachment 40746 [details]
A sample chiasmus key

A sample key as requested (containing one comment)
Comment 6 Helge Kreutzmann 2010-12-02 09:44:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I already added a sample file to the report, what kind of "test file" is
> > required?
> 
> You need both an xsi and an xia file in the test suite, and you need to add
> them to tests/list. See the HACKING file for details.

I now uploaded an sample key (.xis). Unfortunately I don't know what kind of test suite of HACKING you are refering to.

As stated in my original bug report, I was asked by David Faure from KDE to file the bug here, I have (not yet) done more that that and it would be great if you could apply the necessary changes (I can provide you additional information as needed, of course).
Comment 7 Bastien Nocera 2013-02-13 11:09:42 UTC
The HACKING file is here:
http://cgit.freedesktop.org/xdg/shared-mime-info/tree/HACKING#n31

And it has explanations on how to add files to the test suite.
Comment 8 Helge Kreutzmann 2013-11-15 20:24:32 UTC
Created attachment 89288 [details]
Updated patch to the proposed one by Daniel Leidert
Comment 9 Helge Kreutzmann 2013-11-15 20:38:13 UTC
Hello Bastien,
I tried to understand the format of the file you specified. Given my limited understanding (I mainly want konqueror to detect these files, cf. the initial description) I believe the following two lines should suffice:

Examplekey.xis application/x-chiasmus-key ooo
VTestdatei.pdf.xia application/x-chiasmus-encrypted ooo

I applied Daniels patch from Comment1, ran autogen.sh and make freedesktop.org.xml

The make command gave errors and I updated the patch (which I attached to this report).

However, even then test-mime-data does not really produce sensible results (to me).

Now I ran make in the top level directory of shared-mime-info.

Using the settings for test/lists given above I get as output:
Examplekey.xis, 'name' test: expected application/x-chiasmus-key, got application/octet-stream
Examplekey.xis, 'data' test: expected application/x-chiasmus-key, got text/plain
Examplekey.xis, 'file' test: expected application/x-chiasmus-key, got text/plain

Is that ok?

I would be glad if you could query me about the missing information (especially those which you cannot find in the bug log) and update the relevant files yourself. I'm really guessing now whats to be done / updated.

Thanks!
Comment 10 Helge Kreutzmann 2013-11-15 20:48:35 UTC
Created attachment 89289 [details] [review]
Updated patch to the one from Daniel (2nd try)
Comment 11 Helge Kreutzmann 2013-11-15 20:52:26 UTC
I noticed another typo in the patch from Daniel. Please consider the latest one (from 20:48 UTC).

Now make in the top directory of shared-mime-info no longer complains, i.e. I think it looks fine. (But please verify)

It would be great if you could integrate the patch, the test files and the updated tests/list in your repository.

Thanks!
Comment 12 GitLab Migration User 2018-10-13 10:40:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/shared-mime-info/issues/72.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.