From eaa71587519cb42331c4ec7971796a3c041c64c3 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 5 Mar 2021 23:46:20 +0000 Subject: [PATCH] Use reddsa to instantiate orchard::redpallas --- src/primitives/redpallas.rs | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/primitives/redpallas.rs b/src/primitives/redpallas.rs index d24fe58d..fa4d12b0 100644 --- a/src/primitives/redpallas.rs +++ b/src/primitives/redpallas.rs @@ -1,38 +1,27 @@ -//! TODO - -use std::fmt; -use std::marker::PhantomData; +//! A minimal RedPallas implementation for use in Zcash. /// A RedPallas signature type. -pub trait SigType: private::Sealed + fmt::Debug {} +pub trait SigType: reddsa::SigType + private::Sealed {} /// A type variable corresponding to an Orchard spend authorization signature. -#[derive(Debug)] -pub enum SpendAuth {} +pub type SpendAuth = reddsa::orchard::SpendAuth; impl SigType for SpendAuth {} /// A type variable corresponding to an Orchard binding signature. -#[derive(Debug)] -pub enum Binding {} +pub type Binding = reddsa::orchard::Binding; impl SigType for Binding {} /// A RedPallas signing key. #[derive(Debug)] -pub struct SigningKey { - _t: PhantomData, -} +pub struct SigningKey(reddsa::SigningKey); /// A RedPallas verification key. #[derive(Debug)] -pub struct VerificationKey { - _t: PhantomData, -} +pub struct VerificationKey(reddsa::VerificationKey); /// A RedPallas signature. #[derive(Debug)] -pub struct Signature { - _t: PhantomData, -} +pub struct Signature(reddsa::Signature); pub(crate) mod private { use super::{Binding, SpendAuth};