Skip to content
Advertisement

Tag: cryptography

CMS signature SHA1+RSA with PEM format – Java

I need to generate a CMS with SHA1+RSA detached signature in PEM format over a xml file input. I need to make this from Java code in runtime. I need to avoid the use of an external tool like OpenSSL. This is because we need invoke some services with the generated signature from Java and manage error properly if an

How to load public certificate from pem file?

I was trying to extract RES public key from the file below Here is the code i did.. But It throws out java.security.InvalidKeyException: IOException: ObjectIdentifier() — data isn’t an object ID What’s the appropriate way to extract RES Public key from a file.. Answer An X.509 certificate and an X509EncodedKeySpec are quite different structures, and trying to parse a cert

Generate x509certificate certpath in JAVA

I successfully make X.509 certificate from certificate request. However, I need to insert CERT Path informatin in the X.509 certificate. I know that I have to use CertPathBuilder method but I don’t know how to use it. could you give me an code example that suitable for the following code? Answer The below code may help you

C# and Java DES Encryption value are not identical

I am trying to encrypt the same data using C# and Java. If the data is more than 7 bytes then Java and C#’s encrypted value are not identical. Input 1: a java output: FrOzOp/2Io8= C# output: FrOzOp/2Io8= Input 2: abc j : H9A/ahl8K7I= c#: H9A/ahl8K7I= Input 3: aaaaaaaa (Problem) j : Gxl7e0aWPd7j6l7uIEuMxA== c#: Gxl7e0aWPd7sf1xR6hK4VQ== Here is the implementation of

Why does SSL handshake give ‘Could not generate DH keypair’ exception?

When I make an SSL connection with some IRC servers (but not others – presumably due to the server’s preferred encryption method) I get the following exception: Final cause: An example of a server that demonstrates this problem is aperture.esper.net:6697 (this is an IRC server). An example of a server that does not demonstrate the problem is kornbluth.freenode.net:6697. [Not surprisingly,

Advertisement