commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CRYPTO-93) add a factory method to provide simpler API
Date Thu, 30 Jun 2016 19:44:10 GMT

     [ https://issues.apache.org/jira/browse/CRYPTO-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved CRYPTO-93.
------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.0

CRYPTO-93 add a factory method to provide simpler API

Added a parameterless ctor along the lines of the one in the cipher
factory. This will try to create the OPENSSL cipher and fall back to the
JAVA one.

Fixes #63

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/ae8e3506
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/ae8e3506
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/ae8e3506


> add a factory method to provide simpler API
> -------------------------------------------
>
>                 Key: CRYPTO-93
>                 URL: https://issues.apache.org/jira/browse/CRYPTO-93
>             Project: Commons Crypto
>          Issue Type: Bug
>            Reporter: Xianda Ke
>            Assignee: Xianda Ke
>             Fix For: 1.0.0
>
>
> Add a default factory method to provide simpler API and better hardware  random.
> OpensslCryptoRandom uses hardware random  number generator if  hardware supports.
> Hardware random number generators are almost always better to use than a software based
generator. Hardware generators are often called True Random Number generators (TRNG) or Non-Deterministic
Random Number Generators since they don't rely on the deterministic behavior of executing
software instructions. Their bits streams are nearly always indistinguishable from random
streams, and their entropy is always nearly 100%.
> Modern Intel CPUs(3rd generation Core i5 or i7 processor (Ivy Bridge) or above) do support
 random  number generator, it is better to provide a default API(openssl implementation) for
the client user.
> {code}
> // By default, use True Random Number Generator (hardware random)
> // Simpler API. client code is clean.
> CryptoRandom random = CryptoRandomFactory.getCryptoRandom();
> byte[] key = new byte[16];
> random.nextBytes(key);
> random.close();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message