Stub out the sign/verify API.
This commit is contained in:
parent
580b310713
commit
b094cd92b9
|
@ -1,6 +1,6 @@
|
|||
use std::convert::TryFrom;
|
||||
|
||||
use crate::Error;
|
||||
use crate::{Error, Signature};
|
||||
|
||||
/// A refinement type indicating that the inner `[u8; 32]` represents an
|
||||
/// encoding of a RedJubJub public key.
|
||||
|
@ -39,3 +39,11 @@ impl TryFrom<PublicKeyBytes> for PublicKey {
|
|||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
// This is similar to impl signature::Verifier but without boxed errors
|
||||
impl PublicKey {
|
||||
/// Verify a supposed `signature` over `msg` made by this public key.
|
||||
pub fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error> {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::convert::TryFrom;
|
||||
|
||||
use crate::Error;
|
||||
use crate::{Error, PublicKey, Signature};
|
||||
|
||||
/// A refinement type indicating that the inner `[u8; 32]` represents an
|
||||
/// encoding of a RedJubJub secret key.
|
||||
|
@ -32,6 +32,7 @@ impl From<SecretKey> for SecretKeyBytes {
|
|||
}
|
||||
}
|
||||
|
||||
// XXX could this be a From impl?
|
||||
impl TryFrom<SecretKeyBytes> for SecretKey {
|
||||
type Error = Error;
|
||||
|
||||
|
@ -39,3 +40,17 @@ impl TryFrom<SecretKeyBytes> for SecretKey {
|
|||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a SecretKey> for PublicKey {
|
||||
fn from(sk: &'a SecretKey) -> PublicKey {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
// Similar to signature::Signer but without boxed errors.
|
||||
impl SecretKey {
|
||||
/// Sign the given `msg` with this `SecretKey`.
|
||||
pub fn sign(&self, msg: &[u8]) -> Signature {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue