2323//! let verification_key = signing_keypair.public_key();
2424//! let decryption_key = Scalar::random(&mut rand::thread_rng());
2525//! let encryption_key = schnorr.encryption_key_for(&decryption_key);
26- //! let message = Message::<Public>::plain ("text-bitcoin", b"send 1 BTC to Bob");
26+ //! let message = Message::new ("text-bitcoin", b"send 1 BTC to Bob");
2727//!
2828//! // Alice knows: signing_keypair, encryption_key
2929//! // Bob knows: decryption_key, verification_key
@@ -68,7 +68,7 @@ pub trait EncryptedSign {
6868 & self ,
6969 signing_keypair : & KeyPair < EvenY > ,
7070 encryption_key : & Point < Normal , impl Secrecy > ,
71- message : Message < ' _ , impl Secrecy > ,
71+ message : Message < ' _ > ,
7272 ) -> EncryptedSignature ;
7373}
7474
8181 & self ,
8282 signing_key : & KeyPair < EvenY > ,
8383 encryption_key : & Point < Normal , impl Secrecy > ,
84- message : Message < ' _ , impl Secrecy > ,
84+ message : Message < ' _ > ,
8585 ) -> EncryptedSignature {
8686 let ( x, X ) = signing_key. as_tuple ( ) ;
8787 let Y = encryption_key;
@@ -139,7 +139,7 @@ pub trait Adaptor {
139139 & self ,
140140 verification_key : & Point < EvenY , impl Secrecy > ,
141141 encryption_key : & Point < impl PointType , impl Secrecy > ,
142- message : Message < ' _ , impl Secrecy > ,
142+ message : Message < ' _ > ,
143143 encrypted_signature : & EncryptedSignature < impl Secrecy > ,
144144 ) -> bool ;
145145
@@ -179,7 +179,7 @@ pub trait Adaptor {
179179 & self ,
180180 encryption_key : & Point < impl Normalized , impl Secrecy > ,
181181 encrypted_signature : & EncryptedSignature < impl Secrecy > ,
182- signature : & Signature < impl Secrecy > ,
182+ signature : & Signature ,
183183 ) -> Option < Scalar > ;
184184}
185185
@@ -195,7 +195,7 @@ where
195195 & self ,
196196 verification_key : & Point < EvenY , impl Secrecy > ,
197197 encryption_key : & Point < impl PointType , impl Secrecy > ,
198- message : Message < ' _ , impl Secrecy > ,
198+ message : Message < ' _ > ,
199199 encrypted_signature : & EncryptedSignature < impl Secrecy > ,
200200 ) -> bool {
201201 let EncryptedSignature {
@@ -236,7 +236,7 @@ where
236236 & self ,
237237 encryption_key : & Point < impl PointType , impl Secrecy > ,
238238 encrypted_signature : & EncryptedSignature < impl Secrecy > ,
239- signature : & Signature < impl Secrecy > ,
239+ signature : & Signature ,
240240 ) -> Option < Scalar > {
241241 if signature. R != encrypted_signature. R {
242242 return None ;
@@ -298,7 +298,7 @@ mod test {
298298 let signing_keypair = schnorr. new_keypair ( secret_key) ;
299299 let verification_key = signing_keypair. public_key ( ) ;
300300 let encryption_key = schnorr. encryption_key_for ( & decryption_key) ;
301- let message = Message :: < Public > :: plain ( "test" , b"give 100 coins to Bob" . as_ref ( ) ) ;
301+ let message = Message :: new ( "test" , b"give 100 coins to Bob" . as_ref ( ) ) ;
302302
303303 let encrypted_signature =
304304 schnorr. encrypted_sign ( & signing_keypair, & encryption_key, message) ;
0 commit comments