# Certificate Commands

Certificate operation command is designed to help user managing their private keys and public keys with algorithm ECC-sepc256k1. All commands are offline command.

# Derive Pkcs12 Certificate

# Usage

Usage: miyabi-cli derivepkcs12 [Options]

Options:
--help                  Show help information
-k|--key <hex>          Private key
-d|--directory <path>   Path to the directory to store PKCS#12 file
-f|--file <name>        PKCS#12 file name (extension is automatically added)
-p|--password <string>  Password if required

# Functionality

Create a pkcs12 certification according to the input private key. -k should specify the byte string of the private key. -k,-d, and -f are required.

# Example

$ ./miyabi-cli.exe derivepkcs12 -k 01 -d 'c:\' -f derive

# Generate Pkcs12 Certificate

# Usage

Usage: miyabi-cli generatepkcs12 [Options]

Options:
--help                  Show help information
-d|--directory <path>   Path to the directory to store PKCS#12 file
-f|--file <name>        PKCS#12 file name
-p|--password <string>  Password if required

# Functionality

Generate a PKCS12 certificate with a random private key.

# Example

$ ./miyabi-cli.exe generatepkcs12 -d c:\ -f derive

# Parse Pkcs12 Certificate

# Usage

Usage: miyabi-cli parsepkcs12 [Options]

Options:
--help                  Show help information
-f|--file <path>        PKCS#12 file path
-p|--password <string>  Password if required

# Functionality

Get the private key from pkcs12 certificate. -f is required.

# Example

$ ./miyabi-cli.exe parsepkcs12 -f 0.p12
8b1e72d59e152909ade35860e9306f59902da7c40e2dfa027b6058dd8cbe44c0

# Get Public Key

# Usage

Usage: miyabi-cli getpublickey [Options] <PrivateKey>

Arguments:
PrivateKey  Private key in hex

Options:
--help       Show help information

# Functionality

Return the public key of the given private key.

# Example

$ ./miyabi-cli.exe getpublickey 01
0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

# Generate Multiple Signature Command

# Usage

Usage: miyabi-cli generatemultisig [Options] <PublicKey>

Arguments:
PublicKeys  List of Public key in hex

Options:
-r           The threshold number of signatures that can validate the multi-sig address
--help       Show help information

# Functionality

Returns a multisig address for verifying threshold signature of the provided public keys <PublicKey> up to the threshold r provided.-r is required

# Example

$ ./miyabi-cli.exe generatemultisig 0286887e5a0d26844f403d0fdae6435e465ba7a8311429ac5443e65b74a1174352 0225c6b6c4225139c34746a3d12c798d9edab2ceb0149e2abe79812a04b9f20a91 -r 1