BouncyCastle c# Port
Software produced by this site is covered by the following license and was made possible with the help of the following contributors.
Beta Release, 20th March 2006 This release is being done via anonymous CVS as there is still on going work vetting the API against FxCop and making it more .NET friendly. In addition to code clean ups the CVS release also features a port of the Bouncy Castle OpenPGP APIs and will soon also include the Elliptic Curve cryptography over F2m. This release does include changes to the previous API as FxCop styles have been followed where appropriate and the use of C# properties have been introduced.
Instructions for anonymous CVS access:
CVSROOT=:pserver:anonymous@cvs.bouncycastle.org:/home/users/bouncy/cvsroot
And then
cvs co csharp
Using your favorite CVS client.
To see which namespaces in the API are now marked as stable look at the status page.
If you are after a zip file, a zip snapshot can be found as at the 4th June 2006 here.
Beta Release, 1st Feb 2005 bccrypto-csharp-b02.zip
This port features tools for X.509 Certificate generation, Certificate request generation, generation and reading of PKCS12 files, password based encryption, a full port of the ASN.1 library, including the OCSP, CMS classes and the full X.509 set. In addition the code has been cleaned up to remove classes that were deprecated in the Java version and the new BigInteger class and SHA224 have been added as well. There are also some tool classes for extracting/constructing public and private keys from their ASN.1 equivalents.
Updates in beta 02: Robustness improvement for ASN1InputStrean. SignerUtil was creating the wrong objects for SHA-256withRSA, SHA-384withRSA, and SHA-512withRSA - this has been fixed.
Documentation for this release bccrypto-csharp-b02-doc-html.zip (html) bccrypto-csharp-b02-doc-chm.zip (compiled html help)- Browse On-line.
CVS Access
Just want to look at the source? The source code repository is accessible
via ViewCVS from here.
Current feature list:
- Generation and parsing of PKCS12 files.
- Version 1 and Version 3 X.509 certificate generation.
- PBE algorithms supported by PBEUtil: PBEwithMD2andDES-CBC, PBEwithMD2andRC2-CBC, PBEwithMD5andDES-CBC, PBEwithMD5andRC2-CBC, PBEwithSHA1andDES-CBC, PBEwithSHA1andRC2-CBC, PBEwithSHA-1and128bitRC4, PBEwithSHA-1and40bitRC4, PBEwithSHA-1and3-keyDESEDE-CBC, PBEwithSHA-1and2-keyDESEDE-CBC, PBEwithSHA-1and128bitRC2-CBC, PBEwithSHA-1and40bitRC2-CBC, PBEwithHmacSHA-1, PBEwithHmacSHA-224, PBEwithHmacSHA-256, PBEwithHmacRIPEMD128, PBEwithHmacRIPEMD160, and PBEwithHmacRIPEMD256.
- Signature algorithms supported by SignerUtil: MD2withRSA, MD4withRSA, MD5withRSA, RIPEMD128withRSA, RIPEMD160withRSA, RIPEMD256withRSA, SHA-1withRSA, SHA-224withRSA, SHA-256withRSAandMGF1, SHA-384withRSAandMGF1, SHA-512withRSAandMGF1, SHA-1withDSA, and SHA-1withECDSA.
- Symmetric key algorithms: AES, CAST5, CAST6 DESede, DES, IDEA, RC2, RC4, RC5-32, RC5-64, RC6, Rijndael, Serpent, Skipjack, Blowfish, and Twofish.
- Symmetric key modes: CBC, CFB, CTS, OFB, and SIC (or CTR).
- Symmetric key paddings: ISO10126d2, PKCS-5/7, TBC, X.923, and Zero Byte.
- Asymmetric key algorithms: RSA, ElGamal, DSA, ECDSA.
- Asymmetric key paddings/encodings: ISO9796d1, OAEP, and PKCS1.
- Digests: MD2, MD4, MD5, RIPEMD128, RIPEMD160, RIPEMD256, RIPEMD320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, and Tiger.
- Signer mechanisms: DSA, ECDSA, ISO9796d2, PSS, RSA with Digest.
- Key Agreement: Diffie-Hellman and EC-DH.
- Macs: CBCBlockCipher, CFBBlockCipher, HMac.
- PBE generators: PKCS-12, and PKCS 5 - schemes 1 and 2.
Porting notes from the old ASN.1 library For the most part code using the old subset of ASN.1 classes should be easy to transfer, providing the following changes are made:
- DERObject becomes ASN1Object
- DEREncodable becomes ASN1Encodable
- getDERObject() becomes toASN1Object()
- BERConstructedOctetString becomes BEROctetString
- If you were using the older mutable DERConstructedSequence/Set and BERConstructedSequence, use an ASN1EncodableVector in conjunction with DERSequence/Set and BERSequence
- BERInputStream and DERInputStream are replaced with ASN1InputStream
- AsymmetricKeyParameter is now in the org.bouncycastle.crypto namespace
More to come!
The original C# port: lcrypto-csharp-119.zip
MD5 checksum 3d95c79f6d5c6809a44d0032f64d33e0
Patch, 22 Nov 2004: BigInteger.cs Fix to prevent BigInteger prime generation from going into an infinite loop.
Keep in touch!
For those who are interested, there are two mailing lists for participation in this project. To subscribe use the links below. (To unsubscribe, replace subscribe with unsubscribe in the message body)
announce-crypto-csharp-request@bouncycastle.org with subscribe in the message body. This mailing list is for new release announcements only, general subscribers cannot post to it.
dev-crypto-csharp-request@bouncycastle.org with subscribe in the message body. This mailing list is for discussion of development of the package. This includes bugs, comments, requests for enhancements, questions about use or operation.
NOTE:You need to be subscribed to send mail to the above mailing list.
A searchable archive of the dev mailing list is accessible off the mailing lists page.
If you want to provide feedback, offers of jobs (or more importantly beer) directly to the members of The Legion then please use feedback-crypto@bouncycastle.org
Since this is something of a FAQ, if you are in the US and you are interested in contributing to these efforts, make sure you read this first.

