1
0
Fork 0
mirror of https://github.com/eosswedenorg/libantelope synced 2026-06-16 11:44:55 +02:00

include/libeosio/ec.hpp: Adding signature type.

This commit is contained in:
Henrik Hautakoski 2023-03-16 11:07:42 +01:00
parent 6eaf6ebe71
commit 8a6b476a8b

View file

@ -57,6 +57,29 @@ struct ec_keypair {
ec_pubkey_t pub;
};
/**
* Elliptic curve recoverable signature
*
* The signature consist of 2 integers r,s and v where
* r: x cordinate of the random point
* s: signature proof
* v: recovery id (0, 1, 2 or 3), eg. what EC point is the public key.
*
* The memory layout is as follows:
* r(32), s(32), v(1) = 65 bytes.
*/
/**
* Elliptic curve signature key size (in bytes)
*/
#define EC_SIGNATURE_SIZE (32 + 32 + 1)
/**
* Elliptic curve signature datastructure.
*/
typedef std::array<unsigned char, EC_SIGNATURE_SIZE> ec_signature_t;
/**
* Initialize the ec library.
*/