How to generate ADS keys#

Online tool#

You can generate keys by using our online tool: https://conversion.adshares.net/key

Store the secret keys safely. Only the public key and signatures can be revealed.

Warning

The seed phrase and the secret key must not be transferred to anyone.

Compilation of key program#

Another way is to compile the source code of the key program.

The software is developed for the Linux platform. There is no intent to support other platforms. The software was tested on Debian and Ubuntu. To compile the software, You need boost and SSL libraries. Check the Makefile if anything else is missing.

sudo apt-get update
sudo apt-get install openssl libboost-all-dev libssl-dev git build-essential

Start with cloning the git directory.

git clone https://github.com/adshares/ads.git

Then proceed to compile key generation program

cd ads/external/ed25519
make

Key generation#

After successful compilation, please run ./key program with your desired secret passphrase. Please use at least 16 random characters. Please use a good source of entropy to generate the passphrase.

./key "your secret passphrase"

You can also use random bytes generated by OpenSSL

./key `OpenSSL rand -hex 32`

The program will output your secret key SK, public key PK and signature for the empty string SG.

# Example
# Do not use those keys!
SK: EFD0380D9B29829AE9F30F41E85D6C09A97220E6CF76FE8C1B479A34A38D12EC
PK: 124793C618E3D25A96011F690EB00089144D89FB58FB96D7A3BFCEC78DFF5F8A
SG: C248A65080E7CED9081DDB3C849A17AEC102B3D044A3F38E530DD28A4AC9B3D5934B5ECA3306894BDCF0B3D8951F0FB339889CBC3D63EF3A54E6FA6EAD2C1A00

Note

Please store your secret key SK securely and copy PK and SG.

Signing message#

To sign the message you need to provide your secret key SK, public key PK and the message.

./sign SK PK "your message"

The program will output your secret key SK, public key PK and signature for the message SG.

# Example
# Do not use those keys!
SK: DF7C4188C7F77A182FA7655D5E971863D600A770858804735AFB1B667D2D055A
PK: EC71F56515B029B085296F92DE78B482081C26B02D8E065CA4F475CB516A0788
SG: F14D5FB1B5952CD99E821CA53A7901D4298C4ADD419A6E09F253D1ED7646A97D1C7ABA24952503AF8FEC3CFFA557E375B87C161465C60FD929C39194BDAF7C08

Verify signature#

To verify signature of the message you need to provide the signature SG, signer’s public key PK and the message.

./check SG PK "your message"

The program will output signature for the message SG, public key PK and the status OK! if the signature is correct or WRONG! otherwise.

# Example
SG: F14D5FB1B5952CD99E821CA53A7901D4298C4ADD419A6E09F253D1ED7646A97D1C7ABA24952503AF8FEC3CFFA557E375B87C161465C60FD929C39194BDAF7C08
PK: EC71F56515B029B085296F92DE78B482081C26B02D8E065CA4F475CB516A0788
OK!