Java PublicKeyStore Library

Light keystore implementation for managing and storing only PublicKeys in Java

License

License

Categories

Categories

KeY Data Data Formats Formal Verification
GroupId

GroupId

com.github.publickey
ArtifactId

ArtifactId

public-key-store
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Java PublicKeyStore Library
Light keystore implementation for managing and storing only PublicKeys in Java
Project URL

Project URL

https://github.com/PublicKey/PublicKeyStore
Source Code Management

Source Code Management

https://github.com/PublicKey/PublicKeyStore.git

Download public-key-store

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.publickey/public-key-store/ -->
<dependency>
    <groupId>com.github.publickey</groupId>
    <artifactId>public-key-store</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.publickey/public-key-store/
implementation 'com.github.publickey:public-key-store:1.0.0'
// https://jarcasting.com/artifacts/com.github.publickey/public-key-store/
implementation ("com.github.publickey:public-key-store:1.0.0")
'com.github.publickey:public-key-store:jar:1.0.0'
<dependency org="com.github.publickey" name="public-key-store" rev="1.0.0">
  <artifact name="public-key-store" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.publickey', module='public-key-store', version='1.0.0')
)
libraryDependencies += "com.github.publickey" % "public-key-store" % "1.0.0"
[com.github.publickey/public-key-store "1.0.0"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.easymock : easymock jar 3.1

Project Modules

There are no modules declared in this project.

PublicKeyStore

Light keystore implementation for managing and storing only PublicKeys in Java

Maven:

<dependency>
  <groupId>org.java.security</groupId>
  <artifactId>public-key-store</artifactId>
  <version>1.0.0</version>
</dependency>

Note: Library depends on: Java 1.6

Components:

This library provides three components:

  • PublicKeyStore (for storing PublicKeys and it's aliases)
  • PublicKeyArchive (for storing PublicKeytStore) -- The library comes with PublicKeyZipArchive that is able to store PublicKeyStore as a zip file of PEM encoded Public Keys
  • PublicKeyPemUtility (for reading/writing PEM encoded public keys)

Usage:

Here's an example of the token creation from scratch:

	KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
	KeyPair keyPair = generator.generateKeyPair();
	PublicKey key = keyPair.getPublic();
	...
	PublicKeyStore keyStore = new PublicKeyStore();
	keyStore.add("alias", key);
	...
	File file = File.createTempFile(getClass().getSimpleName() + "-", ".pubar");
	file.deleteOnExit();

	PublicKeyZipArchive archive = new PublicKeyZipArchive(file.getAbsolutePath());
	archive.store(keyStore);

The Maven artifacts are deployed with the Maven Repository Switchboard at: http://repo1.maven.org/maven2/com/github/publickey/public-key-store/

Sample repository configuration

<repository>
	<id>central</id>
	<name>Maven Repository Switchboard</name>
	<layout>default</layout>
	<url>http://repo1.maven.org/maven2/</url>
	<snapshots>
		<enabled>false</enabled>
	</snapshots>
</repository>

The Maven artifacts are also avaialble through with Sonatype at: https://oss.sonatype.org/service/local/repositories/releases/content/

Versions

Version
1.0.0