2018-02-13 18:20:27 +00:00
|
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
|
|
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
|
|
|
|
2018-02-14 15:24:29 +00:00
|
|
|
import ttmath, ./private/lowlevel_types
|
|
|
|
export lowlevel_types
|
2018-02-13 18:20:27 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
PublicKey* = object
|
2018-02-14 15:24:29 +00:00
|
|
|
raw_key*: ByteArrayBE[64]
|
2018-02-13 18:20:27 +00:00
|
|
|
|
|
|
|
PrivateKey* = object
|
2018-02-14 15:24:29 +00:00
|
|
|
raw_key*: ByteArrayBE[32]
|
2018-02-13 18:20:27 +00:00
|
|
|
public_key*: PublicKey
|
|
|
|
|
|
|
|
BaseKey* = PrivateKey|PublicKey
|
|
|
|
|
|
|
|
Signature* = object
|
|
|
|
v*: range[0.uint8 .. 1.uint8]
|
|
|
|
r*: UInt256
|
|
|
|
s*: UInt256
|