Giter Site home page Giter Site logo

ksi-java-sdk's Introduction

KSI Java SDK

Guardtime Keyless Signature Infrastructure (KSI) is an industrial scale blockchain platform that cryptographically ensures data integrity and proves time of existence. Its keyless signatures, based on hash chains, link data to global calendar blockchain. The checkpoints of the blockchain, published in newspapers and electronic media, enable long term integrity of any digital asset without the need to trust any system. There are many applications for KSI, a classical example is signing of any type of logs - system logs, financial transactions, call records, etc. For more, see https://guardtime.com.

The KSI Java SDK is a software development kit for developers who want to integrate KSI with their Java based applications and systems. It provides an API for all KSI functionality, including the core functions - signing of data, extending and verifying the signatures.

Installation

The latest stable binary releases are available at http://search.maven.org. Just include the dependencies in your pom.xml:

<dependency>
    <groupId>com.guardtime</groupId>
    <artifactId>ksi-api</artifactId>
    <version>4.x.x</version>
</dependency>

<dependency>
    <groupId>com.guardtime</groupId>
    <artifactId>ksi-service-client-simple-http</artifactId>
    <version>4.x.x</version>
</dependency>

If you need the latest version, download the source and build using Maven.

Usage

In order to get trial access to the KSI platform, go to https://guardtime.com/blockchain-developers.

A simple example how to obtain a signature:

HttpClientSettings clientSettings = new HttpClientSettings(
                "signing-service-url",
                "extending-service-url",
                "publications-file-url",
                KSIServiceCredentials,
                PduVersion);

SimpleHttpClient simpleHttpClient = new SimpleHttpClient(clientSettings);

KSI ksi = new KSIBuilder()
    .setKsiProtocolSignerClient(simpleHttpClient)
    .setKsiProtocolExtenderClient(simpleHttpClient)
    .setKsiProtocolPublicationsFileClient(simpleHttpClient)
    .setPublicationsFileTrustedCertSelector(new X509CertificateSubjectRdnSelector("[email protected]"))
    .build();

// synchronous signing
KSISignature sig1 = ksi.sign(new File("file.txt"));
// asynchronous signing
Future<KSISignature> future = ksi.asyncSign(new File("asyncFile.txt"));
KSISignature sig2 = future.getResult();

The API full reference is available here http://guardtime.github.io/ksi-java-sdk/.

Compiling the Code

To compile the code you need JDK 1.5 (or later) and Maven. The project can be built via the command line by executing the following maven command:

mvn clean install

This command tells Maven to build all the modules, and to install it in the local repository. This command also runs all integration and unit tests. In order to run the integration tests successfully you need to have access to KSI service, the simplest is to request a trial account here https://guardtime.com/blockchain-developers. Add the KSI configuration to the file "ksi-api/src/test/resources/integrationtest.properties" (see file "ksi-api/src/test/resources/integrationtest.properties.sample" for more information).

You can also skip the integration tests by executing the following command:

mvn clean install -DskipITs

You can skip unit and integration tests by executing the following command:

mvn clean install -DskipTests -DskipITs

Dependencies

See Maven pom.xml files or use the following Maven command

mvn dependency:tree

Compatibility

Java 1.5 or newer.

Contributing

See CONTRIBUTING.md file.

License

See LICENSE file.

ksi-java-sdk's People

Contributors

mihkelsaar avatar margoraja avatar tiitkass avatar andrusrosman avatar ahtotruu avatar madispuk avatar

Watchers

James Cloos avatar wh0amI avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.