RBX Address Creation
The purpose of this document is to teach you how a RBX address is created. This will walk you through from the starting step to the very end which is a human readable address.
How to create an RBX Address
The correct way to create a RBX address is to use well tested, opensource, peer reviewed wallet software. The manually handling keys can and has resulted in fund loss over and over again. Unlike other centralized systems, losses in RBX are usually unrecoverable. Please proceed at your own risk.
Here is a brief overview of how address generation works, for informational purposes:
Having a private ECDSA key
Take the corresponding public key generated with it and add '04' hex identifier. RBX private keys are created from Ecdsa multiplication of
(curve.G, secret, curve.N, curve.A, curve.P). In code it appears as this:
multiply(Point p, BigInteger n, BigInteger N, BigInteger A, BigIntegerP)
Fast way to multiply point and scalar in elliptic curves
param p: First Point to multiply
param n: Scalar to multiply
param N: Order of the elliptic curve
Prime number in the module of the equation Y\^2 = X \^ 3 + A \* X + B(mod p)
Coefficient of the first-order term of the equation Y \^ 2 = X \^ 3 + A \* X + B(mod p)
return: Point that represents the sum of First and Second Point
This can be seen in code under EllipticCurve->Math
Please note many ECDSA libraries out there handle public keys this way, so you may not have to do the above jacobian math.
Perform SHA-256 hashing on the public key from step 1.
Perform RIPEMD-160 hashing on the result of SHA-256 from step 2.
Add version byte in front of RIPEMD-160 hash (0x3C for Main Network) from step 3.
(note that below steps are the Base58Check encoding, which has multiple library options available implementing it)
Perform SHA-256 hash on the extended RIPEMD-160 result from step 4.
Perform SHA-256 hash on the result of the previous SHA-256 hash from step 5.
Take the first 4 bytes of the second SHA-256 hash. This is the address checksum from step 6.
Add the 4 checksum bytes from stage 7 at the end of extended RIPEMD-160 hash from stage 4. This is the 25-byte binary RBX Address.
Convert the result from a byte string into a base58 string using Base58Check encoding from step 8.