Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

S/MIME libraries for .net?

I need to create S/MIME messages using C# (as specified in RFC 2633, "S/MIME Version 3 message specification", and RFC 3335). The only S/MIME library I can find is a commercial library (http://www.example-code.com/csharp/smime.asp), which is no good for us.

Are there any existing libraries to accomplish creating S/MIME messages, and in particular, .p7s files?

I have all the encrypted and signed elements that need to go into this file, but I'd like to create the .p7s file without handrolling my own library with the aid of the RFC document...


EDIT: I've found another commercial S/MIME library, which is still no good for our requirements. It's looking more and more like I'm going to have to hand roll a S/MIME library, which is sad. Is everyone in .net who needs S/MIME using commercial, closed source libraries to do it?

like image 271
Gabriel Avatar asked Sep 24 '08 14:09

Gabriel


People also ask

What are the 4 key S MIME services?

Definition(s): The basic security services offered by S/MIME are authentication, non-repudiation of origin, message integrity, and message privacy.

What is S MIME in networking?

S/MIME is an acronym for Secure/Multipurpose Internet Mail Extensions. It references a type of public encryption and signing of MIME data (a.k.a. email messages) to verify a sender's identity. With S/MIME, it is possible to send and receive encrypted emails.

How do I enable S MIME encryption?

To turn s/mime on: Go to the specific account, and tap on the account. Under the security option, there will be an option to switch s/mime on/off.

What is S MIME plugin in cyber security?

What is S/MIME? Secure/Multipurpose Internet Mail Extension (S/MIME) is an email encryption and signing industry standard widely used by corporations to enhance email security. S/MIME is compatible with most enterprise email clients.


2 Answers

I've written my own MIME library with support for S/MIME called MimeKit which is far more robust than anything based on System.Net.Mail which is horrendously broken.

It supports raw 8bit headers, rfc822 group addresses, scraping names out of rfc822 comments in address headers (To/Ccc/Bcc/etc), parsing mbox formatted message spools (including support for the Content-Length-based SunOS format) and it's an order of magnitude faster than any other C# MIME parser out there because it is byte-stream based instead of TextReader-based (which is also how it supports raw 8bit headers much better than any other C# parser).

like image 98
jstedfast Avatar answered Oct 15 '22 01:10

jstedfast


Have a look at Rebex Secure Mail. This is a very stable library I use for many years now. It's 100% managed code and the source code is also available.

like image 39
Stefan Schultze Avatar answered Oct 15 '22 01:10

Stefan Schultze