kz.gamma.hardware.crypto.software.ec
Class WNafMultiplier

java.lang.Object
  extended by kz.gamma.hardware.crypto.software.ec.WNafMultiplier
All Implemented Interfaces:
ECMultiplier

 class WNafMultiplier
extends java.lang.Object
implements ECMultiplier

Class implementing the WNAF (Window Non-Adjacent Form) multiplication algorithm.


Constructor Summary
WNafMultiplier()
           
 
Method Summary
 ECPoint multiply(ECPoint p, java.math.BigInteger k, PreCompInfo preCompInfo)
          Multiplies this by an integer k using the Window NAF method.
 byte[] windowNaf(byte width, java.math.BigInteger k)
          Computes the Window NAF (non-adjacent Form) of an integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WNafMultiplier

WNafMultiplier()
Method Detail

windowNaf

public byte[] windowNaf(byte width,
                        java.math.BigInteger k)
Computes the Window NAF (non-adjacent Form) of an integer.

Parameters:
width - The width w of the Window NAF. The width is defined as the minimal number w, such that for any w consecutive digits in the resulting representation, at most one is non-zero.
k - The integer of which the Window NAF is computed.
Returns:
The Window NAF of the given width, such that the following holds: k = ∑i=0l-1 ki2i , where the ki denote the elements of the returned byte[].

multiply

public ECPoint multiply(ECPoint p,
                        java.math.BigInteger k,
                        PreCompInfo preCompInfo)
Multiplies this by an integer k using the Window NAF method.

Specified by:
multiply in interface ECMultiplier
Parameters:
k - The integer by which this is multiplied.
p - The ECPoint to be multiplied.
Returns:
A new ECPoint which equals this multiplied by k.


Copyright © 2013 Gamma Technologies. All Rights Reserved.