#[repr(u8)]
pub enum Tag {
Identity,
CompressedEvenY,
CompressedOddY,
Uncompressed,
Compact,
}Expand description
Tag byte used by the Elliptic-Curve-Point-to-Octet-String encoding.
Variants§
Identity
Identity point (0x00)
CompressedEvenY
Compressed point with even y-coordinate (0x02)
CompressedOddY
Compressed point with odd y-coordinate (0x03)
Uncompressed
Uncompressed point (0x04)
Compact
Compact point (0x05)
Implementations§
source§impl Tag
impl Tag
sourcepub fn is_compact(self) -> bool
pub fn is_compact(self) -> bool
Is this point compact?
sourcepub fn is_compressed(self) -> bool
pub fn is_compressed(self) -> bool
Is this point compressed?
sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Is this point the identity point?
sourcepub fn message_len(self, field_element_size: usize) -> usize
pub fn message_len(self, field_element_size: usize) -> usize
Compute the expected total message length for a message prefixed with this tag (including the tag byte), given the field element size (in bytes) for a particular elliptic curve.