Maven module :un.api : api-encoding :
Class :
un.impl.cryptography.ec.ECCrypt
Extends/Implements : -
Subclasses : -
Variables : -
Functions :
ECCrypt,
makePublicKey,
encodeSecret,
decodeSecret,
sign,
verify,
main
public void
ECCrypt (ECPoint curve_point)
public BigInteger
makePublicKey (BigInteger privateKey)
public Pair
encodeSecret (BigInteger publicKey, BigInteger secret)
BigInteger
decodeSecret (BigInteger privateKey, BigInteger message)
public Pair
sign (BigInteger privateKey, BigInteger secret, BigInteger mac)
public boolean
verify (BigInteger publicKey, BigInteger mac, Pair sig)
public void
main (String[] argv)
the fact that it is reasonably fast to multiply an elliptic curve point by an
integer (k*P), but apparently very hard to recover the integer by
computing the inverse of an elliptic curve point. Thus, if (x) is
a secret key, making the product (x*P) public hopefully won't
expose the secret key. Multiplication is commutative, associative, and
distributive so that x*k*P == k*x*P == (k*x)*P and (x + k)*P == x*P + k*P.
Addition of curve points is commutative and associative, so that
x*P + k*P == k*P + x*P.
This public domain software was written by Stuart D. Gathman
based on a C program written by Paulo S.L.M. Barreto
George Barwood
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@author Stuart D. Gathman