left: right syntax means different things in different contexts, and it is not a type annotation in this case. Instead, it is a trait bound. You can tell the difference by whether the left-hand-side is a variable or a type. If it's a value, then it's a type annotation, but if the left-hand-side is a type, then it is a trait bound.
The meaning of the trait bound is that
TPublic must be a type that implements the
Public trait. This trait is a super-trait of
CryptoType, which has an associated type called
Pair, which must implement the trait
Pair of the same name. When you write
TPublic::Pair, this means "whatever type the associated type
Pair is set to in the
impl CryptoType for TPublic block".
The syntax in the return type says that it returns whatever the associated type
Public is set to in the
impl Pair for TPublic::Pair block. The
<... as Pair> part makes it explicit that you are talking about the
type Public from the
impl Pair for ... block rather than an
type Public from an
impl SomeOtherTraitThanPair for ... block.