ecpoint: Creating objects of class ECPOINT

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/EllipticCurves.R

Description

This function returns an object of S4-class ECPOINT, that does represent a point on an elliptic curve.

Usage

1
ecpoint(ecparam = NULL, x, y, r = NULL)

Arguments

ecparam

integerECPARAM

x

x-coordinate, to be coercible to bigz.

y

y-coordinate, to be coercible to bigz.

r

the order of the base point.

Value

An object of S4-class ECPOINT

Author(s)

Bernhard Pfaff

References

https://en.bitcoin.it/wiki/Secp256k1

See Also

Other EllipticCurve: ECPARAM-class, ECPOINT-class, EcparamOrNull-class, containsPoint, ecoperators, ecparam, isNull

Examples

1
2
3
4
5
6
7
8
9
p <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F"
b <- "0x0000000000000000000000000000000000000000000000000000000000000007"
a <- "0x0000000000000000000000000000000000000000000000000000000000000000"
r <- "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"
x <- "0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"
y <- "0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"
curve256 <- ecparam(p, a, b)
ecp <- ecpoint(curve256, x, y, r)
ecp

Example output

An object of class "ECPOINT"
Slot "ecparam":
Curve parameters (in hex):
p: fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f 
a: 0 
b: 7 

Slot "x":
Big Integer ('bigz') :
[1] 55066263022277343669578718895168534326250603453777594175500187360389116729240

Slot "y":
Big Integer ('bigz') :
[1] 32670510020758816978083085130507043184471273380659243275938904335757337482424

Slot "r":
Big Integer ('bigz') :
[1] 115792089237316195423570985008687907852837564279074904382605163141518161494337

rbtc documentation built on May 2, 2019, 12:20 p.m.

Related to ecpoint in rbtc...