Electronic Signature Verification

GBT
Grabity
Published in
3 min readOct 25, 2019

Hello. Everyone.

Long time no see. Recently we released our first product, Planet Wallet, the decentralized mobile wallet.​

So today I will explain some part of the source which was used in electronic signature amongst implementing API in the server.

PlanetWallet에서 쓰이는 행성들

짧지만 많은 내용을 담은 소스

As you can see the image above, the function of check Signature is defined and it has 3 parameters, signature, symbol, planet name.​

  1. One of works to generate the public key is to define secp256k1 Elliptic Curve Cryptography.

2. PlanetName which is one of parameter encrypt via sha256 Hash algorithm.

3. Substract the specific digit number of signature from Variable r and s and store them.

4. Variable v which is called as recovery key gets the last two words from signature and store via hexdec function.

( hexdec : the function which alters the input value from hexadecimal to decimal number. )

5. On the Sign variables, store the value of r,s in the arrangement.

6. Return the recovery key which can generate address via recoverPubKey Method.

( The public key exists on the elliptic curve and it will be expressed in x,y location. So if you know one of the variables then, you can easily calculate the other variable.

For the reduction of storage space, the function only stores the value of x, and program to add 02 in front of x axle when the value of y is even, or to add 03 in front of x axle when the value of y is odd to complete the function.)

We are using the public key which was formed in the process to generate our own address.

In other words, we can create the public key and address it via checkSignature function. And with these addresses wallet can creates Planet and verify themselves and also rename the planet.​

Next time, I will bring more interesting content.

We appreciate your constant support.

If you are interested in GBT Protocol, please check the link below.

Homepage : https://gbtprotocol.com/

#GBT_Protocol #GBT #planetwallet #electronicsignature #signatureverification #blockchain #cryptowallet

--

--