@@ -92,12 +92,11 @@ where
9292 & self . secret_scalar
9393 }
9494
95- /// Get the [`VerifyingKey`] which corresponds to this [`SigningKey`]
96- // TODO(tarcieri): make this return `&VerifyingKey<C>` in the next breaking release
95+ /// Get the [`VerifyingKey`] which corresponds to this [`SigningKey`].
9796 #[ cfg( feature = "verify" ) ]
9897 #[ cfg_attr( docsrs, doc( cfg( feature = "verify" ) ) ) ]
99- pub fn verifying_key ( & self ) -> VerifyingKey < C > {
100- self . verifying_key
98+ pub fn verifying_key ( & self ) -> & VerifyingKey < C > {
99+ & self . verifying_key
101100 }
102101}
103102
@@ -350,6 +349,18 @@ where
350349 }
351350}
352351
352+ #[ cfg( feature = "verify" ) ]
353+ impl < C > From < SigningKey < C > > for VerifyingKey < C >
354+ where
355+ C : PrimeCurve + ProjectiveArithmetic ,
356+ Scalar < C > : Invert < Output = CtOption < Scalar < C > > > + Reduce < C :: UInt > + SignPrimitive < C > ,
357+ SignatureSize < C > : ArrayLength < u8 > ,
358+ {
359+ fn from ( signing_key : SigningKey < C > ) -> VerifyingKey < C > {
360+ signing_key. verifying_key
361+ }
362+ }
363+
353364#[ cfg( feature = "verify" ) ]
354365impl < C > From < & SigningKey < C > > for VerifyingKey < C >
355366where
@@ -358,7 +369,7 @@ where
358369 SignatureSize < C > : ArrayLength < u8 > ,
359370{
360371 fn from ( signing_key : & SigningKey < C > ) -> VerifyingKey < C > {
361- signing_key. verifying_key ( )
372+ signing_key. verifying_key
362373 }
363374}
364375
0 commit comments