SshMpint¶
Constructors¶
create¶
Returns¶
- SshMpint val^
Public Functions¶
canonical¶
Strip redundant leading 0x00 bytes from a big-endian magnitude so its mpint encoding is canonical. SSH mpint (RFC 4251) carries no leading zeros; a non-canonical encoding of the X25519 shared secret K diverges from OpenSSH (which canonicalizes), breaking the exchange hash on the ~1/256 of handshakes where K's top byte is zero. An all-zero (or empty) value canonicalizes to empty, which is the correct encoding of mpint 0.
Parameters¶
Returns¶
eq¶
Parameters¶
- that: SshMpint val
Returns¶
- Bool val
ne¶
Parameters¶
- that: SshMpint val
Returns¶
- Bool val