From 08d84cc0a793926d43f456541f36a85c10a3dbe7 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Wed, 30 Jun 2021 15:40:04 -0400 Subject: [PATCH] Rustdoc for redpallas types --- zebra-chain/src/primitives/redpallas.rs | 8 ++++++-- zebra-chain/src/primitives/redpallas/scalar_mul.rs | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/zebra-chain/src/primitives/redpallas.rs b/zebra-chain/src/primitives/redpallas.rs index 17bcc250..c680fbfd 100644 --- a/zebra-chain/src/primitives/redpallas.rs +++ b/zebra-chain/src/primitives/redpallas.rs @@ -1,5 +1,3 @@ -//! RedPallas cryptographic primitives. - // -*- mode: rust; -*- // // This file is part of redjubjub. @@ -10,6 +8,12 @@ // - Deirdre Connolly // - Henry de Valence +//! RedPallas digital signatures. +//! +//! RedDSA (a Schnorr-based signature scheme) signatures over the [Pallas][pallas] curve. +//! +//! + use group::GroupEncoding; use halo2::pasta::pallas; diff --git a/zebra-chain/src/primitives/redpallas/scalar_mul.rs b/zebra-chain/src/primitives/redpallas/scalar_mul.rs index c9802e76..295a4388 100644 --- a/zebra-chain/src/primitives/redpallas/scalar_mul.rs +++ b/zebra-chain/src/primitives/redpallas/scalar_mul.rs @@ -10,11 +10,15 @@ // - Henry de Valence // - Deirdre Connolly +//! Traits and types that support variable-time multiscalar multiplication with +//! the [Pallas][pallas] curve. + use std::{borrow::Borrow, fmt::Debug}; use group::Group; use halo2::{arithmetic::FieldExt, pasta::pallas}; +/// A trait to support getting the Non-Adjacent form of a scalar. pub trait NonAdjacentForm { fn non_adjacent_form(&self, w: usize) -> [i8; 256]; }