def public_key_at
bend-collections-laws-crypto@1.0.0.0 · spec/crypto/ed25519.bend:251
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/ed25519.bend as Ed25519
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/sha512.bend as SHA
251
252
253def public_key_at(+one: Nat, p: Nat, +seed: List<&2, U32>) -> List<&2, U32>:
254 match p:
255 case 0n:
256 public_of(one, 0n, dconst(one, 0n), SHA.sha512_bytes(seed))
257 case 1n+ +q:
258 public_of(one, 1n+q, dconst(one, 1n+q), SHA.sha512_bytes(seed))