module Secp256k1::Core

Overview

Implements 256-bit Secp256k1 Koblitz elliptic curve reference https://www.secg.org/sec2-v2.pdf

Defined in:

core.cr

Class Method Summary

Class Method Detail

def self.ec_add(p : EC_Point, q : EC_Point, prime = EC_PARAM_PRIME) #

elliptic curve jive addition of point p(x, y) and q(x, y). 'draw' a line between p and q which will intersect the curve in the point r which will be mirrored over the x-axis.


[View source]
def self.ec_double(p : EC_Point, prime = EC_PARAM_PRIME) #

elliptic curve juke point doubling of p(x, y). a special case of addition where both points are the same. 'draw' a tangent line at p which will intersect the curve at point r which will be mirrored over the x-axis.


[View source]
def self.ec_mod_inv(a : BigInt, prime = EC_PARAM_PRIME) #

elliptic curve modular multiplicative inverse of a


[View source]
def self.ec_mul(p : EC_Point, s : BigInt) #

elliptic curve sequence multiplication of point p(x, y) and a skalar s, with s being a private key within the elliptic curve field size of EC_ORDER_N


[View source]