Nim-Libp2p Copyright (c) 2020-2022 Status Research & Development GmbH
- Licensed under either of
- Apache License, version 2.0, (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option. This file may not be copied, modified, or distributed except according to those terms.
This module integrates BearSSL Cyrve25519 mul and mulgen
This module uses unmodified parts of code from BearSSL library <https://bearssl.org/> Copyright(C) 2018 Thomas Pornin <pornin@bolet.org>.
Types
Curve25519 = object
- Source Edit
Curve25519Error = enum Curver25519GenError
- Source Edit
Curve25519Key = array[Curve25519KeySize, byte]
- Source Edit
Procs
proc getBytes(key: Curve25519Key): seq[byte] {....raises: [Defect], tags: [].}
- Source Edit
proc intoCurve25519Key(s: openArray[byte]): Curve25519Key {....raises: [Defect], tags: [].}
- Source Edit
proc mul(_: type[Curve25519]; point: var Curve25519Key; multiplier: Curve25519Key) {....raises: [Defect].}
- Source Edit
proc public(private: Curve25519Key): Curve25519Key {....raises: [Defect], tags: [RootEffect].}
- Source Edit
proc random(_: type[Curve25519Key]; rng: var BrHmacDrbgContext): Curve25519Key {. ...raises: [Defect].}
- Source Edit