Bitcoin ABC 0.30.5
P2P Digital Currency
Classes | Static Public Member Functions | Static Private Member Functions | List of all members
org.bitcoin.NativeSecp256k1Test Class Reference

This class holds test cases defined for testing this library. More...

Classes

class  SchnorrTestVector
 

Static Public Member Functions

static void testVerifyPos () throws AssertFailException
 This tests verify() for a valid signature. More...
 
static void testVerifyNeg () throws AssertFailException
 This tests verify() for a non-valid signature. More...
 
static void testSecKeyVerifyPos () throws AssertFailException
 This tests secret key verify() for a valid secretkey. More...
 
static void testSecKeyVerifyNeg () throws AssertFailException
 This tests secret key verify() for an invalid secretkey. More...
 
static void testPubKeyCreatePos () throws AssertFailException
 This tests public key create() for a valid secretkey. More...
 
static void testPubKeyCreateNeg () throws AssertFailException
 This tests public key create() for a invalid secretkey. More...
 
static void testSignPos () throws AssertFailException
 This tests sign() for a valid secretkey. More...
 
static void testSignNeg () throws AssertFailException
 This tests sign() for a invalid secretkey. More...
 
static void testPrivKeyTweakAdd_1 () throws AssertFailException
 This tests private key tweak-add. More...
 
static void testPrivKeyTweakMul_1 () throws AssertFailException
 This tests private key tweak-mul. More...
 
static void testPrivKeyTweakAdd_2 () throws AssertFailException
 This tests private key tweak-add uncompressed. More...
 
static void testPrivKeyTweakMul_2 () throws AssertFailException
 This tests private key tweak-mul uncompressed. More...
 
static void testRandomize () throws AssertFailException
 This tests seed randomization. More...
 
static void testSchnorrVerify () throws AssertFailException
 This tests schnorrVerify() for a valid signature. More...
 
static void testSchnorrSign () throws AssertFailException
 This tests signSchnorr() for a valid secretkey. More...
 
static void testCreateECDHSecret () throws AssertFailException
 
static void main (String[] args) throws AssertFailException
 

Static Private Member Functions

static byte[] hexStringToByteArray (String s)
 
static String byteArrayToHexString (byte[] byteArray)
 

Detailed Description

This class holds test cases defined for testing this library.

Definition at line 8 of file NativeSecp256k1Test.java.

Member Function Documentation

◆ byteArrayToHexString()

static String org.bitcoin.NativeSecp256k1Test.byteArrayToHexString ( byte[]  byteArray)
inlinestaticprivate

Definition at line 21 of file NativeSecp256k1Test.java.

Here is the caller graph for this function:

◆ hexStringToByteArray()

static byte[] org.bitcoin.NativeSecp256k1Test.hexStringToByteArray ( String  s)
inlinestaticprivate

Definition at line 10 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

static void org.bitcoin.NativeSecp256k1Test.main ( String[]  args) throws AssertFailException
inlinestatic

Definition at line 368 of file NativeSecp256k1Test.java.

Here is the call graph for this function:

◆ testCreateECDHSecret()

static void org.bitcoin.NativeSecp256k1Test.testCreateECDHSecret ( ) throws AssertFailException
inlinestatic

Definition at line 359 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testPrivKeyTweakAdd_1()

static void org.bitcoin.NativeSecp256k1Test.testPrivKeyTweakAdd_1 ( ) throws AssertFailException
inlinestatic

This tests private key tweak-add.

Definition at line 136 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testPrivKeyTweakAdd_2()

static void org.bitcoin.NativeSecp256k1Test.testPrivKeyTweakAdd_2 ( ) throws AssertFailException
inlinestatic

This tests private key tweak-add uncompressed.

Definition at line 162 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testPrivKeyTweakMul_1()

static void org.bitcoin.NativeSecp256k1Test.testPrivKeyTweakMul_1 ( ) throws AssertFailException
inlinestatic

This tests private key tweak-mul.

Definition at line 149 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testPrivKeyTweakMul_2()

static void org.bitcoin.NativeSecp256k1Test.testPrivKeyTweakMul_2 ( ) throws AssertFailException
inlinestatic

This tests private key tweak-mul uncompressed.

Definition at line 175 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testPubKeyCreateNeg()

static void org.bitcoin.NativeSecp256k1Test.testPubKeyCreateNeg ( ) throws AssertFailException
inlinestatic

This tests public key create() for a invalid secretkey.

Definition at line 99 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testPubKeyCreatePos()

static void org.bitcoin.NativeSecp256k1Test.testPubKeyCreatePos ( ) throws AssertFailException
inlinestatic

This tests public key create() for a valid secretkey.

Definition at line 88 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testRandomize()

static void org.bitcoin.NativeSecp256k1Test.testRandomize ( ) throws AssertFailException
inlinestatic

This tests seed randomization.

Definition at line 188 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testSchnorrSign()

static void org.bitcoin.NativeSecp256k1Test.testSchnorrSign ( ) throws AssertFailException
inlinestatic

This tests signSchnorr() for a valid secretkey.

Definition at line 349 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testSchnorrVerify()

static void org.bitcoin.NativeSecp256k1Test.testSchnorrVerify ( ) throws AssertFailException
inlinestatic

This tests schnorrVerify() for a valid signature.

It tests the following test vectors: https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr/test-vectors.csv

Definition at line 217 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testSecKeyVerifyNeg()

static void org.bitcoin.NativeSecp256k1Test.testSecKeyVerifyNeg ( ) throws AssertFailException
inlinestatic

This tests secret key verify() for an invalid secretkey.

Definition at line 76 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testSecKeyVerifyPos()

static void org.bitcoin.NativeSecp256k1Test.testSecKeyVerifyPos ( ) throws AssertFailException
inlinestatic

This tests secret key verify() for a valid secretkey.

Definition at line 64 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testSignNeg()

static void org.bitcoin.NativeSecp256k1Test.testSignNeg ( ) throws AssertFailException
inlinestatic

This tests sign() for a invalid secretkey.

Definition at line 123 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testSignPos()

static void org.bitcoin.NativeSecp256k1Test.testSignPos ( ) throws AssertFailException
inlinestatic

This tests sign() for a valid secretkey.

Definition at line 110 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testVerifyNeg()

static void org.bitcoin.NativeSecp256k1Test.testVerifyNeg ( ) throws AssertFailException
inlinestatic

This tests verify() for a non-valid signature.

Definition at line 49 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testVerifyPos()

static void org.bitcoin.NativeSecp256k1Test.testVerifyPos ( ) throws AssertFailException
inlinestatic

This tests verify() for a valid signature.

Definition at line 34 of file NativeSecp256k1Test.java.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: