[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bouncycastle-crypto-dev
Subject:    [dev-crypto] BC ECC projective
From:       Michael Hall <hallmike () att ! net>
Date:       2009-09-10 22:45:59
Message-ID: 7ACECBF6-73D1-4783-A092-4272466E9C70 () att ! net
[Download RAW message or body]


Fwiw, tracked down what I had done on this.

http://www195.pair.com/mik3hall/ProjP1363ECPointFp.java
http://www195.pair.com/mik3hall/Projective.java

based on...
http://www195.pair.com/mik3hall/P1363-A-10-05-98.pdf

tested for one thing with...
public class ECDHBasicAgreement
     implements BasicAgreement
{
     private ECPrivateKeyParameters key;

     public void init(
         CipherParameters key)
     {
         this.key = (ECPrivateKeyParameters)key;
     }

     public BigInteger calculateAgreement(
         CipherParameters pubKey)
     {
         ECPublicKeyParameters pub = (ECPublicKeyParameters)pubKey;
//        ECPoint P = ((ProjP1363ECPointFp)pub.getQ().multiply 
(key.getD())).toAffine();
		ECPoint P = pub.getQ().multiply(key.getD());
		if (P instanceof ProjP1363ECPointFp) {
			P = ((ProjP1363ECPointFp)P).toAffine();
		}
         // if (p.isInfinity()) throw new RuntimeException("d*Q ==  
infinity");

         return P.getX().toBigInteger();
     }
}

implements Projective I believe because I was considering multiple  
versions. No F2m version, yet.

Mike Hall        hallmike at att dot net
http://www.geocities.com/mik3hall
http://sourceforge.net/projects/macnative




["smime.p7s" (application/pkcs7-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic