Can anybody point me to an example of verifying a X.509 certificate with Bouncy Castle under Java ME?
I can see how to easily do this in Java SE code with java.security.cert.Certificate.verify(), but I could not find an equivalent method in the lightweight BC API.
Thanks in advance!
Cheers
Dino
You might want to use com.sun.midp.ssl.X509Certificate instead.
Related
Fairly new to the c#/.net ecosystem.
My file needs to be pgp encrypted, I have used didisoft lib. like as below.
using DidiSoft.Pgp;
pgp.EncryptStream(inputBlob,name,
publicKeyFile,
outputBlob,
asciiArmor);
I can upload and download the contents.
BUT
The problem is we cant use didisoft libs but alternative like can be used which are freely available and GnuPG compatible. Eg:-
using Starksoft.Aspen.GnuPG;
using Libgpgme;
Can someone help me with usage of below libraries which will PGP encrypt from the provided public key using GnuPG?
We are using crypto package in our node js app. The thing is we do not want the developer to know about the encryption algorithm we implemented. However, the developer would be knowing the encryption algorithm and the encryption key as they can view the source code of the encryption algorithm.
So my question is: is it possible to compile the encryption algorithm into a file like dll(.NET) or jar file (java) and include it in the project (open source solution). If not, how to prevent developer from viewing the source code?
The final expectation is the developer will know we use crypto package, but do not know we use what algorithm and key we implemented.
Note: I do not expect solution of restricting file access to the user nor hosting it in another environment.
node-ffi is a Node.js addon for loading and calling dynamic libraries using pure JavaScript. It can be used to create bindings to native libraries without writing any C++ code.
https://github.com/node-ffi/node-ffi
I am implementing an encryption algorithm with a product. I would like to understand how bouncy castle handles the defaults like Initialization vector and so on. But I am not able to get any breakpoint working in intellij, I think it has got something to do with JCE provider.
The question pretty much sums it up. Are ECDSA and ECDH available for mono? If they are not, will they be?
No they are not available inside Mono BCL, nor Xamarin.iOS or Xamarin.Android.
There's a bug report for each of them, ECDSA and ECDH, so you might want to add yourself on c.c. to know when this will change. Right now there's no time table to include them.
Microsoft .NET supports both,
http://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdsacng.aspx
http://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdiffiehellmancng.aspx
From both Mono source code and documentation you can see that ECDSA and ECDH are not supported, as the corresponding classes are missing,
https://github.com/mono/mono/tree/master/mcs/class/System.Core/System.Security.Cryptography
http://docs.go-mono.com/?link=N%3aSystem.Security.Cryptography
For Xamarin.iOS and Xamarin.Android which are derived from Mono, you might check if there are any native library to call.
You can try to use "The Legion of the Bouncy Castle". It's fully written in .NET and supports many signature and encryption algorithms. I found it a bit tricky to use, there's not a lof of documentation, but it works.
Try to find a NuGet package or visit their website:
http://www.bouncycastle.org/csharp/
I have a PGPPublicKey object. I want to get a list of all signatures(with UserId, email Id, trust level for each singature) associated with it using Bouncy Castle API. I tried but couldn't get it. If anyone has an example link or knows which method to use to get it, please let me know.
I've never used these classes but I thought it might be helpful to post some resources.
It looks like the Bouncy Castle OpenPGP releases include some examples.
I recommend using these examples to solve your problem. Specifically, it looks like you will need to use PGPSignatureList and PGPSignature classes which are utilized in the examples. However, I don't see emailId in any of the classes.
SignedFileProcessor.java: A simple utility class that signs and verifies files.
DetachedSignatureProcessor.java: A simple utility class that creates seperate signatures for files and verifies them.
Also, http://www.bouncycastle.org/documentation.html suggests the following.
Finally there are also code examples from Beginning Cryptography with Java which demonstrate both the use of the JCE/JCA and also some of the Bouncy Castle APIs such as for certificate generation, CMS and S/MIME. Note: the book was written to cover J2SE 5.0, while many of the examples will work with earlier JDKs, some will not compile if you are not using J2SE 5.0 or later.