K-9: S/MIME support

Created on 7 Jan 2016  路  8Comments  路  Source: k9mail/k-9

There is an existing discussion on an old tracker ... https://code.google.com/p/k9mail/issues/detail?id=2538

A lot of work seems to be done on PGP support in the https://github.com/k9mail/k-9/milestones/PGP/MIME milestone.
Hope this issue helps to track S/MIME support. I would like to easily verify both PGP and S/MIME signatures.

A few related issues:

  • #916
  • #571
enhancement

Most helpful comment

Hello everyone! I'm curious, what's the current status of the S/MIME integration?
Are there still plans to ship this feature, do you need help with something specific, or is it just not going to happen?

All 8 comments

There was a mobile application development project at our university and one project tried to implement this: https://github.com/FAU-Inf2/SMile

For me this looks like a big chaos but maybe you can use some parts... ;)

We can take some lessons from it, but:

  • The project layout is not how we'll want it. They have a separate git repository for the SMIME app which is referenced by SMile as a project dependency. What we want is to do similarly to the OpenPGP system and to create a SMIME library inside the same GitHub repository which dispatches and receives Intents from an SMIME app. Otherwise it gets quite difficult to build the app.
  • They've changed a lot of files which are not related to SMIME. For example they've added the ability to logout from an IMAP account by the look of it, added some form of reminder functionality, added lots of text changes and so on. This makes it substantially more complex to merge in just the SMIME changes. Even cherry-picking commits will be a pain because the commits aren't obvious what they do.

Similarly to the first OpenPGP implementation, we can probably learn lessons but direct code re-use is going to be problematic.

I've begun a branch in my local repository which assumes it will receive similar intents to that which OpenKeychain provides: https://github.com/philipwhiuk/k-9/commits/smime I will keep re-basing this on-top of master maintaining parity with any new relevant features that the PGP/MIME development adds.

I need to write a SMIME certificates storage app now to implement the other side so I can test decrypting a SMIME message (and test composition). It's possible I can fork https://github.com/FAU-Inf2/SMileCE for that. Otherwise it will take a while...

Right now the OpenKeychain project kind of owns the crypto provider interface and drives the development. Which is fine, because nobody else showed interest in integrating with K-9 Mail.

But really I want to have a crypto provider interface that is generic enough to be able to support both PGP/MIME and S/MIME. That is also part of the reason why I suggested using the openintents namespace back when this all started. My hope was this interface will be implemented by more than one app, and one day supports more than one crypto system.
The use of "openpgp" all over the place is a bit unfortunate. But I suspect the API needs some tweaking to be able to support S/MIME anyway. So transitioning to a more generic name shouldn't be a huge problem either.

/cc @Valodim @dschuermann

I can recommend the library https://en.wikipedia.org/wiki/Bouncy_Castle_(cryptography) for this. At work we use this API for Java and S/Mime and it was simple to integrate. It also supports PGP, but I never tried the PGP part.

While you implement this a temporary word-around is X509Tools

Hello everyone! I'm curious, what's the current status of the S/MIME integration?
Are there still plans to ship this feature, do you need help with something specific, or is it just not going to happen?

In 3 years you grow a long 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipwhiuk picture philipwhiuk  路  3Comments

ByteHamster picture ByteHamster  路  3Comments

frederiiiic picture frederiiiic  路  3Comments

Immortalin picture Immortalin  路  3Comments

j-ed picture j-ed  路  3Comments