mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-05-16 08:19:46 +00:00
more comments added
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
964276f53f
commit
5429872772
@ -100,13 +100,13 @@ type
|
|||||||
signkey: blscurve.PublicKey
|
signkey: blscurve.PublicKey
|
||||||
key: blst_p2
|
key: blst_p2
|
||||||
|
|
||||||
# POR metadata
|
# POR metadata (called "file tag t_0" in the original paper)
|
||||||
TauZero = object
|
TauZero = object
|
||||||
name: array[512,byte]
|
name: array[512,byte]
|
||||||
n: int64
|
n: int64
|
||||||
u: seq[blst_p1]
|
u: seq[blst_p1]
|
||||||
|
|
||||||
# signed POR metadata
|
# signed POR metadata (called "signed file tag t" in the original paper)
|
||||||
Tau = object
|
Tau = object
|
||||||
t: TauZero
|
t: TauZero
|
||||||
signature: array[96, byte]
|
signature: array[96, byte]
|
||||||
@ -266,6 +266,7 @@ proc setup*(ssk: SecretKey, s:int64, filename: string): (Tau, seq[blst_p1]) =
|
|||||||
ubase.add(ub)
|
ubase.add(ub)
|
||||||
|
|
||||||
#TODO: a better bytearray conversion of TauZero for the signature might be needed
|
#TODO: a better bytearray conversion of TauZero for the signature might be needed
|
||||||
|
# the current conversion using $t might be architecture dependent and not unique
|
||||||
let signature = sign(ssk.signkey, $t)
|
let signature = sign(ssk.signkey, $t)
|
||||||
let tau = Tau(t: t, signature: signature.exportRaw())
|
let tau = Tau(t: t, signature: signature.exportRaw())
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user