// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static ECKey convertPointToPubKEy(ECPoint point){
//     return ECKey.fromPublicOnly(point);
// }
// 
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static BigInteger convertPrivKeyToBigInt(ECKey ecKey){
//     checkArgument(ecKey.hasPrivKey(), "Private key expected, but ecKey only contains a public key.");
//     return new BigInteger(1, ecKey.getPrivKeyBytes());
// }
// 
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static ECPoint convertPubKeyToPoint(ECKey ecKey){
//     return ECKey.CURVE.getCurve().decodePoint(ecKey.getPubKey()).normalize();
// }
// 
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static ECKey convertBigIntToPrivKey(BigInteger bigInt){
//     checkArgument(bigInt.compareTo(BigInteger.ONE) >= 0, "A private key must be >= 1");
//     checkArgument(bigInt.compareTo(ECKey.CURVE.getN()) < 0, "A private key must be <= N_EC");
//     return ECKey.fromPrivate(bigInt);
// }


import org.bitcoinj.core.ECKey;
import com.google.common.collect.Lists;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.math.BigInteger;
import java.util.Collection;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertPointToPubKEy;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertPrivKeyToBigInt;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertPubKeyToPoint;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertBigIntToPrivKey;
/*
* Copyright 2014 Christopher Mann
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.uni_bonn.bit;




/**
 * The base class for the protocol tests. This class only contains the setup for some parameters.
 */
@RunWith(Parameterized.class)
@Ignore
public class ProtocolBaseTest {

    @Parameterized.Parameters
    public static Collection<ECKey[]> data(){
        BigInteger nEC = ECKey.CURVE.getN();
        return Lists.newArrayList(
                new ECKey[]{ convertBigIntToPrivKey(new BigInteger("1")), convertBigIntToPrivKey(new BigInteger("2"))},
                new ECKey[]{ convertBigIntToPrivKey(nEC.subtract(new BigInteger("1"))), convertBigIntToPrivKey(nEC.subtract(new BigInteger("2")))}
        );
    }

    @Parameterized.Parameter(0)
    public ECKey desktopKeyShare;
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static ECKey convertPointToPubKEy(ECPoint point){
//     return ECKey.fromPublicOnly(point);
// }
// 
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static BigInteger convertPrivKeyToBigInt(ECKey ecKey){
//     checkArgument(ecKey.hasPrivKey(), "Private key expected, but ecKey only contains a public key.");
//     return new BigInteger(1, ecKey.getPrivKeyBytes());
// }
// 
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static ECPoint convertPubKeyToPoint(ECKey ecKey){
//     return ECKey.CURVE.getCurve().decodePoint(ecKey.getPubKey()).normalize();
// }
// 
// Path: wallet_lib/src/main/java/de/uni_bonn/bit/BitcoinECMathHelper.java
// public static ECKey convertBigIntToPrivKey(BigInteger bigInt){
//     checkArgument(bigInt.compareTo(BigInteger.ONE) >= 0, "A private key must be >= 1");
//     checkArgument(bigInt.compareTo(ECKey.CURVE.getN()) < 0, "A private key must be <= N_EC");
//     return ECKey.fromPrivate(bigInt);
// }


// Path: wallet_lib/src/test/java/de/uni_bonn/bit/ProtocolBaseTest.java
import org.bitcoinj.core.ECKey;
import com.google.common.collect.Lists;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.math.BigInteger;
import java.util.Collection;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertPointToPubKEy;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertPrivKeyToBigInt;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertPubKeyToPoint;
import static de.uni_bonn.bit.BitcoinECMathHelper.convertBigIntToPrivKey;

/*
* Copyright 2014 Christopher Mann
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.uni_bonn.bit;




/**
 * The base class for the protocol tests. This class only contains the setup for some parameters.
 */
@RunWith(Parameterized.class)
@Ignore
public class ProtocolBaseTest {

    @Parameterized.Parameters
    public static Collection<ECKey[]> data(){
        BigInteger nEC = ECKey.CURVE.getN();
        return Lists.newArrayList(
                new ECKey[]{ convertBigIntToPrivKey(new BigInteger("1")), convertBigIntToPrivKey(new BigInteger("2"))},
                new ECKey[]{ convertBigIntToPrivKey(nEC.subtract(new BigInteger("1"))), convertBigIntToPrivKey(nEC.subtract(new BigInteger("2")))}
        );
    }

    @Parameterized.Parameter(0)
    public ECKey desktopKeyShare;
    @Parameterized.Parameter(1)