Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- SIGNATURE



  Signature sign/verification demo in Java

Digital signature is commonly used in areas where data authentication and integrity are required. It is extremely important to have signature while transferring sensitive data from one peer to other peers through network since there might be malicious applications or man-in-the-middle attacks which may alter the data along the way. Java provides some APIs to generate and verify digital signature. One important class is Signature.  When generating the signature, a private key needs to be pa...

   SECURITY,JAVA,SIGNATURE     2015-11-21 09:48:12

  Generate signed certificate from CSR in Java

In our previous tutorial, we have explained how to generate CSR which can be sent to CA for generating a signed certificate. In this tutorial, we will explain how to generate the signed certificate from CSR in Java. We will not use an actual CA but a self-signed certificate to act as a CA certificate. Since the CSR contains the subject information where a certificate needs to be generated and signed for. The key here is to extract the subject information from the CSR and then set it as the subje...

   JAVA,CSR,SIGN CERTIFICATE     2020-10-24 07:03:17

  Polymorphism in OOP programming

Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. This is the third basic principle of object oriented programming. Overloading, overriding and dynamic method binding are three types of polymorphism. Overloaded methods are methods with the same name signature but either a different number of parameters or different types in the parameter list. For example 'spinning' a num...

   Java,OOP,Polymorphism,Overloading,Overri     2014-10-23 08:11:50

  Different types of keystore in Java -- Windows-MY

Windows-MY is a type of keystore on Windows which is managed by the Windows operating system. It stores the user keys and certificates which can be used to perform cryptographic operations such as signature verification, data encryption etc. Since it's a kind of native keystore, Java doesn't have a general API to access it. To help Java applications access the keys and certificates stored in Windows-MY keystore, Java provides a separate API -- SunMSCAPI. The SunMSCAPI provider is ...

   JAVA,KEYSTORE,WINDOWS-MY,SUNMSCAPI     2016-01-09 05:45:59

  Generating CSR using Java

A CSR(Certificate Signing Request) is a kind of request generated by an application and is to be sent to a Certificate Authority to create a signed certificate which can be distributed. It usually contains certificate information such as subject name, public key info and signature info. In Java, keytool can be used to generate a certificate request with option -certreq.  But sometimes if an application wants to create a CSR programmatically, keytool will not do a favor, instead you should u...

   JAVA,SECURITY,CSR,CERTIFICATE REQUEST     2016-05-25 04:49:17

  Understanding an interesting JavaScript map function question

With the evolvement of JavaScript, lots of new features have been added this old but robust language.  Among them are lots of functional programming language related functions like map, filter, each etc. In this post, we will cover one function map and its interesting behavior. Before dive into the details, let first take an example, do you know the output of below function call? ['1', '7', '11'].map(parseInt) You may think that it's easy and the output would be [1, 7, 11] Can you try to ru...

   JAVASCRIPT,MAP,FUNCTIONAL PROGRAMMING     2019-06-14 08:34:46

  Generate certificate from cert file in Java

A certificate is often used to prove the identity of a server. The certificate will contain information such as the subject and issuer of the certificate. It will also contain the validation date of the certificate. A certificate is often exported to an external cert file which is transferred over the internet. We will often see its use in SSL communication which provides secure communication between two entities. In this post, we will show how to read the data from an external certificate file ...

   PKCS12,CertificateFactory,Example,Java,X509     2015-06-08 06:47:05

  Generate certificate with cRLDistributionPoints extension using OpenSSL

In an X509 certificate, the cRLDistributionPoints extension provides a mechanism for the certificate validator to retrieve a CRL(Certificate Revocation List) which can be used to verify whether the given certificate is revoked.   A cRLDistributionPoints extension can contain one or more DistributionPoints where the CRL can be retrieved from. Each DistributionPoint consists of three fields,each of which is optional: distributionPoint : it contains either a SEQUENCE of general...

   X509,OPENSSL,CERTIFICATE,CRLDISTRIBUTIONPOINT,EXTENSION     2015-10-22 03:41:11

  Using keytool to create certificate chain

JDK provides a command line tool -- keytool to handle key and certificate generation. This tool has a set of options which can be used to generate keys, create certificates, import keys, install certificate and export certificates etc. In this tutorial, we will show how to create certificate chain using keytool. If you want to understand how to create certificate chain programmably, please refer to Generate certificate in Java -- Certificate chain. To begin, we first generate a key pair whi...

   JAVA,KEYTOOL,CERTIFICATE CHAIN,CERTIFICATE     2015-12-17 07:09:33

  A simple tutorial on writing Java native program

Java provides Java Native Interface(JNI) to enable developers to write programs which can utilize the underlying native libraries of the operating system. The benefits of writing native code are that they normally provide better performance compared to Java codes. Sometimes if you want to utilize some system specific functions you may also want to use JNI. One main drawback of writing native code is that your application may not be platform independent anymore. This is not what Java is desi...

   Java native interface, JNI, Native code, Sample     2015-08-15 08:28:15