đKey pairs
Perhaps the simplest
Ed25519
Ed25519 was introduced in OpenSSH version 6.5. This is an implementation of EdDSA using the Twisted Edwards curve. It uses elliptic curve cryptography which provides better security and higher performance compared to DSA or ECDSA.
For any type of interaction with KLYNTAR, you must have a pair of keys. You use the private key to sign the data, while the public key is used to verify the signature. In general, the principle is familiar to everyone.
KLYNTAR uses Ed25519 as the most default pair. Key sizes (both private and public) are 32 bytes. The public key in Base58 is your KLYNTAR address.
By the way, KLYNTAR addresses are compatible with Solana (given the fact that their default addresses are just a public key in Base58). Moreover, the commit transaction useful.txt on the Solana mainnet (with a program Memo call) was made by the KLYNTAR keys
Here is a typical example of a key pair generated via CLI or UI in Apollo
Node.js generates key pair in DER format
1.Public SPKI type. So it looks like this right after generation
MCowBQYDK2VwAyEAsqv+zpsKO6vdklZ7wGcXzkpb27j+buojClSpqj78F3U=
All keys of this type have a common 12 bytes that there is no need to store publicly. We cut them off and convert the remaining 32 bytes to Base58. This process can be visualized as
2.Private PKCS8 type. Similarly, all privates share 16 bytes, but since they are not published, there is no need to change their size. We just apply Base64 to such a key, so it looks like this
MC4CAQAwBQYDK2VwBCIEIKiJ1JIhmP4NelCCV5IAgQdOSfS/t3+9EjiL4zgG1HA0
Generation via OpenSSL
You can also repeat all this through OpenSSL
Generate public key
It remains only to convert the public key to byte form, remove the first 12 bytes and convert to Base58.
Signature
The signature is standard and takes 64 bytes. On KLYNTAR we use it in Base64.
Why not to use the mnemonic phrase
UPD: Starting from version v17.1.0 ValarDohaeris supports HD addresses in KLYNTAR and also generates 12 mnemo words for you. However, the functionality for generating key pair chains and importing a phrase will be implemented soon
Also, starting from v19.4.0, KLYNTAR received an implementation of the BIP-44 standard and currently included in the official BIP-44 list with an identifier of 7331 (1337 in the opposite direction). Here you can see the merge to the main branch of the register
In future releases and updates, we will also create an implementation of BIP-44 for other types of keys that will be available on KLYNTAR - for multisig addresses and post-quantum key pairs
A couple more words
We also decided not to follow the path of generating some checksums, certain prefixes, and so on. Also, we did not separate addresses into mainnet / testnet formats due to uselessness and inconvenience (considering the experience with Bitcoin and forks).
Ed25519 was selected as the best candidate available to be universal for symbiotes, services, smart contracts and other projects in the ecosystem.
Links
Last updated